| 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 | 16 |
| 16 namespace aura_shell { | 17 namespace aura_shell { |
| 17 namespace internal { | 18 namespace internal { |
| 18 | 19 |
| 19 class ActivationController : public aura::ActivationClient, | 20 // Exported for unit tests. |
| 20 public aura::WindowObserver, | 21 class AURA_SHELL_EXPORT ActivationController : public aura::ActivationClient, |
| 21 public aura::RootWindowObserver { | 22 public aura::WindowObserver, |
| 23 public aura::RootWindowObserver { |
| 22 public: | 24 public: |
| 23 ActivationController(); | 25 ActivationController(); |
| 24 virtual ~ActivationController(); | 26 virtual ~ActivationController(); |
| 25 | 27 |
| 26 // Returns true if |window| exists within a container that supports | 28 // Returns true if |window| exists within a container that supports |
| 27 // activation. | 29 // activation. |
| 28 static aura::Window* GetActivatableWindow(aura::Window* window); | 30 static aura::Window* GetActivatableWindow(aura::Window* window); |
| 29 | 31 |
| 30 // Overridden from aura::ActivationClient: | 32 // Overridden from aura::ActivationClient: |
| 31 virtual void ActivateWindow(aura::Window* window) OVERRIDE; | 33 virtual void ActivateWindow(aura::Window* window) OVERRIDE; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // tests to specify a default container. | 67 // tests to specify a default container. |
| 66 aura::Window* default_container_for_test_; | 68 aura::Window* default_container_for_test_; |
| 67 | 69 |
| 68 DISALLOW_COPY_AND_ASSIGN(ActivationController); | 70 DISALLOW_COPY_AND_ASSIGN(ActivationController); |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 } // namespace internal | 73 } // namespace internal |
| 72 } // namespace aura_shell | 74 } // namespace aura_shell |
| 73 | 75 |
| 74 #endif // UI_AURA_SHELL_ACTIVATION_CONTROLLER_H_ | 76 #endif // UI_AURA_SHELL_ACTIVATION_CONTROLLER_H_ |
| OLD | NEW |