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

Side by Side Diff: chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h

Issue 2039253002: Removing ash::Shelf::shelf_model() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_controller_shelf_model_2
Patch Set: Another rebase. Created 4 years, 6 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
« no previous file with comments | « ash/shelf/shelf.cc ('k') | chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 11 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
12 12
13 class ChromeLauncherController; 13 class ChromeLauncherController;
14 14
15 namespace ash { 15 namespace ash {
16 class Shelf; 16 class Shelf;
17 struct ShelfItem; 17 struct ShelfItem;
18 class ShelfModel;
19 } 18 }
20 19
21 namespace extensions { 20 namespace extensions {
22 class ContextMenuMatcher; 21 class ContextMenuMatcher;
23 } 22 }
24 23
25 // Class for context menu which is shown for a regular extension item in the 24 // Class for context menu which is shown for a regular extension item in the
26 // shelf. 25 // shelf.
27 class ExtensionLauncherContextMenu : public LauncherContextMenu { 26 class ExtensionLauncherContextMenu : public LauncherContextMenu {
28 public: 27 public:
29 ExtensionLauncherContextMenu(ChromeLauncherController* controller, 28 ExtensionLauncherContextMenu(ChromeLauncherController* controller,
30 const ash::ShelfItem* item, 29 const ash::ShelfItem* item,
31 ash::Shelf* shelf); 30 ash::Shelf* shelf);
32 ~ExtensionLauncherContextMenu() override; 31 ~ExtensionLauncherContextMenu() override;
33 32
34 // ui::SimpleMenuModel::Delegate overrides: 33 // ui::SimpleMenuModel::Delegate overrides:
35 bool IsItemForCommandIdDynamic(int command_id) const override; 34 bool IsItemForCommandIdDynamic(int command_id) const override;
36 base::string16 GetLabelForCommandId(int command_id) const override; 35 base::string16 GetLabelForCommandId(int command_id) const override;
37 bool IsCommandIdChecked(int command_id) const override; 36 bool IsCommandIdChecked(int command_id) const override;
38 bool IsCommandIdEnabled(int command_id) const override; 37 bool IsCommandIdEnabled(int command_id) const override;
39 void ExecuteCommand(int command_id, int event_flags) override; 38 void ExecuteCommand(int command_id, int event_flags) override;
40 39
41 private: 40 private:
42 void Init(); 41 void Init();
43 42
44 std::unique_ptr<extensions::ContextMenuMatcher> extension_items_; 43 std::unique_ptr<extensions::ContextMenuMatcher> extension_items_;
45 ash::ShelfModel* shelf_model_;
46 44
47 DISALLOW_COPY_AND_ASSIGN(ExtensionLauncherContextMenu); 45 DISALLOW_COPY_AND_ASSIGN(ExtensionLauncherContextMenu);
48 }; 46 };
49 47
50 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ 48 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf.cc ('k') | chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698