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_PANELS_PANEL_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ |
6 #define ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "ash/display/display_controller.h" | 11 #include "ash/display/display_controller.h" |
12 #include "ash/shelf/shelf_icon_observer.h" | 12 #include "ash/shelf/shelf_icon_observer.h" |
13 #include "ash/shelf/shelf_layout_manager_observer.h" | 13 #include "ash/shelf/shelf_layout_manager_observer.h" |
14 #include "ash/shell_observer.h" | 14 #include "ash/shell_observer.h" |
15 #include "ash/wm/window_state_observer.h" | 15 #include "ash/wm/window_state_observer.h" |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "ui/aura/client/virtual_keyboard_observer.h" |
20 #include "ui/aura/layout_manager.h" | 21 #include "ui/aura/layout_manager.h" |
21 #include "ui/aura/window_observer.h" | 22 #include "ui/aura/window_observer.h" |
22 #include "ui/keyboard/keyboard_controller.h" | 23 #include "ui/keyboard/keyboard_controller.h" |
23 #include "ui/keyboard/keyboard_controller_observer.h" | |
24 #include "ui/wm/public/activation_change_observer.h" | 24 #include "ui/wm/public/activation_change_observer.h" |
25 | 25 |
26 namespace aura { | 26 namespace aura { |
27 class Window; | 27 class Window; |
28 class WindowTracker; | 28 class WindowTracker; |
29 } | 29 } |
30 | 30 |
31 namespace gfx { | 31 namespace gfx { |
32 class Rect; | 32 class Rect; |
33 } | 33 } |
(...skipping 17 matching lines...) Expand all Loading... |
51 // The constructor takes a |panel_container| argument which is expected to set | 51 // The constructor takes a |panel_container| argument which is expected to set |
52 // its layout manager to this instance, e.g.: | 52 // its layout manager to this instance, e.g.: |
53 // panel_container->SetLayoutManager(new PanelLayoutManager(panel_container)); | 53 // panel_container->SetLayoutManager(new PanelLayoutManager(panel_container)); |
54 | 54 |
55 class ASH_EXPORT PanelLayoutManager | 55 class ASH_EXPORT PanelLayoutManager |
56 : public aura::LayoutManager, | 56 : public aura::LayoutManager, |
57 public ShelfIconObserver, | 57 public ShelfIconObserver, |
58 public ShellObserver, | 58 public ShellObserver, |
59 public aura::WindowObserver, | 59 public aura::WindowObserver, |
60 public aura::client::ActivationChangeObserver, | 60 public aura::client::ActivationChangeObserver, |
61 public keyboard::KeyboardControllerObserver, | 61 public aura::client::VirtualKeyboardObserver, |
62 public DisplayController::Observer, | 62 public DisplayController::Observer, |
63 public ShelfLayoutManagerObserver, | 63 public ShelfLayoutManagerObserver, |
64 public wm::WindowStateObserver { | 64 public wm::WindowStateObserver { |
65 public: | 65 public: |
66 explicit PanelLayoutManager(aura::Window* panel_container); | 66 explicit PanelLayoutManager(aura::Window* panel_container); |
67 virtual ~PanelLayoutManager(); | 67 virtual ~PanelLayoutManager(); |
68 | 68 |
69 // Call Shutdown() before deleting children of panel_container. | 69 // Call Shutdown() before deleting children of panel_container. |
70 void Shutdown(); | 70 void Shutdown(); |
71 | 71 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // Called whenever the panel layout might change. | 153 // Called whenever the panel layout might change. |
154 void Relayout(); | 154 void Relayout(); |
155 | 155 |
156 // Called whenever the panel stacking order needs to be updated (e.g. focus | 156 // Called whenever the panel stacking order needs to be updated (e.g. focus |
157 // changes or a panel is moved). | 157 // changes or a panel is moved). |
158 void UpdateStacking(aura::Window* active_panel); | 158 void UpdateStacking(aura::Window* active_panel); |
159 | 159 |
160 // Update the callout arrows for all managed panels. | 160 // Update the callout arrows for all managed panels. |
161 void UpdateCallouts(); | 161 void UpdateCallouts(); |
162 | 162 |
163 // Overridden from keyboard::KeyboardControllerObserver: | 163 // Overridden from aura::client::VirtualKeyboardObserver: |
164 virtual void OnKeyboardBoundsChanging( | 164 virtual void OnKeyboardBoundsChanging( |
165 const gfx::Rect& keyboard_bounds) OVERRIDE; | 165 const gfx::Rect& keyboard_bounds) OVERRIDE; |
166 | 166 |
167 // Parent window associated with this layout manager. | 167 // Parent window associated with this layout manager. |
168 aura::Window* panel_container_; | 168 aura::Window* panel_container_; |
169 // Protect against recursive calls to OnWindowAddedToLayout(). | 169 // Protect against recursive calls to OnWindowAddedToLayout(). |
170 bool in_add_window_; | 170 bool in_add_window_; |
171 // Protect against recursive calls to Relayout(). | 171 // Protect against recursive calls to Relayout(). |
172 bool in_layout_; | 172 bool in_layout_; |
173 // Ordered list of unowned pointers to panel windows. | 173 // Ordered list of unowned pointers to panel windows. |
(...skipping 15 matching lines...) Expand all Loading... |
189 aura::Window* last_active_panel_; | 189 aura::Window* last_active_panel_; |
190 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; | 190 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; |
191 | 191 |
192 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); | 192 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); |
193 }; | 193 }; |
194 | 194 |
195 } // namespace internal | 195 } // namespace internal |
196 } // namespace ash | 196 } // namespace ash |
197 | 197 |
198 #endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ | 198 #endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ |
OLD | NEW |