[chromium-dev] How do you perform tab traversal?

2009-09-11 Thread Daniel Cowx

I'm trying to create a simple dialog box following the exam at
http://dev.chromium.org/developers/design-documents/views-windowing.
Note that I'm using views as in a standalone app (I'm not embedding
this dialog in Chromium).

I've added 2 views::Textfields to WindowView, but I can't seem to tab
between them. When I press the tab key, it simply inserts a tab into
the editbox.

Here is what I have:

snip
#pragma once

#include views/controls/textfield/textfield.h
#include views/view.h
#include views/window/dialog_delegate.h

namespace views {
class Label;
class Textfield;
}

class WindowView : public views::View,
   public views::DialogDelegate,
   public views::Textfield::Controller {
 public:
  WindowView();
  ~WindowView();

  // Overridden from views::View:
  virtual void Paint(gfx::Canvas* canvas);
  virtual void Layout();
  virtual gfx::Size GetPreferredSize();

  // Overridden from views::DialogDelegate:
  virtual std::wstring GetWindowTitle() const { return LDemo; }
  virtual bool CanResize() const { return true; }
  virtual bool CanMaximize() const { return true; }
  virtual views::View* GetContentsView() { return this; }
  virtual int GetDialogButtons() const { return
MessageBoxFlags::DIALOGBUTTON_OK; }
  // Return the view that you want to have initially focused
  virtual views::View* GetInitiallyFocusedView();
 private:

  // Overridden from views::Textfield::Controller:
  virtual void ContentsChanged(views::Textfield* sender,
   const std::wstring new_contents);
  virtual bool HandleKeystroke(views::Textfield* sender,
   const views::Textfield::Keystroke
keystroke);

  views::Label* label1_;
  views::Textfield* textbox1_;
  views::Label* label2_;
  views::Textfield* textbox2_;

  DISALLOW_COPY_AND_ASSIGN(WindowView);
};
/snip

snip

#include kreofusion/misc/context_menu_demo/window_view.h

#include app/gfx/canvas.h
#include base/message_loop.h
#include views/controls/label.h
#include views/standard_layout.h
#include views/widget/root_view.h

WindowView::WindowView()
  : label1_(new views::Label(LTextbox 1)),
textbox1_(new views::Textfield()),
label2_(new views::Label(LTextbox 2)),
textbox2_(new views::Textfield()) {
  textbox1_-SetController(this);
  textbox2_-SetController(this);
  AddChildView(label1_);
  AddChildView(textbox1_);
  AddChildView(label2_);
  AddChildView(textbox2_);
}

WindowView::~WindowView() {
  MessageLoop::current()-Quit();
}

void WindowView::Paint(gfx::Canvas* canvas) {
  views::View::Paint(canvas);
}

void WindowView::Layout() {
  const gfx::Rect lb = bounds();
  if (lb.IsEmpty())
return;
  gfx::Size ps = label1_-GetPreferredSize();
  int y = kButtonVEdgeMargin;
  label1_-SetBounds(kButtonHEdgeMargin, y, ps.width(), ps.height());
  y += ps.height() + kRelatedControlSmallVerticalSpacing;
  ps = textbox1_-GetPreferredSize();
  textbox1_-SetBounds(kButtonHEdgeMargin, y, lb.width() -
2*kButtonHEdgeMargin, ps.height());

  y += ps.height() + kUnrelatedControlVerticalSpacing;
  ps = label2_-GetPreferredSize();
  label2_-SetBounds(kButtonHEdgeMargin, y, ps.width(), ps.height());
  y += ps.height() + kRelatedControlSmallVerticalSpacing;
  ps = textbox2_-GetPreferredSize();
  textbox2_-SetBounds(kButtonHEdgeMargin, y, lb.width() -
2*kButtonHEdgeMargin, ps.height());
}

gfx::Size WindowView::GetPreferredSize() {
  gfx::Size ps = label1_-GetPreferredSize();
  ps.set_width(ps.width() + 200);
  ps.set_height(ps.height() + 200);
  return ps;
}

