| 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_STACKING_CONTROLLER_H_ | 5 #ifndef UI_AURA_SHELL_STACKING_CONTROLLER_H_ |
| 6 #define UI_AURA_SHELL_STACKING_CONTROLLER_H_ | 6 #define UI_AURA_SHELL_STACKING_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 "ui/aura/client/stacking_client.h" | 12 #include "ui/aura/client/stacking_client.h" |
| 12 | 13 |
| 13 namespace aura_shell { | 14 namespace aura_shell { |
| 14 namespace internal { | 15 namespace internal { |
| 15 | 16 |
| 17 class AlwaysOnTopController; |
| 18 |
| 16 class StackingController : public aura::StackingClient { | 19 class StackingController : public aura::StackingClient { |
| 17 public: | 20 public: |
| 18 StackingController(); | 21 StackingController(); |
| 19 virtual ~StackingController(); | 22 virtual ~StackingController(); |
| 20 | 23 |
| 24 // Initializes this controller. |
| 25 void Init(); |
| 26 |
| 21 // Returns true if |window| exists within a container that supports | 27 // Returns true if |window| exists within a container that supports |
| 22 // activation. | 28 // activation. |
| 23 static aura::Window* GetActivatableWindow(aura::Window* window); | 29 static aura::Window* GetActivatableWindow(aura::Window* window); |
| 24 | 30 |
| 25 // Overridden from aura::StackingClient: | 31 // Overridden from aura::StackingClient: |
| 26 virtual void AddChildToDefaultParent(aura::Window* window) OVERRIDE; | 32 virtual void AddChildToDefaultParent(aura::Window* window) OVERRIDE; |
| 27 virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE; | 33 virtual bool CanActivateWindow(aura::Window* window) const OVERRIDE; |
| 28 virtual aura::Window* GetTopmostWindowToActivate( | 34 virtual aura::Window* GetTopmostWindowToActivate( |
| 29 aura::Window* ignore) const OVERRIDE; | 35 aura::Window* ignore) const OVERRIDE; |
| 30 | 36 |
| 31 private: | 37 private: |
| 38 scoped_ptr<internal::AlwaysOnTopController> always_on_top_controller_; |
| 39 |
| 32 DISALLOW_COPY_AND_ASSIGN(StackingController); | 40 DISALLOW_COPY_AND_ASSIGN(StackingController); |
| 33 }; | 41 }; |
| 34 | 42 |
| 35 } // namespace internal | 43 } // namespace internal |
| 36 } // namespace aura_shell | 44 } // namespace aura_shell |
| 37 | 45 |
| 38 #endif // UI_AURA_SHELL_STACKING_CONTROLLER_H_ | 46 #endif // UI_AURA_SHELL_STACKING_CONTROLLER_H_ |
| OLD | NEW |