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

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

Issue 2545923004: Remove LauncherItemController::type; use ShelfItems::type. (Closed)
Patch Set: Rebase; remove new LauncherItemController::TYPE_APP check. Created 4 years 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_APP_WINDOW_LAUNCHER_ITEM_CONTRO LLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTRO LLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTRO LLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CONTRO LLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" 12 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 class AppWindow; 15 class AppWindow;
16 } 16 }
17 17
18 class ChromeLauncherController; 18 class ChromeLauncherController;
19 19
20 class ExtensionAppWindowLauncherItemController 20 class ExtensionAppWindowLauncherItemController
21 : public AppWindowLauncherItemController { 21 : public AppWindowLauncherItemController {
22 public: 22 public:
23 ExtensionAppWindowLauncherItemController( 23 ExtensionAppWindowLauncherItemController(
24 Type type,
25 const std::string& app_id, 24 const std::string& app_id,
26 const std::string& launch_id, 25 const std::string& launch_id,
27 ChromeLauncherController* controller); 26 ChromeLauncherController* controller);
28 27
29 ~ExtensionAppWindowLauncherItemController() override; 28 ~ExtensionAppWindowLauncherItemController() override;
30 29
31 void AddAppWindow(extensions::AppWindow* app_window); 30 void AddAppWindow(extensions::AppWindow* app_window);
32 31
33 // LauncherItemController overrides: 32 // LauncherItemController overrides:
34 ChromeLauncherAppMenuItems GetApplicationList(int event_flags) override; 33 ChromeLauncherAppMenuItems GetApplicationList(int event_flags) override;
35 ash::ShelfItemDelegate::PerformedAction ItemSelected( 34 ash::ShelfItemDelegate::PerformedAction ItemSelected(
36 const ui::Event& event) override; 35 const ui::Event& event) override;
37 ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) override; 36 ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) override;
38 37
39 protected: 38 protected:
40 // AppWindowLauncherItemController: 39 // AppWindowLauncherItemController:
41 void OnWindowRemoved(ui::BaseWindow* window) override; 40 void OnWindowRemoved(ui::BaseWindow* window) override;
42 41
43 private: 42 private:
44 using WindowToAppWindow = 43 using WindowToAppWindow =
45 std::map<const ui::BaseWindow*, extensions::AppWindow*>; 44 std::map<const ui::BaseWindow*, extensions::AppWindow*>;
46 45
47 WindowToAppWindow window_to_app_window_; 46 WindowToAppWindow window_to_app_window_;
48 47
49 DISALLOW_COPY_AND_ASSIGN(ExtensionAppWindowLauncherItemController); 48 DISALLOW_COPY_AND_ASSIGN(ExtensionAppWindowLauncherItemController);
50 }; 49 };
51 50
52 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CON TROLLER_H_ 51 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_EXTENSION_APP_WINDOW_LAUNCHER_ITEM_CON TROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698