views::View* WindowView::GetInitiallyFocusedView() {
  return textbox2_;
}


// WindowView, private:

void WindowView::ContentsChanged(views::Textfield* sender,
 const std::wstring new_contents)
{
}

bool WindowView::HandleKeystroke(views::Textfield* sender,
 const views::Textfield::Keystroke
keystroke) {
  return false;
}
/snip

What am I doing wrong?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Is it possible to link Chromium to shared CRT on Windows (i.e. /MD instead of /MT)

2009-08-18 Thread Daniel Cowx

I'm incorporating Chromium into an existing that uses the shared CRT.
To minimize footprint, I'd like to experiment with linking Chromium to
the shared CRT as well. I've tried changing RuntimeLibrary in
common.gypi, but I'm getting numerous linker errors (I think b/c of
tcmalloc's dependence on static CRT?). Does anyone know if this is a
supported configuration and/or have suggestions on how to get it
working.
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Is there an option to block file downloads in Chromium?

2009-07-03 Thread Daniel Cowx

If not, where would be the most logical place to add this
functionality?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Is there an option to block file downloads in Chromium?

2009-07-03 Thread Daniel Cowx

Yeah, it would be an administrative feature for a version of Chromium
that is being developed for Library use. The library admins don't want
users to be able to download files.

On Jul 3, 10:26 am, Peter Kasting pkast...@google.com wrote:
 On Fri, Jul 3, 2009 at 10:22 AM, Daniel Cowx daniel.c...@gmail.com wrote:
  If not, where would be the most logical place to add this
  functionality?

 No, and I Don't Know, but presumably as an extension, assuming we have an
 API or proposed API that allows an extension to respond to queries like
 what should the disposition of the link be.

 PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Should GYP files be UTF8 Encoded?

2009-06-27 Thread Daniel Cowx

No use case. I was just creating a new GYP file and wanted to know
what encoding to save the file as...that's all :-)

On Jun 26, 10:52 pm, Bradley Nelson bradnel...@google.com wrote:
 The intention was ascii AFAIK. Unless someone has a use case?
 -BradN



 On Fri, Jun 26, 2009 at 3:05 PM, Daniel Cowx daniel.c...@gmail.com wrote:

  Not that I'm aware of. Just wanted to confirm that intention is ASCII
  for now unless need arises.

  On Jun 26, 2:18 pm, Dan Kegel daniel.r.ke...@gmail.com wrote:
   On Fri, Jun 26, 2009 at 1:50 PM, Daniel Cowxdaniel.c...@gmail.com
  wrote:
Should GYP files be UTF8 Encoded?

   We can probably get away with ascii for now... are there any
   filenames that really need to be in a wider character set?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] How do I *undefine* a define in GYP?

2009-06-27 Thread Daniel Cowx

I have a third_party project that assumes that WIN32_LEAN_AND_MEAN is
*not* defined. Unfortunately, common.gypi defines it, so I'm getting
lots of compiler errors that I dont particularly want to track down.
What's teh best way to either a) undefine WIN32_LEAN_AND_MEAN from
common.gypi, or b) ensure that it's excluded when my project is
generated?

Thanks
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How do I *undefine* a define in GYP?

2009-06-27 Thread Daniel Cowx

Okay, I've figured out that I can do:

snip
'msvs_settings': {
  'VCCLCompilerTool': {
'UndefinePreprocessorDefinitions': 'WIN32_LEAN_AND_MEAN',
  },
},
/snip

Though this works, it will cause a command line warning D9025 to be
issued b/c you're undefining a previous define. I'd prefer if there
was a way to remove the inclusion of /D WIN32_LEAN_AND_MEAN from
common.gypi when my project is being generated. Is this possible?

On Jun 27, 1:26 pm, Daniel Cowx daniel.c...@gmail.com wrote:
 I have a third_party project that assumes that WIN32_LEAN_AND_MEAN is
 *not* defined. Unfortunately, common.gypi defines it, so I'm getting
 lots of compiler errors that I dont particularly want to track down.
 What's teh best way to either a) undefine WIN32_LEAN_AND_MEAN from
 common.gypi, or b) ensure that it's excluded when my project is
 generated?

 Thanks
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How do I *undefine* a define in GYP?

