diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 21:27:33 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 21:27:33 +0000 |
commit | d7509b924091be8c5130bad343055dfe39c306d3 (patch) | |
tree | 4d521b0eb45fab279905423ffcc25ec94b594402 /views | |
parent | c6d97ad27c69d7909c55ebbec523c3df10ec08a0 (diff) | |
download | chromium_src-d7509b924091be8c5130bad343055dfe39c306d3.zip chromium_src-d7509b924091be8c5130bad343055dfe39c306d3.tar.gz chromium_src-d7509b924091be8c5130bad343055dfe39c306d3.tar.bz2 |
Remove some dependencies on Windows-specific files in BrowserView. The usage
of WindowWin was unnecessary so I removed it. I created a function in Menu
go get the system menu so that can be ported inside views.
Review URL: http://codereview.chromium.org/113785
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16797 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/menu/menu.h | 4 | ||||
-rw-r--r-- | views/controls/menu/menu_win.cc | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/views/controls/menu/menu.h b/views/controls/menu/menu.h index e07d7e5..0017ac1 100644 --- a/views/controls/menu/menu.h +++ b/views/controls/menu/menu.h @@ -180,6 +180,10 @@ class Menu { AnchorPoint anchor, gfx::NativeView parent); + // Creates a new menu with the contents of the system menu for the given + // parent window. The caller owns the returned pointer. + static Menu* GetSystemMenu(gfx::NativeView parent); + void set_delegate(Delegate* delegate) { delegate_ = delegate; } Delegate* delegate() const { return delegate_; } diff --git a/views/controls/menu/menu_win.cc b/views/controls/menu/menu_win.cc index eab1816..84c3fac 100644 --- a/views/controls/menu/menu_win.cc +++ b/views/controls/menu/menu_win.cc @@ -236,6 +236,11 @@ Menu* Menu::Create(Delegate* delegate, return new MenuWin(delegate, anchor, parent); } +// static +Menu* Menu::GetSystemMenu(gfx::NativeView parent) { + return new views::MenuWin(::GetSystemMenu(parent, FALSE)); +} + MenuWin::MenuWin(Delegate* d, AnchorPoint anchor, HWND owner) : Menu(d, anchor), menu_(CreatePopupMenu()), |