| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHELL_WINDOW_LAUNCHER_CONTR
OLLER_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_SHELL_WINDOW_LAUNCHER_CONTR
OLLER_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/shell_window_launcher_controller.h" | 8 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" |
| 9 | 9 |
| 10 // Inherits from ShellWindowLauncherController and overwrites the ShellWindow | 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 // TODO(jamescook): Rename this to MultiProfileAppWindowLauncherController. | 12 class MultiProfileAppWindowLauncherController |
| 13 // http://crbug.com/344079 | 13 : public AppWindowLauncherController { |
| 14 class MultiProfileShellWindowLauncherController | |
| 15 : public ShellWindowLauncherController { | |
| 16 public: | 14 public: |
| 17 explicit MultiProfileShellWindowLauncherController( | 15 explicit MultiProfileAppWindowLauncherController( |
| 18 ChromeLauncherController* owner); | 16 ChromeLauncherController* owner); |
| 19 virtual ~MultiProfileShellWindowLauncherController(); | 17 virtual ~MultiProfileAppWindowLauncherController(); |
| 20 | 18 |
| 21 // Overridden from ShellWindowLauncherController: | 19 // Overridden from AppWindowLauncherController: |
| 22 virtual void ActiveUserChanged(const std::string& user_email) OVERRIDE; | 20 virtual void ActiveUserChanged(const std::string& user_email) OVERRIDE; |
| 23 virtual void AdditionalUserAddedToSession(Profile* profile) OVERRIDE; | 21 virtual void AdditionalUserAddedToSession(Profile* profile) OVERRIDE; |
| 24 | 22 |
| 25 // Overridden from AppWindowRegistry::Observer: | 23 // Overridden from AppWindowRegistry::Observer: |
| 26 virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE; | 24 virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE; |
| 27 virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE; | 25 virtual void OnAppWindowRemoved(apps::AppWindow* app_window) OVERRIDE; |
| 28 | 26 |
| 29 private: | 27 private: |
| 30 typedef std::vector<apps::AppWindow*> AppWindowList; | 28 typedef std::vector<apps::AppWindow*> AppWindowList; |
| 31 typedef std::vector<apps::AppWindowRegistry*> AppWindowRegistryList; | 29 typedef std::vector<apps::AppWindowRegistry*> AppWindowRegistryList; |
| 32 | 30 |
| 33 // A list of all app windows for all users. | 31 // A list of all app windows for all users. |
| 34 AppWindowList app_window_list_; | 32 AppWindowList app_window_list_; |
| 35 | 33 |
| 36 // A list of the app window registries which we additionally observe. | 34 // A list of the app window registries which we additionally observe. |
| 37 AppWindowRegistryList multi_user_registry_; | 35 AppWindowRegistryList multi_user_registry_; |
| 38 | 36 |
| 39 DISALLOW_COPY_AND_ASSIGN(MultiProfileShellWindowLauncherController); | 37 DISALLOW_COPY_AND_ASSIGN(MultiProfileAppWindowLauncherController); |
| 40 }; | 38 }; |
| 41 | 39 |
| 42 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_SHELL_WINDOW_LAUNCHER_CO
NTROLLER_H_ | 40 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_APP_WINDOW_LAUNCHER_CONT
ROLLER_H_ |
| OLD | NEW |