2009-06-27 Thread Daniel Cowx

Awesome. Thanks Brad!

On Jun 27, 1:52 pm, Bradley Nelson bradnel...@google.com wrote:
 You can undefine items with:
 'defines!: [
     'WIN32_LEAN_AND_MEAN',
 ],

 -BradN



 On Sat, Jun 27, 2009 at 1:47 PM, Daniel Cowx daniel.c...@gmail.com wrote:

  Okay, I've figured out that I can do:

  snip
  'msvs_settings': {
   'VCCLCompilerTool': {
     'UndefinePreprocessorDefinitions': 'WIN32_LEAN_AND_MEAN',
   },
  },
  /snip

  Though this works, it will cause a command line warning D9025 to be
  issued b/c you're undefining a previous define. I'd prefer if there
  was a way to remove the inclusion of /D WIN32_LEAN_AND_MEAN from
  common.gypi when my project is being generated. Is this possible?

  On Jun 27, 1:26 pm, Daniel Cowx daniel.c...@gmail.com wrote:
   I have a third_party project that assumes that WIN32_LEAN_AND_MEAN is
   *not* defined. Unfortunately, common.gypi defines it, so I'm getting
   lots of compiler errors that I dont particularly want to track down.
   What's teh best way to either a) undefine WIN32_LEAN_AND_MEAN from
   common.gypi, or b) ensure that it's excluded when my project is
   generated?

   Thanks
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Should GYP files be UTF8 Encoded?

2009-06-26 Thread Daniel Cowx

Not that I'm aware of. Just wanted to confirm that intention is ASCII
for now unless need arises.

On Jun 26, 2:18 pm, Dan Kegel daniel.r.ke...@gmail.com wrote:
 On Fri, Jun 26, 2009 at 1:50 PM, Daniel Cowxdaniel.c...@gmail.com wrote:
  Should GYP files be UTF8 Encoded?

 We can probably get away with ascii for now... are there any
 filenames that really need to be in a wider character set?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] How do you do an if-else statement in GYP?

2009-06-24 Thread Daniel Cowx

I'd like to be able to test 'my_variable' for 'Blort' and 'Blat', but
if neither of these are true, then I'd like to execute a default. The
problem is that with the syntax below, if 'my_variable' is 'Blort',
then both path A and C will be executed; which is wrong since each of
these paths should be mutually exclusive.

