OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_AURA_SHELL_ACTIVATION_CONTROLLER_H_ | 5 #ifndef UI_AURA_SHELL_ACTIVATION_CONTROLLER_H_ |
6 #define UI_AURA_SHELL_ACTIVATION_CONTROLLER_H_ | 6 #define UI_AURA_SHELL_ACTIVATION_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "ui/aura/client/activation_client.h" | 12 #include "ui/aura/client/activation_client.h" |
13 #include "ui/aura/root_window_observer.h" | 13 #include "ui/aura/root_window_observer.h" |
14 #include "ui/aura/window_observer.h" | 14 #include "ui/aura/window_observer.h" |
15 #include "ui/aura_shell/aura_shell_export.h" | 15 #include "ui/aura_shell/aura_shell_export.h" |
16 | 16 |
17 namespace aura_shell { | 17 namespace aura_shell { |
18 namespace internal { | 18 namespace internal { |
19 | 19 |
20 // Exported for unit tests. | 20 // Exported for unit tests. |
21 class AURA_SHELL_EXPORT ActivationController : public aura::ActivationClient, | 21 class AURA_SHELL_EXPORT ActivationController |
22 public aura::WindowObserver, | 22 : public aura::client::ActivationClient, |
23 public aura::RootWindowObserver { | 23 public aura::WindowObserver, |
| 24 public aura::RootWindowObserver { |
24 public: | 25 public: |
25 ActivationController(); | 26 ActivationController(); |
26 virtual ~ActivationController(); | 27 virtual ~ActivationController(); |
27 | 28 |
28 // Returns true if |window| exists within a container that supports | 29 // Returns true if |window| exists within a container that supports |
29 // activation. | 30 // activation. |
30 static aura::Window* GetActivatableWindow(aura::Window* window); | 31 static aura::Window* GetActivatableWindow(aura::Window* window); |
31 | 32 |
32 // Overridden from aura::ActivationClient: | 33 // Overridden from aura::client::ActivationClient: |
33 virtual void ActivateWindow(aura::Window* window) OVERRIDE; | 34 virtual void ActivateWindow(aura::Window* window) OVERRIDE; |
34 virtual void DeactivateWindow(aura::Window* window) OVERRIDE; | 35 virtual void DeactivateWindow(aura::Window* window) OVERRIDE; |
35 virtual aura::Window* GetActiveWindow() OVERRIDE; | 36 virtual aura::Window* GetActiveWindow() OVERRIDE; |
36 virtual bool CanFocusWindow(aura::Window* window) const OVERRIDE; | 37 virtual bool CanFocusWindow(aura::Window* window) const OVERRIDE; |
37 | 38 |
38 // Overridden from aura::WindowObserver: | 39 // Overridden from aura::WindowObserver: |
39 virtual void OnWindowVisibilityChanged(aura::Window* window, | 40 virtual void OnWindowVisibilityChanged(aura::Window* window, |
40 bool visible) OVERRIDE; | 41 bool visible) OVERRIDE; |
41 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; | 42 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; |
42 | 43 |
(...skipping 24 matching lines...) Expand all Loading... |
67 // tests to specify a default container. | 68 // tests to specify a default container. |
68 aura::Window* default_container_for_test_; | 69 aura::Window* default_container_for_test_; |
69 | 70 |
70 DISALLOW_COPY_AND_ASSIGN(ActivationController); | 71 DISALLOW_COPY_AND_ASSIGN(ActivationController); |
71 }; | 72 }; |
72 | 73 |
73 } // namespace internal | 74 } // namespace internal |
74 } // namespace aura_shell | 75 } // namespace aura_shell |
75 | 76 |
76 #endif // UI_AURA_SHELL_ACTIVATION_CONTROLLER_H_ | 77 #endif // UI_AURA_SHELL_ACTIVATION_CONTROLLER_H_ |
OLD | NEW |