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

Side by Side Diff: ui/app_list/views/app_list_menu_views.h

Issue 20656002: Add profile selector menu to app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo app_list_service_mac changes Created 7 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_MENU_VIEWS_H_ 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_MENU_VIEWS_H_
6 #define UI_APP_LIST_VIEWS_APP_LIST_MENU_VIEWS_H_ 6 #define UI_APP_LIST_VIEWS_APP_LIST_MENU_VIEWS_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/app_list/app_list_menu.h" 9 #include "ui/app_list/app_list_menu.h"
10 #include "ui/views/controls/menu/menu_model_adapter.h" 10 #include "ui/views/controls/menu/menu_model_adapter.h"
11 #include "ui/views/controls/menu/menu_runner.h" 11 #include "ui/views/controls/menu/menu_runner.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Point; 14 class Point;
15 } 15 }
16 16
17 namespace views { 17 namespace views {
18 class MenuButton; 18 class MenuButton;
19 } 19 }
20 20
21 namespace app_list { 21 namespace app_list {
22 22
23 class AppListModel;
24
23 // Views implementation of the app list menu. 25 // Views implementation of the app list menu.
24 // TODO(benwells): We should consider moving this into Chrome. 26 // TODO(benwells): We should consider moving this into Chrome.
25 class AppListMenuViews : public app_list::AppListMenu { 27 class AppListMenuViews : public app_list::AppListMenu {
26 public: 28 public:
27 explicit AppListMenuViews(AppListViewDelegate* delegate); 29 explicit AppListMenuViews(AppListViewDelegate* delegate,
tapted 2013/07/31 05:43:53 nit: explicit not needed
calamity 2013/08/01 08:35:45 Done.
30 AppListModel* model);
28 virtual ~AppListMenuViews(); 31 virtual ~AppListMenuViews();
29 32
30 void RunMenuAt(views::MenuButton* button, const gfx::Point& point); 33 void RunMenuAt(views::MenuButton* button, const gfx::Point& point);
31 void Cancel(); 34 void Cancel();
32 35
33 private: 36 private:
34 // The context menu itself and its contents. 37 // The context menu itself and its contents.
35 scoped_ptr<views::MenuModelAdapter> menu_delegate_; 38 scoped_ptr<views::MenuModelAdapter> menu_delegate_;
36 views::MenuItemView* menu_; // Owned by menu_runner_. 39 views::MenuItemView* menu_; // Owned by menu_runner_.
37 scoped_ptr<views::MenuRunner> menu_runner_; 40 scoped_ptr<views::MenuRunner> menu_runner_;
38 41
39 DISALLOW_COPY_AND_ASSIGN(AppListMenuViews); 42 DISALLOW_COPY_AND_ASSIGN(AppListMenuViews);
40 }; 43 };
41 44
42 } // namespace app_list 45 } // namespace app_list
43 46
44 #endif // UI_APP_LIST_VIEWS_APP_LIST_MENU_VIEWS_H_ 47 #endif // UI_APP_LIST_VIEWS_APP_LIST_MENU_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698