'conditions': [
  ['my_variable==Blort', {
# path A
  }],
  ['my_variable==Blat', {
# path B
  }, {
# path C (default)
  }],

To fix, I've tried re-arranging like so:

'conditions': [
  ['my_variable==Blort', {
# path A
  }, {
['my_variable==Blat', {
  # path B
}, {
  # path C (default)
}],
  }],

But this gives errors when you execute the gyp file (complains about a
comma). How do I accomplish this?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How do you do an if-else statement in GYP?

2009-06-24 Thread Daniel Cowx

Thanks for the prompt reply Brad. Cheers!

On Jun 24, 2:52 pm, Bradley Nelson bradnel...@google.com wrote:
 Hi Daniel:
 Currently you'd have to have another whole conditional inside:

 'conditions': [
  ['my_variable==Blort', {
    # path A
  }, {
    'conditions:
      ['my_variable==Blat', {
        # path B
      }, {
        # path C (default)
      }],
  }],

 -BradN



 On Wed, Jun 24, 2009 at 2:49 PM, Daniel Cowx daniel.c...@gmail.com wrote:

  I'd like to be able to test 'my_variable' for 'Blort' and 'Blat', but
  if neither of these are true, then I'd like to execute a default. The
  problem is that with the syntax below, if 'my_variable' is 'Blort',
  then both path A and C will be executed; which is wrong since each of
  these paths should be mutually exclusive.

  'conditions': [
   ['my_variable==Blort', {
     # path A
   }],
   ['my_variable==Blat', {
     # path B
   }, {
     # path C (default)
   }],

  To fix, I've tried re-arranging like so:

  'conditions': [
   ['my_variable==Blort', {
     # path A
   }, {
     ['my_variable==Blat', {
       # path B
     }, {
       # path C (default)
     }],
   }],

  But this gives errors when you execute the gyp file (complains about a
  comma). How do I accomplish this?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Is it possible to do a gclient sync without running hooks?

2009-06-23 Thread Daniel Cowx

When I run gclient sync, it automatically runs the hooks; which
causes various non-versioned files to get generated within my tree
(most notably *.vcproj and *.sln files, but there may be others). I'd
like to be able to do a sync *without* generating any files (i.e. so
that if I do a svn status immediately after a gclient sync, I see
a pristine unmodified tree). Short of going into src/DEPS and
commenting out the hooks section, can this be done?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: changing chrome_exe to chrome, converting chrome.exe to gyp

2009-06-18 Thread Daniel Cowx

I notice that when I load chrome.sln and do a build, not all the
dependencies are built anymore. For instance, theme_dll isn't built
(not listed in the proj deps), is this expected?

On Jun 18, 12:38 am, Steven Knight s...@chromium.org wrote:
 Okay, it looks like this change is sticking, at least until someone
 discovers Yet Another Unintended Side Effect.  So heed the warnings in the
 previous message, quoted below.
 Git users on Linux:  this requires an update to gyp to work properly, so
 make sure you gclient sync after you git pull, or whatever the right
 combination of commands is.  If you see Python stack traces from gyp
 accompanied by complaints about looking up a Dir as a File, make sure the
 tools/gyp subdirectory is at r521.

         --SK



 On Wed, Jun 17, 2009 at 9:25 PM, Steven Knight s...@chromium.org wrote:
  Heads up, again, dept.:
  In the next in an ongoing series of attempts to convert chrome.exe to gyp,
  I'm going to (try to) land two changes now that you should be aware of:

  1)  convert the 'app' target in the chrome.gyp file to being named
  'chrome'. 2)  actually convert the 'chrome_exe' project to using a
  gyp-generated chrome.vcproj file, instead of the checked-in one.

  When the first change lands, Mac developers will need to look for the new
  'chrome' target instead of 'app', and Linux developers who have been typing
  'hammer app' (or 'make app' if you're using the Makefile generator) will
  need to type 'hammer chrome' ('make chrome').  The default behaviors of
  building everything should be unaffected.

  When the second change lands, Visual Studio users will need to use the
  'chrome' project, instead of the former 'chrome_exe' project.  NOTE:
   because the underlying .vcproj file will be completely different, any local
  settings you've configured into the old 'chrome_exe' project will NOT be
  transferred to the new 'chrome' project.  You'll have to make a note of any
  custom settings before updating and re-apply them to the new 'chrome'
  project.

  There's always the chance that one or both of these changes will have to be
  reverted if unintended side effects pop up.  I'll send out confirming email
  with the final state of things.

          --SK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: changing chrome_exe to chrome, converting chrome.exe to gyp

2009-06-18 Thread Daniel Cowx

I'm also noticing that every time I do a build/debug, it's rebuilding
a LOT of the libraries even though nothing has changed.

On Jun 18, 12:43 pm, Daniel Cowx daniel.c...@gmail.com wrote:
 I notice that when I load chrome.sln and do a build, not all the
 dependencies are built anymore. For instance, theme_dll isn't built
 (not listed in the proj deps), is this expected?

 On Jun 18, 12:38 am, Steven Knight s...@chromium.org wrote:



  Okay, it looks like this change is sticking, at least until someone
  discovers Yet Another Unintended Side Effect.  So heed the warnings in the
  previous message, quoted below.
  Git users on Linux:  this requires an update to gyp to work properly, so
  make sure you gclient sync after you git pull, or whatever the right
  combination of commands is.  If you see Python stack traces from gyp
  accompanied by complaints about looking up a Dir as a File, make sure the
  tools/gyp subdirectory is at r521.

          --SK

  On Wed, Jun 17, 2009 at 9:25 PM, Steven Knight s...@chromium.org wrote:
   Heads up, again, dept.:
   In the next in an ongoing series of attempts to convert chrome.exe to gyp,
   I'm going to (try to) land two changes now that you should be aware of:

   1)  convert the 'app' target in the chrome.gyp file to being named
   'chrome'. 2)  actually convert the 'chrome_exe' project to using a
   gyp-generated chrome.vcproj file, instead of the checked-in one.

   When the first change lands, Mac developers will need to look for the new
   'chrome' target instead of 'app', and Linux developers who have been 
   typing
   'hammer app' (or 'make app' if you're using the Makefile generator) will
   need to type 'hammer chrome' ('make chrome').  The default behaviors of
   building everything should be unaffected.

   When the second change lands, Visual Studio users will need to use the
   'chrome' project, instead of the former 'chrome_exe' project.  NOTE:
    because the underlying .vcproj file will be completely different, any 
   local
   settings you've configured into the old 'chrome_exe' project will NOT be
   transferred to the new 'chrome' project.  You'll have to make a note of 
   any
   custom settings before updating and re-apply them to the new 'chrome'
   project.

   There's always the chance that one or both of these changes will have to 
   be
   reverted if unintended side effects pop up.  I'll send out confirming 
   email
   with the final state of things.

           --SK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How to change the cursor smoothly for a view

2009-06-16 Thread Daniel Cowx

Changing the default class cursor to NULL in widget_win.cc makes not
difference that I can see. Any other thoughts?

On Jun 13, 4:00 pm, Ben Goodger (Google) b...@chromium.org wrote:
 No problem. Get well soon!



 On Sat, Jun 13, 2009 at 3:55 PM, Daniel Cowxdaniel.c...@gmail.com wrote:

  Sure, I'll take care of this. It'll have to wait a few days though as
  I broke my index finger and I'm having a bit of a time typing right
  now. Hope that's cool.

  Cheers,
  Daniel

  On Jun 11, 2:55 pm, Ben Goodger (Google) b...@chromium.org wrote:
  It's in the class registration function in widget_win.cc

  -Ben

  On Thu, Jun 11, 2009 at 2:52 PM, Peter Kastingpkast...@google.com wrote:
   On Thu, Jun 11, 2009 at 2:48 PM, Ben Goodger (Google) b...@chromium.org
   wrote:

   Daniel, do you want to try making this change instead? It'll be pretty
   obvious to you if it doesn't work.

   Filed as crbug.com/13926 .  We should try and find if we set a value in 
   the
   WindowWin or WidgetWin (or somewhere) window creation calls and just 
   ditch
   it.
   Daniel, feel free to whip up a patch, if it works Ben or I can review.
   PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] How do you generate the VS project files from GYP without gclient?

2009-06-16 Thread Daniel Cowx

I know that you typically generate the project files via gclient
runhooks --force, but I'm curious to know how to generate the project
files via python directly, instead of via gclient.
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Is it possible to create branches?

2009-06-16 Thread Daniel Cowx

What is the recommended procedure for working on long/big features?

In the past, I've always created a separate branch and then done all
my work there. I then do regular integrations from trunk into my
branch to ensure that that my branch doesn't drift too far out of sync
with the trunk (i.e. so as to minimize the amount of merge work I have
to do when I'm ready to have my branch-specific changes reviewed and
merged back into the trunk). However, being that chromium is hosted on
a remote SVN server which I have no control over, what is the
recommended way of doing dev?

I'd really like to be able to do commits of my incremental work, but
without a sep branch to fiddle around with, how can I accomplish this?

All input and feedback welcome.

Cheers,
Daniel
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How to change the cursor smoothly for a view

2009-06-13 Thread Daniel Cowx

Sure, I'll take care of this. It'll have to wait a few days though as
I broke my index finger and I'm having a bit of a time typing right
now. Hope that's cool.

Cheers,
Daniel

On Jun 11, 2:55 pm, Ben Goodger (Google) b...@chromium.org wrote:
 It's in the class registration function in widget_win.cc

 -Ben



 On Thu, Jun 11, 2009 at 2:52 PM, Peter Kastingpkast...@google.com wrote:
  On Thu, Jun 11, 2009 at 2:48 PM, Ben Goodger (Google) b...@chromium.org
  wrote:

  Daniel, do you want to try making this change instead? It'll be pretty
  obvious to you if it doesn't work.

  Filed as crbug.com/13926 .  We should try and find if we set a value in the
  WindowWin or WidgetWin (or somewhere) window creation calls and just ditch
  it.
  Daniel, feel free to whip up a patch, if it works Ben or I can review.
  PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How to change the cursor smoothly for a view

2009-06-11 Thread Daniel Cowx

I've fixed this flickering problem by calling ::SetClassLong(hwnd,
GCL_HCURSOR, NULL) within my OnMouseEntered and then I reset it back
to the original class cursor in OnMouseExited. Not sure if this is a
reasonable solution or if you even think this is a problem. If so, I
can file a bug report and submit this change for review.

Cheers,
Daniel

On Jun 10, 10:08 pm, Daniel Cowx daniel.c...@gmail.com wrote:
 Actually, I see this flickering on a plain old view::Link as well. You
 can see it if you move the cursor back and forth on say the open
 source software link on the Chromium About dialog.

 On Jun 10, 9:42 pm, Ben Goodger (Google) b...@chromium.org wrote:



  I don't know, check WidgetWin.

  I would be slightly surprised though... we use GetCursorForPoint in a
  couple of places and haven't had issues...

  -Ben

  On Wed, Jun 10, 2009 at 9:39 PM, Daniel Cowxdaniel.c...@gmail.com wrote:

   Hi Ben,

   I'm getting the flickering even when I dont have any children in my
   view. I tried overridding GetViewForPoint for my view class and
   returning this, but I still get this flicker (with or without the
   label and bitmap being present).

   According to MSDN 
   @http://msdn.microsoft.com/en-us/library/ms648393(VS.85).aspx
   snip
   make sure the class cursor for the specified window's class is set to
   NULL. If the class cursor is not NULL, the system restores the class
   cursor each time the mouse is moved.
   /snip

   Could this be the culprit?

   On Jun 10, 9:05 pm, Ben Goodger (Google) b...@chromium.org wrote:
   You want to override GetViewForPoint on the container view and return
   this, rather than allowing the default implementation of the function
   to propagate into the base class impl.

   The reason you're getting flicker is that the default impl of
   RootView::UpdateCursor calls GetViewForPoint which ends up asking both
   the label and the text and the container view for the cursor, so its
   constantly getting reset as you move your mouse over it.

   -Ben

   On Wed, Jun 10, 2009 at 8:55 PM, Daniel Cowxdaniel.c...@gmail.com 
   wrote:

I've got a composite view that consists of a SkBitmap and
views::Label. I'd like to use IDC_HAND (hand cursor) for this
composite view so I've overridden view::GetCursorForPoint(...)

Though this kinda works, it causes the cursor to jitter/flicker as it
calls this function repeatedly based on the current cursor coordinates
within the view. How can I implement the desired functionality without
this flickering?

I've also tried overriding view::OnMouseEntered() and
view::OnMouseExited() and manually calling ::SetCursor() to no avail.
Can someone please shed some light.

Thanks,
Daniel
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Use of User Macros for RelativePath in vcproj files

2009-06-10 Thread Daniel Cowx

I figured it out and thought I'd share with others.

Turns out that you have to restart Visual Studio and reload the whole
solution for it to pickup the correct paths when you're using a macro.

Cheers,
Daniel

On Jun 9, 10:58 pm, Daniel Cowx daniel.c...@gmail.com wrote:
 I notice that some of our projects (e.g. chrome_resources) reference
 GRIT generated files via the RelativePath entry in the *.vcproj file
 via the user macro $(OutDir).

 Can someone please provide insight into how this was made to work?
 I've tried this quite a few times to no avail. Whenever I try to add a
 user macro (even copy and pasting what's in chrome_resources.vcproj)
 into my own project, Visual Studio complains that it can't resolve the
 path. What gives?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] How do you create a frameless window via views?

2009-06-10 Thread Daniel Cowx

I need to create a frameless window using views, but I've hit a bit of
a roadblock that I'm hoping someone can help me out with.

Using the documentation 
http://dev.chromium.org/developers/design-documents/views-windowing,
I can create a window (mods required though as this is out of date
with Ben's changes to views...btw, way to go Benmuch
appreciated!), but I dont want the frame. How can I remove it? I tried
subclass WindowWin and setting:

In ctor:
...
set_window_style(WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
WS_VISIBLE);
set_window_ex_style(WS_EX_TOOLWINDOW);
Init(NULL, view_-bounds());
...
But I get an assertion in the call to Init() b/c a non client view is
expected. How do I solve this?

Cheers,
Daniel
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] How to change the cursor smoothly for a view

