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

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

Issue 2039543002: Getting rid of ChromeLauncherController::model(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing git cl dependencies 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
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;
18 } 19 }
19 20
20 namespace extensions { 21 namespace extensions {
21 class ContextMenuMatcher; 22 class ContextMenuMatcher;
22 } 23 }
23 24
24 // Class for context menu which is shown for a regular extension item in the 25 // Class for context menu which is shown for a regular extension item in the
25 // shelf. 26 // shelf.
26 class ExtensionLauncherContextMenu : public LauncherContextMenu { 27 class ExtensionLauncherContextMenu : public LauncherContextMenu {
27 public: 28 public:
28 ExtensionLauncherContextMenu(ChromeLauncherController* controller, 29 ExtensionLauncherContextMenu(ChromeLauncherController* controller,
29 const ash::ShelfItem* item, 30 const ash::ShelfItem* item,
30 ash::Shelf* shelf); 31 ash::Shelf* shelf);
31 ~ExtensionLauncherContextMenu() override; 32 ~ExtensionLauncherContextMenu() override;
32 33
33 // ui::SimpleMenuModel::Delegate overrides: 34 // ui::SimpleMenuModel::Delegate overrides:
34 bool IsItemForCommandIdDynamic(int command_id) const override; 35 bool IsItemForCommandIdDynamic(int command_id) const override;
35 base::string16 GetLabelForCommandId(int command_id) const override; 36 base::string16 GetLabelForCommandId(int command_id) const override;
36 bool IsCommandIdChecked(int command_id) const override; 37 bool IsCommandIdChecked(int command_id) const override;
37 bool IsCommandIdEnabled(int command_id) const override; 38 bool IsCommandIdEnabled(int command_id) const override;
38 void ExecuteCommand(int command_id, int event_flags) override; 39 void ExecuteCommand(int command_id, int event_flags) override;
39 40
40 private: 41 private:
41 void Init(); 42 void Init();
42 43
43 std::unique_ptr<extensions::ContextMenuMatcher> extension_items_; 44 std::unique_ptr<extensions::ContextMenuMatcher> extension_items_;
45 ash::ShelfModel* shelf_model_;
44 46
45 DISALLOW_COPY_AND_ASSIGN(ExtensionLauncherContextMenu); 47 DISALLOW_COPY_AND_ASSIGN(ExtensionLauncherContextMenu);
46 }; 48 };
47 49
48 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ 50 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698