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

Unified Diff: ash/shelf/shelf_view.h

Issue 295903006: Retain the menu models in the class along with the menu runner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.h
diff --git a/ash/shelf/shelf_view.h b/ash/shelf/shelf_view.h
index d909d9160d5ab4371437984c07cb0f4c59e6e7c7..846ddb878510096011a0013610417fe9cbcb57cc 100644
--- a/ash/shelf/shelf_view.h
+++ b/ash/shelf/shelf_view.h
@@ -19,9 +19,12 @@
#include "ui/views/focus/focus_manager.h"
#include "ui/views/view.h"
+namespace ui {
+class MenuModel;
+}
+
namespace views {
class BoundsAnimator;
-class MenuModelAdapter;
class MenuRunner;
class ViewModel;
}
@@ -290,11 +293,11 @@ class ASH_EXPORT ShelfView : public views::View,
const gfx::Point& point,
ui::MenuSourceType source_type) OVERRIDE;
- // Show either a context or normal click menu of given |menu_model_adapter|.
+ // Show either a context or normal click menu of given |menu_model|.
// If |context_menu| is set, the displayed menu is a context menu and not
// a menu listing one or more running applications.
// The |click_point| is only used for |context_menu|'s.
- void ShowMenu(scoped_ptr<views::MenuModelAdapter> menu_model_adapter,
+ void ShowMenu(ui::MenuModel* menu_model,
views::View* source,
const gfx::Point& click_point,
bool context_menu,
@@ -365,6 +368,10 @@ class ASH_EXPORT ShelfView : public views::View,
scoped_ptr<views::FocusSearch> focus_search_;
+ scoped_ptr<ui::MenuModel> list_menu_model_;
+
+ scoped_ptr<ui::MenuModel> context_menu_model_;
+
scoped_ptr<views::MenuRunner> launcher_menu_runner_;
ObserverList<ShelfIconObserver> observers_;
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698