2009-06-10 Thread Daniel Cowx

I've got a composite view that consists of a SkBitmap and
views::Label. I'd like to use IDC_HAND (hand cursor) for this
composite view so I've overridden view::GetCursorForPoint(...)

Though this kinda works, it causes the cursor to jitter/flicker as it
calls this function repeatedly based on the current cursor coordinates
within the view. How can I implement the desired functionality without
this flickering?

I've also tried overriding view::OnMouseEntered() and
view::OnMouseExited() and manually calling ::SetCursor() to no avail.
Can someone please shed some light.

Thanks,
Daniel
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How to change the cursor smoothly for a view

2009-06-10 Thread Daniel Cowx

Hi Ben,

I'm getting the flickering even when I dont have any children in my
view. I tried overridding GetViewForPoint for my view class and
returning this, but I still get this flicker (with or without the
label and bitmap being present).

According to MSDN @ http://msdn.microsoft.com/en-us/library/ms648393(VS.85).aspx
snip
make sure the class cursor for the specified window's class is set to
NULL. If the class cursor is not NULL, the system restores the class
cursor each time the mouse is moved.
/snip

Could this be the culprit?

On Jun 10, 9:05 pm, Ben Goodger (Google) b...@chromium.org wrote:
 You want to override GetViewForPoint on the container view and return
 this, rather than allowing the default implementation of the function
 to propagate into the base class impl.

 The reason you're getting flicker is that the default impl of
 RootView::UpdateCursor calls GetViewForPoint which ends up asking both
 the label and the text and the container view for the cursor, so its
 constantly getting reset as you move your mouse over it.

 -Ben



 On Wed, Jun 10, 2009 at 8:55 PM, Daniel Cowxdaniel.c...@gmail.com wrote:

  I've got a composite view that consists of a SkBitmap and
  views::Label. I'd like to use IDC_HAND (hand cursor) for this
  composite view so I've overridden view::GetCursorForPoint(...)

  Though this kinda works, it causes the cursor to jitter/flicker as it
  calls this function repeatedly based on the current cursor coordinates
  within the view. How can I implement the desired functionality without
  this flickering?

  I've also tried overriding view::OnMouseEntered() and
  view::OnMouseExited() and manually calling ::SetCursor() to no avail.
  Can someone please shed some light.

  Thanks,
  Daniel
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How to change the cursor smoothly for a view

