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> |
11 | 11 |
12 #include "chrome/browser/extensions/shell_window_registry.h" | 12 #include "chrome/browser/extensions/shell_window_registry.h" |
13 #include "ui/aura/client/activation_change_observer.h" | |
14 #include "ui/aura/window_observer.h" | 13 #include "ui/aura/window_observer.h" |
| 14 #include "ui/views/corewm/activation_change_shim.h" |
15 | 15 |
16 namespace aura { | 16 namespace aura { |
17 | 17 |
18 class Window; | 18 class Window; |
19 | 19 |
20 namespace client { | 20 namespace client { |
21 class ActivationClient; | 21 class ActivationClient; |
22 } | 22 } |
23 | 23 |
24 } | 24 } |
25 | 25 |
26 class ChromeLauncherController; | 26 class ChromeLauncherController; |
27 class LauncherItemController; | 27 class LauncherItemController; |
28 class ShellWindow; | 28 class ShellWindow; |
29 | 29 |
30 // ShellWindowLauncherController observes the Shell Window registry and the | 30 // ShellWindowLauncherController observes the Shell Window registry and the |
31 // aura window manager. It handles adding and removing launcher items from | 31 // aura window manager. It handles adding and removing launcher items from |
32 // ChromeLauncherController. | 32 // ChromeLauncherController. |
33 class ShellWindowLauncherController | 33 class ShellWindowLauncherController |
34 : public extensions::ShellWindowRegistry::Observer, | 34 : public extensions::ShellWindowRegistry::Observer, |
35 public aura::WindowObserver, | 35 public aura::WindowObserver, |
36 public aura::client::ActivationChangeObserver { | 36 public views::corewm::ActivationChangeShim { |
37 public: | 37 public: |
38 explicit ShellWindowLauncherController(ChromeLauncherController* owner); | 38 explicit ShellWindowLauncherController(ChromeLauncherController* owner); |
39 virtual ~ShellWindowLauncherController(); | 39 virtual ~ShellWindowLauncherController(); |
40 | 40 |
41 // Overridden from ShellWindowRegistry::Observer: | 41 // Overridden from ShellWindowRegistry::Observer: |
42 virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE; | 42 virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE; |
43 virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE; | 43 virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE; |
44 | 44 |
45 // Overriden from aura::WindowObserver: | 45 // Overriden from aura::WindowObserver: |
46 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 46 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
(...skipping 17 matching lines...) Expand all Loading... |
64 // Map of app launcher id to controller. | 64 // Map of app launcher id to controller. |
65 AppControllerMap app_controller_map_; | 65 AppControllerMap app_controller_map_; |
66 | 66 |
67 // Allows us to get from an aura::Window to the app launcher id. | 67 // Allows us to get from an aura::Window to the app launcher id. |
68 WindowToAppLauncherIdMap window_to_app_launcher_id_map_; | 68 WindowToAppLauncherIdMap window_to_app_launcher_id_map_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherController); | 70 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherController); |
71 }; | 71 }; |
72 | 72 |
73 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_CONTROLLER_H_ | 73 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |