Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h |
| diff --git a/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h b/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9711e8e03d0924e3d330ce69dfce170a9185524f |
| --- /dev/null |
| +++ b/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ |
| +#define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" |
| + |
| +class ChromeLauncherController; |
| + |
| +namespace ash { |
| +class Shelf; |
| +struct ShelfItem; |
| +} |
| + |
| +namespace extensions { |
| +class ContextMenuMatcher; |
| +} |
| + |
| +// Class for context menu which is shown for a regular extension item in the |
| +// shelf. |
| +class ExtensionLauncherContextMenu : public LauncherContextMenu { |
| + public: |
| + ExtensionLauncherContextMenu(ChromeLauncherController* controller, |
| + const ash::ShelfItem* item, |
| + ash::Shelf* shelf); |
| + ~ExtensionLauncherContextMenu() override; |
|
stevenjb
2016/04/06 00:06:49
blank line
lgcheng
2016/04/06 17:02:42
Done.
|
| + void Init(); |
|
stevenjb
2016/04/06 00:06:49
private or comment
blank line
lgcheng
2016/04/06 17:02:42
Done.
|
| + // ui::SimpleMenuModel::Delegate overrides: |
| + bool IsItemForCommandIdDynamic(int command_id) const override; |
| + base::string16 GetLabelForCommandId(int command_id) const override; |
| + bool IsCommandIdChecked(int command_id) const override; |
| + bool IsCommandIdEnabled(int command_id) const override; |
| + void ExecuteCommand(int command_id, int event_flags) override; |
| + |
| + private: |
| + scoped_ptr<extensions::ContextMenuMatcher> extension_items_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ExtensionLauncherContextMenu); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_ |