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

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

Issue 2052013002: Adding ChromeLauncherController interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome_launcher_smaller_api
Patch Set: Rebase Created 4 years, 6 months 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_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 13 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
14 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" 14 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h"
15 #include "mojo/public/cpp/bindings/binding.h" 15 #include "mojo/public/cpp/bindings/binding.h"
16 #include "ui/aura/env_observer.h" 16 #include "ui/aura/env_observer.h"
17 #include "ui/aura/window_observer.h" 17 #include "ui/aura/window_observer.h"
18 18
19 namespace ash {
20 class ShelfDelegate;
21 }
22
19 namespace aura { 23 namespace aura {
20 class Window; 24 class Window;
21 } 25 }
22 26
23 namespace views { 27 namespace views {
24 class Widget; 28 class Widget;
25 } 29 }
26 30
27 class ArcAppWindowLauncherItemController; 31 class ArcAppWindowLauncherItemController;
28 class ChromeLauncherController; 32 class ChromeLauncherController;
29 33
30 class Profile; 34 class Profile;
31 35
32 class ArcAppWindowLauncherController : public AppWindowLauncherController, 36 class ArcAppWindowLauncherController : public AppWindowLauncherController,
33 public aura::EnvObserver, 37 public aura::EnvObserver,
34 public aura::WindowObserver, 38 public aura::WindowObserver,
35 public ArcAppListPrefs::Observer { 39 public ArcAppListPrefs::Observer {
36 public: 40 public:
37 explicit ArcAppWindowLauncherController(ChromeLauncherController* owner); 41 ArcAppWindowLauncherController(ChromeLauncherController* owner,
42 ash::ShelfDelegate* shelf_delegate);
38 ~ArcAppWindowLauncherController() override; 43 ~ArcAppWindowLauncherController() override;
39 44
40 // AppWindowLauncherControllre: 45 // AppWindowLauncherControllre:
41 void ActiveUserChanged(const std::string& user_email) override; 46 void ActiveUserChanged(const std::string& user_email) override;
42 void AdditionalUserAddedToSession(Profile* profile) override; 47 void AdditionalUserAddedToSession(Profile* profile) override;
43 48
44 // aura::EnvObserver: 49 // aura::EnvObserver:
45 void OnWindowInitialized(aura::Window* window) override; 50 void OnWindowInitialized(aura::Window* window) override;
46 51
47 // aura::WindowObserver: 52 // aura::WindowObserver:
(...skipping 29 matching lines...) Expand all
77 void UnregisterApp(AppWindow* app_window); 82 void UnregisterApp(AppWindow* app_window);
78 83
79 AppWindow* GetAppWindowForTask(int task_id); 84 AppWindow* GetAppWindowForTask(int task_id);
80 85
81 void CheckForAppWindowWidget(aura::Window* window); 86 void CheckForAppWindowWidget(aura::Window* window);
82 87
83 // AppWindowLauncherController: 88 // AppWindowLauncherController:
84 AppWindowLauncherItemController* ControllerForWindow( 89 AppWindowLauncherItemController* ControllerForWindow(
85 aura::Window* window) override; 90 aura::Window* window) override;
86 91
92 // Not owned
93 ash::ShelfDelegate* shelf_delegate_;
87 int active_task_id_ = -1; 94 int active_task_id_ = -1;
88 TaskIdToAppWindow task_id_to_app_window_; 95 TaskIdToAppWindow task_id_to_app_window_;
89 AppControllerMap app_controller_map_; 96 AppControllerMap app_controller_map_;
90 std::vector<aura::Window*> observed_windows_; 97 std::vector<aura::Window*> observed_windows_;
91 Profile* observed_profile_ = nullptr; 98 Profile* observed_profile_ = nullptr;
92 99
93 DISALLOW_COPY_AND_ASSIGN(ArcAppWindowLauncherController); 100 DISALLOW_COPY_AND_ASSIGN(ArcAppWindowLauncherController);
94 }; 101 };
95 102
96 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ 103 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698