Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ | |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" | |
| 11 | |
| 12 class ChromeLauncherController; | |
| 13 | |
| 14 namespace ash { | |
| 15 class Shelf; | |
| 16 struct ShelfItem; | |
| 17 } | |
| 18 | |
| 19 namespace extensions { | |
| 20 class ContextMenuMatcher; | |
| 21 } | |
| 22 | |
| 23 // Class for context menu which is shown for a regular extension item in the | |
| 24 // shelf. | |
| 25 class ExtensionLauncherContextMenu : public LauncherContextMenu { | |
| 26 public: | |
| 27 ExtensionLauncherContextMenu(ChromeLauncherController* controller, | |
| 28 const ash::ShelfItem* item, | |
| 29 ash::Shelf* shelf); | |
| 30 ~ExtensionLauncherContextMenu() override; | |
|
stevenjb
2016/04/06 00:06:49
blank line
lgcheng
2016/04/06 17:02:42
Done.
| |
| 31 void Init(); | |
|
stevenjb
2016/04/06 00:06:49
private or comment
blank line
lgcheng
2016/04/06 17:02:42
Done.
| |
| 32 // ui::SimpleMenuModel::Delegate overrides: | |
| 33 bool IsItemForCommandIdDynamic(int command_id) const override; | |
| 34 base::string16 GetLabelForCommandId(int command_id) const override; | |
| 35 bool IsCommandIdChecked(int command_id) const override; | |
| 36 bool IsCommandIdEnabled(int command_id) const override; | |
| 37 void ExecuteCommand(int command_id, int event_flags) override; | |
| 38 | |
| 39 private: | |
| 40 scoped_ptr<extensions::ContextMenuMatcher> extension_items_; | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(ExtensionLauncherContextMenu); | |
| 43 }; | |
| 44 | |
| 45 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ | |
| OLD | NEW |