2009-06-10 Thread Daniel Cowx

Actually, I see this flickering on a plain old view::Link as well. You
can see it if you move the cursor back and forth on say the open
source software link on the Chromium About dialog.

On Jun 10, 9:42 pm, Ben Goodger (Google) b...@chromium.org wrote:
 I don't know, check WidgetWin.

 I would be slightly surprised though... we use GetCursorForPoint in a
 couple of places and haven't had issues...

 -Ben



 On Wed, Jun 10, 2009 at 9:39 PM, Daniel Cowxdaniel.c...@gmail.com wrote:

  Hi Ben,

  I'm getting the flickering even when I dont have any children in my
  view. I tried overridding GetViewForPoint for my view class and
  returning this, but I still get this flicker (with or without the
  label and bitmap being present).

  According to MSDN 
  @http://msdn.microsoft.com/en-us/library/ms648393(VS.85).aspx
  snip
  make sure the class cursor for the specified window's class is set to
  NULL. If the class cursor is not NULL, the system restores the class
  cursor each time the mouse is moved.
  /snip

  Could this be the culprit?

  On Jun 10, 9:05 pm, Ben Goodger (Google) b...@chromium.org wrote:
  You want to override GetViewForPoint on the container view and return
  this, rather than allowing the default implementation of the function
  to propagate into the base class impl.

  The reason you're getting flicker is that the default impl of
  RootView::UpdateCursor calls GetViewForPoint which ends up asking both
  the label and the text and the container view for the cursor, so its
  constantly getting reset as you move your mouse over it.

  -Ben

  On Wed, Jun 10, 2009 at 8:55 PM, Daniel Cowxdaniel.c...@gmail.com wrote:

   I've got a composite view that consists of a SkBitmap and
   views::Label. I'd like to use IDC_HAND (hand cursor) for this
   composite view so I've overridden view::GetCursorForPoint(...)

   Though this kinda works, it causes the cursor to jitter/flicker as it
   calls this function repeatedly based on the current cursor coordinates
   within the view. How can I implement the desired functionality without
   this flickering?

   I've also tried overriding view::OnMouseEntered() and
   view::OnMouseExited() and manually calling ::SetCursor() to no avail.
   Can someone please shed some light.

   Thanks,
   Daniel
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Is there any way to change the default (i.e. default.dll) theme DLL?

