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_MULTI_PROFILE_APP_WINDOW_LAUNCHER_CONTROL
LER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_APP_WINDOW_LAUNCHER_CONTROL
LER_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_APP_WINDOW_LAUNCHER_CONTROL
LER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_APP_WINDOW_LAUNCHER_CONTROL
LER_H_ |
7 | 7 |
8 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" | 8 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" |
9 | 9 |
10 // Inherits from AppWindowLauncherController and overwrites the AppWindow | 10 // Inherits from AppWindowLauncherController and overwrites the AppWindow |
11 // observing functions to switch between users dynamically. | 11 // observing functions to switch between users dynamically. |
12 class MultiProfileAppWindowLauncherController | 12 class MultiProfileAppWindowLauncherController |
13 : public AppWindowLauncherController { | 13 : public AppWindowLauncherController { |
14 public: | 14 public: |
15 explicit MultiProfileAppWindowLauncherController( | 15 explicit MultiProfileAppWindowLauncherController( |
16 ChromeLauncherController* owner); | 16 ChromeLauncherController* owner); |
17 virtual ~MultiProfileAppWindowLauncherController(); | 17 virtual ~MultiProfileAppWindowLauncherController(); |
18 | 18 |
19 // Overridden from AppWindowLauncherController: | 19 // Overridden from AppWindowLauncherController: |
20 virtual void ActiveUserChanged(const std::string& user_email) OVERRIDE; | 20 virtual void ActiveUserChanged(const std::string& user_email) override; |
21 virtual void AdditionalUserAddedToSession(Profile* profile) OVERRIDE; | 21 virtual void AdditionalUserAddedToSession(Profile* profile) override; |
22 | 22 |
23 // Overridden from AppWindowRegistry::Observer: | 23 // Overridden from AppWindowRegistry::Observer: |
24 virtual void OnAppWindowAdded(extensions::AppWindow* app_window) OVERRIDE; | 24 virtual void OnAppWindowAdded(extensions::AppWindow* app_window) override; |
25 virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) OVERRIDE; | 25 virtual void OnAppWindowRemoved(extensions::AppWindow* app_window) override; |
26 virtual void OnAppWindowShown(extensions::AppWindow* app_window) OVERRIDE; | 26 virtual void OnAppWindowShown(extensions::AppWindow* app_window) override; |
27 virtual void OnAppWindowHidden(extensions::AppWindow* app_window) OVERRIDE; | 27 virtual void OnAppWindowHidden(extensions::AppWindow* app_window) override; |
28 | 28 |
29 private: | 29 private: |
30 typedef std::vector<extensions::AppWindow*> AppWindowList; | 30 typedef std::vector<extensions::AppWindow*> AppWindowList; |
31 typedef std::vector<extensions::AppWindowRegistry*> AppWindowRegistryList; | 31 typedef std::vector<extensions::AppWindowRegistry*> AppWindowRegistryList; |
32 | 32 |
33 // Returns true if the owner of the given |app_window| has a window teleported | 33 // Returns true if the owner of the given |app_window| has a window teleported |
34 // of the |app_window|'s application type to the current desktop. | 34 // of the |app_window|'s application type to the current desktop. |
35 bool UserHasAppOnActiveDesktop(extensions::AppWindow* app_window); | 35 bool UserHasAppOnActiveDesktop(extensions::AppWindow* app_window); |
36 | 36 |
37 // A list of all app windows for all users. | 37 // A list of all app windows for all users. |
38 AppWindowList app_window_list_; | 38 AppWindowList app_window_list_; |
39 | 39 |
40 // A list of the app window registries which we additionally observe. | 40 // A list of the app window registries which we additionally observe. |
41 AppWindowRegistryList multi_user_registry_; | 41 AppWindowRegistryList multi_user_registry_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(MultiProfileAppWindowLauncherController); | 43 DISALLOW_COPY_AND_ASSIGN(MultiProfileAppWindowLauncherController); |
44 }; | 44 }; |
45 | 45 |
46 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_APP_WINDOW_LAUNCHER_CONT
ROLLER_H_ | 46 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_APP_WINDOW_LAUNCHER_CONT
ROLLER_H_ |
OLD | NEW |