Chromium Code Reviews| Index: chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h |
| diff --git a/chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h b/chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h |
| index 6066f68b1c48a1d8e4c0d5b1e41b67b1dd6d08e6..db95fac8e1b8d6770ad3083275c349b9b41d39c9 100644 |
| --- a/chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h |
| +++ b/chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h |
| @@ -21,11 +21,22 @@ |
| #include "chrome/browser/prefs/pref_change_registrar.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| +#include "ui/aura/client/activation_change_observer.h" |
| +#include "ui/aura/window_observer.h" |
| namespace ash { |
| class LauncherModel; |
| } |
| +namespace aura { |
| +class Window; |
| + |
| +namespace client { |
| +class ActivationClient; |
| +} |
| + |
| +} |
| + |
| class BrowserLauncherItemController; |
| class BrowserLauncherItemControllerTest; |
| class PrefService; |
| @@ -38,7 +49,9 @@ typedef TabContents TabContentsWrapper; |
| class ChromeLauncherController : public ash::LauncherDelegate, |
| public ash::LauncherModelObserver, |
| public content::NotificationObserver, |
| - public ShellWindowRegistry::Observer { |
| + public ShellWindowRegistry::Observer, |
| + public aura::client::ActivationChangeObserver, |
| + public aura::WindowObserver { |
| public: |
| // Indicates if a launcher item is incognito or not. |
| enum IncognitoState { |
| @@ -186,6 +199,13 @@ class ChromeLauncherController : public ash::LauncherDelegate, |
| virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE; |
| virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE; |
| + // Overriden from client::ActivationChangeObserver: |
| + virtual void OnWindowActivated( |
| + aura::Window* active, aura::Window* old_active) OVERRIDE; |
|
sky
2012/06/11 17:47:39
nit: each arg on its own line.
DaveMoore
2012/06/11 18:13:40
Done.
|
| + |
| + // Overriden from aura::WindowObserver: |
| + virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE; |
| + |
| private: |
| friend class BrowserLauncherItemControllerTest; |
| friend class ChromeLauncherControllerTest; |
| @@ -214,6 +234,7 @@ class ChromeLauncherController : public ash::LauncherDelegate, |
| }; |
| typedef std::map<ash::LauncherID, Item> IDToItemMap; |
| + typedef std::map<aura::Window*, ash::LauncherID> WindowToIDMap; |
| // Updates the pinned pref state. The pinned state consists of a list pref. |
| // Each item of the list is a dictionary. The key |kAppIDPath| gives the |
| @@ -259,6 +280,7 @@ class ChromeLauncherController : public ash::LauncherDelegate, |
| Profile* profile_; |
| IDToItemMap id_to_item_map_; |
| + WindowToIDMap window_to_id_map_; |
|
sky
2012/06/11 17:47:39
Add a description for this. Especially mention its
DaveMoore
2012/06/11 18:13:40
Done.
|
| // Used to load the image for an app tab. |
| scoped_ptr<AppIconLoader> app_icon_loader_; |
| @@ -266,6 +288,7 @@ class ChromeLauncherController : public ash::LauncherDelegate, |
| content::NotificationRegistrar notification_registrar_; |
| PrefChangeRegistrar pref_change_registrar_; |
| + aura::client::ActivationClient* activation_client_; |
| DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
| }; |