Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2979)

Unified Diff: ash/shell/context_menu.h

Issue 1812013003: Pass shelf instances, not root windows, for ash context menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call OnShelfAlignmentChanged after LayoutShelf. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.cc ('k') | ash/shell/context_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/context_menu.h
diff --git a/ash/shell/context_menu.h b/ash/shell/context_menu.h
index 072e457c39822f7e22a95192fad42dbde1b110d0..b604884f56d9d845e61e81d2bbbcea7b7c769355 100644
--- a/ash/shell/context_menu.h
+++ b/ash/shell/context_menu.h
@@ -6,22 +6,20 @@
#define ASH_SHELL_CONTEXT_MENU_H_
#include "ash/shelf/shelf_alignment_menu.h"
-#include "ash/shelf/shelf_types.h"
#include "base/macros.h"
#include "ui/base/models/simple_menu_model.h"
-namespace aura {
-class RootWindow;
-}
-
namespace ash {
+
+class Shelf;
+
namespace shell {
-// Context menu for the ash_shell.
+// Context menu for the ash shell.
class ContextMenu : public ui::SimpleMenuModel,
public ui::SimpleMenuModel::Delegate {
public:
- explicit ContextMenu(aura::Window* root);
+ explicit ContextMenu(Shelf* shelf);
~ContextMenu() override;
// ui::SimpleMenuModel::Delegate overrides:
@@ -37,8 +35,7 @@ class ContextMenu : public ui::SimpleMenuModel,
MENU_ALIGNMENT_MENU,
};
- aura::Window* root_window_;
-
+ Shelf* shelf_;
ShelfAlignmentMenu alignment_menu_;
DISALLOW_COPY_AND_ASSIGN(ContextMenu);
« no previous file with comments | « ash/shell.cc ('k') | ash/shell/context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698