| 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_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ |
| 6 #define ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "ui/aura/layout_manager.h" | 14 #include "ui/aura/layout_manager.h" |
| 15 #include "ui/aura/window_observer.h" | 15 #include "ui/aura/window_observer.h" |
| 16 | 16 |
| 17 namespace aura { | 17 namespace aura { |
| 18 class Window; | 18 class Window; |
| 19 class EventFilter; | 19 class EventFilter; |
| 20 } | 20 } |
| 21 namespace gfx { | 21 namespace gfx { |
| 22 class Rect; | 22 class Rect; |
| 23 } | 23 } |
| 24 namespace views { | 24 namespace views { |
| 25 class Widget; | 25 class Widget; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace ash { | 28 namespace ash { |
| 29 namespace internal { | |
| 30 | 29 |
| 31 // LayoutManager for the modal window container. | 30 // LayoutManager for the modal window container. |
| 32 class ASH_EXPORT SystemModalContainerLayoutManager | 31 class ASH_EXPORT SystemModalContainerLayoutManager |
| 33 : public aura::LayoutManager, | 32 : public aura::LayoutManager, |
| 34 public aura::WindowObserver { | 33 public aura::WindowObserver { |
| 35 public: | 34 public: |
| 36 explicit SystemModalContainerLayoutManager(aura::Window* container); | 35 explicit SystemModalContainerLayoutManager(aura::Window* container); |
| 37 virtual ~SystemModalContainerLayoutManager(); | 36 virtual ~SystemModalContainerLayoutManager(); |
| 38 | 37 |
| 39 bool has_modal_background() const { return modal_background_ != NULL; } | 38 bool has_modal_background() const { return modal_background_ != NULL; } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // A widget that dims the windows behind the modal window(s) being | 84 // A widget that dims the windows behind the modal window(s) being |
| 86 // shown in |container_|. | 85 // shown in |container_|. |
| 87 views::Widget* modal_background_; | 86 views::Widget* modal_background_; |
| 88 | 87 |
| 89 // A stack of modal windows. Only the topmost can receive events. | 88 // A stack of modal windows. Only the topmost can receive events. |
| 90 std::vector<aura::Window*> modal_windows_; | 89 std::vector<aura::Window*> modal_windows_; |
| 91 | 90 |
| 92 DISALLOW_COPY_AND_ASSIGN(SystemModalContainerLayoutManager); | 91 DISALLOW_COPY_AND_ASSIGN(SystemModalContainerLayoutManager); |
| 93 }; | 92 }; |
| 94 | 93 |
| 95 } // namespace internal | |
| 96 } // namespace ash | 94 } // namespace ash |
| 97 | 95 |
| 98 #endif // ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ | 96 #endif // ASH_WM_SYSTEM_MODAL_CONTAINER_LAYOUT_MANAGER_H_ |
| OLD | NEW |