2009-06-09 Thread Daniel Cowx

ResourceBundle::LoadThemeResources() always loads default.dll from
DIR_THEMES. Other than overriding DIR_THEMES via the PathService, is
there another way to change the name of the DLL?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Is there any way to change the default (i.e. default.dll) theme DLL?

2009-06-09 Thread Daniel Cowx

Yeah, I could change the value in resource_bundle_win.cc and wrap it
in a PP directive for my own build, but it becomes such a pain to
maintain this over time (merging gets annoying). It would be easier if
I didnt have to do this via a PP directive for my own build.

Question:
Does anyone have objections to including a default param in the call
to ResourceBundle::LoadThemeResources() that causes default.dll to be
loaded by default? Alternatively, since default params are frowned
upon, I could provide a wrapper function in ResourceBundle to
accomplish the same end.

-Daniel

On Jun 9, 9:36 pm, dhhwai dhh...@gmail.com wrote:
 I think the answer is no for an official compile of Google Chrome.
 The default.dll is hardcoded in app/resource_bundle_win.cc.

 But for your own compile, does changing the hardcoded value in app/
 resource_bundle_win.cc count as a solution?

 On Jun 9, 9:28 pm, Daniel Cowx daniel.c...@gmail.com wrote:



  ResourceBundle::LoadThemeResources() always loads default.dll from
  DIR_THEMES. Other than overriding DIR_THEMES via the PathService, is
  there another way to change the name of the DLL?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Use of User Macros for RelativePath in vcproj files

2009-06-09 Thread Daniel Cowx

I notice that some of our projects (e.g. chrome_resources) reference
GRIT generated files via the RelativePath entry in the *.vcproj file
via the user macro $(OutDir).

Can someone please provide insight into how this was made to work?
I've tried this quite a few times to no avail. Whenever I try to add a
user macro (even copy and pasting what's in chrome_resources.vcproj)
into my own project, Visual Studio complains that it can't resolve the
path. What gives?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] HTTP POST via net package?

2009-06-08 Thread Daniel Cowx

How can I upload multipart form data (including a file) via HTTP POST?
Is there something already written in the net package (or elsewhere)
for this task? If so, can someone please point me to what class to
use.

Thanks,
Daniel
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---