| 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 ASH_WM_STACKING_CONTROLLER_H_ | 5 #ifndef ASH_WM_STACKING_CONTROLLER_H_ |
| 6 #define ASH_WM_STACKING_CONTROLLER_H_ | 6 #define ASH_WM_STACKING_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "ui/aura/client/stacking_client.h" | 11 #include "ui/aura/client/stacking_client.h" |
| 12 | 12 |
| 13 namespace aura{ |
| 14 class RootWindow; |
| 15 } |
| 16 |
| 13 namespace ash { | 17 namespace ash { |
| 14 namespace internal { | 18 namespace internal { |
| 15 | 19 |
| 16 class AlwaysOnTopController; | 20 class AlwaysOnTopController; |
| 17 | 21 |
| 18 class StackingController : public aura::client::StackingClient { | 22 class StackingController : public aura::client::StackingClient { |
| 19 public: | 23 public: |
| 20 StackingController(); | 24 StackingController(); |
| 21 virtual ~StackingController(); | 25 virtual ~StackingController(); |
| 22 | 26 |
| 23 // Overridden from aura::client::StackingClient: | 27 // Overridden from aura::client::StackingClient: |
| 24 virtual aura::Window* GetDefaultParent(aura::Window* window, | 28 virtual aura::Window* GetDefaultParent(aura::Window* window, |
| 25 const gfx::Rect& bounds) OVERRIDE; | 29 const gfx::Rect& bounds) OVERRIDE; |
| 26 | 30 |
| 27 private: | 31 private: |
| 28 // Returns corresponding system modal container for a modal window. | 32 // Returns corresponding system modal container for a modal window. |
| 29 // If screen lock is not active, all system modal windows are placed into the | 33 // If screen lock is not active, all system modal windows are placed into the |
| 30 // normal modal container. | 34 // normal modal container. |
| 31 // Otherwise those that originate from LockScreen container and above are | 35 // Otherwise those that originate from LockScreen container and above are |
| 32 // placed in the screen lock modal container. | 36 // placed in the screen lock modal container. |
| 33 aura::Window* GetSystemModalContainer(aura::Window* window, | 37 aura::Window* GetSystemModalContainer(aura::RootWindow* root, |
| 34 const gfx::Rect& bounds) const; | 38 aura::Window* window) const; |
| 35 | 39 |
| 36 // Returns the AlwaysOnTopController of the root window that matches | 40 // Returns the AlwaysOnTopController of the |root_window|. |
| 37 // |bounds|. | |
| 38 internal::AlwaysOnTopController* GetAlwaysOnTopController( | 41 internal::AlwaysOnTopController* GetAlwaysOnTopController( |
| 39 const gfx::Rect& bounds); | 42 aura::RootWindow* root_window); |
| 40 | 43 |
| 41 DISALLOW_COPY_AND_ASSIGN(StackingController); | 44 DISALLOW_COPY_AND_ASSIGN(StackingController); |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 } // namespace internal | 47 } // namespace internal |
| 45 } // namespace ash | 48 } // namespace ash |
| 46 | 49 |
| 47 #endif // ASH_WM_STACKING_CONTROLLER_H_ | 50 #endif // ASH_WM_STACKING_CONTROLLER_H_ |
| OLD | NEW |