OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_APP_WINDOW_LAUNCHER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "ui/wm/public/activation_change_observer.h" | 11 #include "ui/wm/public/activation_change_observer.h" |
12 | 12 |
13 namespace aura { | 13 namespace aura { |
14 | 14 |
15 class Window; | 15 class Window; |
16 | 16 |
17 namespace client { | 17 namespace client { |
18 class ActivationClient; | 18 class ActivationClient; |
19 } | 19 } |
20 } | 20 } |
21 | 21 |
22 class AppWindowLauncherItemController; | 22 class AppWindowLauncherItemController; |
23 class ChromeLauncherControllerImpl; | 23 class ChromeLauncherController; |
24 class Profile; | 24 class Profile; |
25 | 25 |
26 class AppWindowLauncherController | 26 class AppWindowLauncherController |
27 : public aura::client::ActivationChangeObserver { | 27 : public aura::client::ActivationChangeObserver { |
28 public: | 28 public: |
29 ~AppWindowLauncherController() override; | 29 ~AppWindowLauncherController() override; |
30 | 30 |
31 // Called by ChromeLauncherControllerImpl when the active user changed and the | 31 // Called by ChromeLauncherController when the active user changed and the |
32 // items need to be updated. | 32 // items need to be updated. |
33 virtual void ActiveUserChanged(const std::string& user_email) {} | 33 virtual void ActiveUserChanged(const std::string& user_email) {} |
34 | 34 |
35 // An additional user identified by |Profile|, got added to the existing | 35 // An additional user identified by |Profile|, got added to the existing |
36 // session. | 36 // session. |
37 virtual void AdditionalUserAddedToSession(Profile* profile) {} | 37 virtual void AdditionalUserAddedToSession(Profile* profile) {} |
38 | 38 |
39 // Overriden from client::ActivationChangeObserver: | 39 // Overriden from client::ActivationChangeObserver: |
40 void OnWindowActivated( | 40 void OnWindowActivated( |
41 aura::client::ActivationChangeObserver::ActivationReason reason, | 41 aura::client::ActivationChangeObserver::ActivationReason reason, |
42 aura::Window* gained_active, | 42 aura::Window* gained_active, |
43 aura::Window* lost_active) override; | 43 aura::Window* lost_active) override; |
44 | 44 |
45 protected: | 45 protected: |
46 explicit AppWindowLauncherController(ChromeLauncherControllerImpl* owner); | 46 explicit AppWindowLauncherController(ChromeLauncherController* owner); |
47 | 47 |
48 ChromeLauncherControllerImpl* owner() { return owner_; } | 48 ChromeLauncherController* owner() { return owner_; } |
49 | 49 |
50 virtual AppWindowLauncherItemController* ControllerForWindow( | 50 virtual AppWindowLauncherItemController* ControllerForWindow( |
51 aura::Window* window) = 0; | 51 aura::Window* window) = 0; |
52 | 52 |
53 private: | 53 private: |
54 // Unowned pointers. | 54 // Unowned pointers. |
55 ChromeLauncherControllerImpl* owner_; | 55 ChromeLauncherController* owner_; |
56 aura::client::ActivationClient* activation_client_ = nullptr; | 56 aura::client::ActivationClient* activation_client_ = nullptr; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(AppWindowLauncherController); | 58 DISALLOW_COPY_AND_ASSIGN(AppWindowLauncherController); |
59 }; | 59 }; |
60 | 60 |
61 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_CONTROLLER_H_ | 61 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |