| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SHELL_WINDOW_LAUNCHER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE; | 42 virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE; |
| 43 virtual void OnShellWindowIconChanged(ShellWindow* shell_window) OVERRIDE; | 43 virtual void OnShellWindowIconChanged(ShellWindow* shell_window) OVERRIDE; |
| 44 virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE; | 44 virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE; |
| 45 | 45 |
| 46 // Overriden from aura::WindowObserver: | 46 // Overriden from aura::WindowObserver: |
| 47 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 47 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
| 48 | 48 |
| 49 // Overriden from client::ActivationChangeObserver: | 49 // Overriden from client::ActivationChangeObserver: |
| 50 virtual void OnWindowActivated(aura::Window* gained_active, | 50 virtual void OnWindowActivated(aura::Window* gained_active, |
| 51 aura::Window* lost_active) OVERRIDE; | 51 aura::Window* lost_active) OVERRIDE; |
| 52 virtual void OnWindowActivationRequestCompleted( |
| 53 aura::Window* request_active, aura::Window* actual_active) OVERRIDE; |
| 52 | 54 |
| 53 // Returns the number of running applications. | 55 // Returns the number of running applications. |
| 54 int NumberOfAppsRunning(); | 56 int NumberOfAppsRunning(); |
| 55 | 57 |
| 56 // Activate the application with the given index. | 58 // Activate the application with the given index. |
| 57 void ActivateAppAt(int index); | 59 void ActivateAppAt(int index); |
| 58 | 60 |
| 59 private: | 61 private: |
| 60 typedef std::map<std::string, ShellWindowLauncherItemController*> | 62 typedef std::map<std::string, ShellWindowLauncherItemController*> |
| 61 AppControllerMap; | 63 AppControllerMap; |
| 62 typedef std::map<aura::Window*, std::string> WindowToAppLauncherIdMap; | 64 typedef std::map<aura::Window*, std::string> WindowToAppLauncherIdMap; |
| 63 | 65 |
| 64 ShellWindowLauncherItemController* ControllerForWindow(aura::Window* window); | 66 ShellWindowLauncherItemController* ControllerForWindow(aura::Window* window); |
| 65 | 67 |
| 66 ChromeLauncherController* owner_; | 68 ChromeLauncherController* owner_; |
| 67 extensions::ShellWindowRegistry* registry_; // Unowned convenience pointer | 69 extensions::ShellWindowRegistry* registry_; // Unowned convenience pointer |
| 68 aura::client::ActivationClient* activation_client_; | 70 aura::client::ActivationClient* activation_client_; |
| 69 | 71 |
| 70 // Map of app launcher id to controller. | 72 // Map of app launcher id to controller. |
| 71 AppControllerMap app_controller_map_; | 73 AppControllerMap app_controller_map_; |
| 72 | 74 |
| 73 // Allows us to get from an aura::Window to the app launcher id. | 75 // Allows us to get from an aura::Window to the app launcher id. |
| 74 WindowToAppLauncherIdMap window_to_app_launcher_id_map_; | 76 WindowToAppLauncherIdMap window_to_app_launcher_id_map_; |
| 75 | 77 |
| 76 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherController); | 78 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherController); |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_CONTROLLER_H_ | 81 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |