| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 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 "ash/shelf/shelf_item_types.h" |
| 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" |
| 12 |
| 13 class ChromeLauncherController; |
| 14 |
| 15 namespace extensions { |
| 16 class ContextMenuMatcher; |
| 17 } |
| 18 |
| 19 // Class for context menu shown for a regular extension item in the shelf |
| 20 class ExtensionLauncherContextMenu : public LauncherContextMenu { |
| 21 public: |
| 22 ExtensionLauncherContextMenu(ChromeLauncherController* controller, |
| 23 const ash::ShelfItem* item, |
| 24 ash::Shelf* shelf); |
| 25 ~ExtensionLauncherContextMenu() override; |
| 26 // LauncherContextMenu overrides: |
| 27 void Init() override; |
| 28 // ui::SimpleMenuModel::Delegate overrides: |
| 29 base::string16 GetLabelForCommandId(int command_id) const override; |
| 30 bool IsCommandIdChecked(int command_id) const override; |
| 31 bool IsCommandIdEnabled(int command_id) const override; |
| 32 void ExecuteCommand(int command_id, int event_flags) override; |
| 33 |
| 34 private: |
| 35 scoped_ptr<extensions::ContextMenuMatcher> extension_items_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(ExtensionLauncherContextMenu); |
| 38 }; |
| 39 |
| 40 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ |
| OLD | NEW |