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/activation_change_observer.h" | 20 #include "ui/aura/client/activation_change_observer.h" |
21 #include "ui/aura/layout_manager.h" | 21 #include "ui/aura/layout_manager.h" |
22 #include "ui/aura/window_observer.h" | |
23 #include "ui/keyboard/keyboard_controller.h" | 22 #include "ui/keyboard/keyboard_controller.h" |
24 #include "ui/keyboard/keyboard_controller_observer.h" | 23 #include "ui/keyboard/keyboard_controller_observer.h" |
25 | 24 |
26 namespace aura { | 25 namespace aura { |
27 class Window; | 26 class Window; |
28 class WindowTracker; | 27 class WindowTracker; |
29 } | 28 } |
30 | 29 |
31 namespace gfx { | 30 namespace gfx { |
32 class Rect; | 31 class Rect; |
(...skipping 16 matching lines...) Expand all Loading... |
49 // added to that container. | 48 // added to that container. |
50 // | 49 // |
51 // The constructor takes a |panel_container| argument which is expected to set | 50 // The constructor takes a |panel_container| argument which is expected to set |
52 // its layout manager to this instance, e.g.: | 51 // its layout manager to this instance, e.g.: |
53 // panel_container->SetLayoutManager(new PanelLayoutManager(panel_container)); | 52 // panel_container->SetLayoutManager(new PanelLayoutManager(panel_container)); |
54 | 53 |
55 class ASH_EXPORT PanelLayoutManager | 54 class ASH_EXPORT PanelLayoutManager |
56 : public aura::LayoutManager, | 55 : public aura::LayoutManager, |
57 public ShelfIconObserver, | 56 public ShelfIconObserver, |
58 public ShellObserver, | 57 public ShellObserver, |
59 public aura::WindowObserver, | |
60 public aura::client::ActivationChangeObserver, | 58 public aura::client::ActivationChangeObserver, |
61 public keyboard::KeyboardControllerObserver, | 59 public keyboard::KeyboardControllerObserver, |
62 public DisplayController::Observer, | 60 public DisplayController::Observer, |
63 public ShelfLayoutManagerObserver, | 61 public ShelfLayoutManagerObserver, |
64 public wm::WindowStateObserver { | 62 public wm::WindowStateObserver { |
65 public: | 63 public: |
66 explicit PanelLayoutManager(aura::Window* panel_container); | 64 explicit PanelLayoutManager(aura::Window* panel_container); |
67 virtual ~PanelLayoutManager(); | 65 virtual ~PanelLayoutManager(); |
68 | 66 |
69 // Call Shutdown() before deleting children of panel_container. | 67 // Call Shutdown() before deleting children of panel_container. |
(...skipping 23 matching lines...) Expand all Loading... |
93 // Overridden from ShelfIconObserver | 91 // Overridden from ShelfIconObserver |
94 virtual void OnShelfIconPositionsChanged() OVERRIDE; | 92 virtual void OnShelfIconPositionsChanged() OVERRIDE; |
95 | 93 |
96 // Overridden from ShellObserver | 94 // Overridden from ShellObserver |
97 virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE; | 95 virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE; |
98 | 96 |
99 // Overridden from ash::wm::WindowStateObserver | 97 // Overridden from ash::wm::WindowStateObserver |
100 virtual void OnPostWindowShowTypeChange(wm::WindowState* window_state, | 98 virtual void OnPostWindowShowTypeChange(wm::WindowState* window_state, |
101 wm::WindowShowType old_type) OVERRIDE; | 99 wm::WindowShowType old_type) OVERRIDE; |
102 | 100 |
103 // Overridden from aura::WindowObserver | |
104 virtual void OnWindowVisibilityChanged(aura::Window* window, | |
105 bool visible) OVERRIDE; | |
106 | |
107 // Overridden from aura::client::ActivationChangeObserver | 101 // Overridden from aura::client::ActivationChangeObserver |
108 virtual void OnWindowActivated(aura::Window* gained_active, | 102 virtual void OnWindowActivated(aura::Window* gained_active, |
109 aura::Window* lost_active) OVERRIDE; | 103 aura::Window* lost_active) OVERRIDE; |
110 | 104 |
111 // Overridden from DisplayController::Observer | 105 // Overridden from DisplayController::Observer |
112 virtual void OnDisplayConfigurationChanged() OVERRIDE; | 106 virtual void OnDisplayConfigurationChanged() OVERRIDE; |
113 | 107 |
114 // Overridden from ShelfLayoutManagerObserver | 108 // Overridden from ShelfLayoutManagerObserver |
115 virtual void WillChangeVisibilityState( | 109 virtual void WillChangeVisibilityState( |
116 ShelfVisibilityState new_state) OVERRIDE; | 110 ShelfVisibilityState new_state) OVERRIDE; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 aura::Window* last_active_panel_; | 182 aura::Window* last_active_panel_; |
189 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; | 183 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; |
190 | 184 |
191 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); | 185 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); |
192 }; | 186 }; |
193 | 187 |
194 } // namespace internal | 188 } // namespace internal |
195 } // namespace ash | 189 } // namespace ash |
196 | 190 |
197 #endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ | 191 #endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ |
OLD | NEW |