diff options
author | andresantoso@chromium.org <andresantoso@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-15 00:42:23 +0000 |
---|---|---|
committer | andresantoso@chromium.org <andresantoso@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-15 00:42:23 +0000 |
commit | 0a37a5d254ce40eb5a16e886a53f907877b0ca49 (patch) | |
tree | 368fec48373e40c4dd98f672b82a6b8f49796ea8 /ash/shell | |
parent | 0bd3c7cec1fa9c3599838d402e71987d55dd4c1a (diff) | |
download | chromium_src-0a37a5d254ce40eb5a16e886a53f907877b0ca49.zip chromium_src-0a37a5d254ce40eb5a16e886a53f907877b0ca49.tar.gz chromium_src-0a37a5d254ce40eb5a16e886a53f907877b0ca49.tar.bz2 |
MacViews: Move menu run types parameter to constructor.
This is in preparation for supporting running native Cocoa context menus to
support Services (https://codereview.chromium.org/331993009/).
The parameter is moved to the constructor so that we can know which kind of
MenuRunnerImpl to create at construction time.
TBR=sky@chromium.org
BUG=388455
Review URL: https://codereview.chromium.org/390183002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r-- | ash/shell/window_type_launcher.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc index dcf113d..78e6b0a 100644 --- a/ash/shell/window_type_launcher.cc +++ b/ash/shell/window_type_launcher.cc @@ -386,15 +386,13 @@ void WindowTypeLauncher::ShowContextMenuForView( base::ASCIIToUTF16("Toggle FullScreen"), MenuItemView::NORMAL); // MenuRunner takes ownership of root. - menu_runner_.reset(new MenuRunner(root)); - if (menu_runner_->RunMenuAt( - GetWidget(), - NULL, - gfx::Rect(point, gfx::Size()), - views::MENU_ANCHOR_TOPLEFT, - source_type, - MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == - MenuRunner::MENU_DELETED) { + menu_runner_.reset(new MenuRunner( + root, MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU)); + if (menu_runner_->RunMenuAt(GetWidget(), + NULL, + gfx::Rect(point, gfx::Size()), + views::MENU_ANCHOR_TOPLEFT, + source_type) == MenuRunner::MENU_DELETED) { return; } } |