| Index: chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h
|
| diff --git a/chrome/browser/ui/app_list/extension_app_context_menu.h b/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h
|
| similarity index 36%
|
| copy from chrome/browser/ui/app_list/extension_app_context_menu.h
|
| copy to chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h
|
| index 39b8f37a239bf4dd8979d8744184376c4931925c..4c7eec661243f7ab680010133b12d45383273baf 100644
|
| --- a/chrome/browser/ui/app_list/extension_app_context_menu.h
|
| +++ b/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h
|
| @@ -2,59 +2,46 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_CONTEXT_MENU_H_
|
| -#define CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_CONTEXT_MENU_H_
|
| -
|
| -#include <string>
|
| +#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/app_list/app_context_menu.h"
|
| +#include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
|
| +
|
| +class ChromeLauncherController;
|
|
|
| -class AppListControllerDelegate;
|
| -class Profile;
|
| +namespace ash {
|
| +class Shelf;
|
| +struct ShelfItem;
|
| +}
|
|
|
| namespace extensions {
|
| class ContextMenuMatcher;
|
| }
|
|
|
| -namespace app_list {
|
| -
|
| -class AppContextMenuDelegate;
|
| -
|
| -class ExtensionAppContextMenu : public AppContextMenu {
|
| +// Class for context menu which is shown for a regular extension item in the
|
| +// shelf.
|
| +class ExtensionLauncherContextMenu : public LauncherContextMenu {
|
| public:
|
| - ExtensionAppContextMenu(AppContextMenuDelegate* delegate,
|
| - Profile* profile,
|
| - const std::string& app_id,
|
| - AppListControllerDelegate* controller);
|
| - ~ExtensionAppContextMenu() override;
|
| -
|
| - static void DisableInstalledExtensionCheckForTesting(bool disable);
|
| -
|
| - // AppListContextMenu overrides:
|
| - ui::MenuModel* GetMenuModel() override;
|
| - void BuildMenu(ui::SimpleMenuModel* menu_model) override;
|
| + ExtensionLauncherContextMenu(ChromeLauncherController* controller,
|
| + const ash::ShelfItem* item,
|
| + ash::Shelf* shelf);
|
| + ~ExtensionLauncherContextMenu() override;
|
|
|
| // ui::SimpleMenuModel::Delegate overrides:
|
| - base::string16 GetLabelForCommandId(int command_id) const override;
|
| 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;
|
|
|
| - void set_is_platform_app(bool is_platform_app) {
|
| - is_platform_app_ = is_platform_app;
|
| - }
|
| -
|
| private:
|
| - bool is_platform_app_ = false;
|
| + void Init();
|
|
|
| - scoped_ptr<extensions::ContextMenuMatcher> extension_menu_items_;
|
| + scoped_ptr<extensions::ContextMenuMatcher> extension_items_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(ExtensionAppContextMenu);
|
| + DISALLOW_COPY_AND_ASSIGN(ExtensionLauncherContextMenu);
|
| };
|
|
|
| -} // namespace app_list
|
| -
|
| -#endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_CONTEXT_MENU_H_
|
| +#endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_LAUNCHER_CONTEXT_MENU_H_
|
|
|