diff options
author | msw <msw@chromium.org> | 2016-03-03 16:55:30 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-04 00:56:52 +0000 |
commit | 141c6b246d3cbb3212f76602ca40915c152af89a (patch) | |
tree | 868d70ec80d26dbf91ccda25ef1d295947a04c3b /ash/root_window_controller.cc | |
parent | 243b2e8fb9cdd09cf9ec11aa2a68e26c76e00ee7 (diff) | |
download | chromium_src-141c6b246d3cbb3212f76602ca40915c152af89a.zip chromium_src-141c6b246d3cbb3212f76602ca40915c152af89a.tar.gz chromium_src-141c6b246d3cbb3212f76602ca40915c152af89a.tar.bz2 |
Simplify ash context menu creation.
Remove ash::ShelfItemDelegate::CreateContextMenu.
Use ash::ShellDelegate::CreateContextMenu instead.
(this is what all the impls do anyway...)
Don't pass the ShelfItemDelegate, look up as needed.
Only create |extension_items_| as needed.
Don't ask |extension_items_| for local enabled/checked state.
Remove non-cros logic from LauncherContextMenu.
Support null in GetAppIDForShelfID for app list button.
TODO: Refine menu model creation pattern to support mash.
BUG=557406
TEST=No behavior changes or regressions.
R=sky@chromium.org
Review URL: https://codereview.chromium.org/1762813002
Cr-Commit-Position: refs/heads/master@{#379158}
Diffstat (limited to 'ash/root_window_controller.cc')
-rw-r--r-- | ash/root_window_controller.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc index 1ae8355..4d021bf 100644 --- a/ash/root_window_controller.cc +++ b/ash/root_window_controller.cc @@ -558,10 +558,10 @@ SystemTray* RootWindowController::GetSystemTray() { void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen, ui::MenuSourceType source_type) { - DCHECK(Shell::GetInstance()->delegate()); + ShellDelegate* delegate = Shell::GetInstance()->delegate(); + DCHECK(delegate); scoped_ptr<ui::MenuModel> menu_model( - Shell::GetInstance()->delegate()->CreateContextMenu( - GetRootWindow(), NULL, NULL)); + delegate->CreateContextMenu(GetRootWindow(), nullptr)); if (!menu_model) return; |