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/launcher/launcher_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" | 22 #include "ui/aura/window_observer.h" |
(...skipping 23 matching lines...) Expand all Loading... |
46 // workspace. It is associated with a specific container window (i.e. | 46 // workspace. It is associated with a specific container window (i.e. |
47 // kShellWindowId_PanelContainer) and controls the layout of any windows | 47 // kShellWindowId_PanelContainer) and controls the layout of any windows |
48 // added to that container. | 48 // added to that container. |
49 // | 49 // |
50 // 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 |
51 // its layout manager to this instance, e.g.: | 51 // its layout manager to this instance, e.g.: |
52 // panel_container->SetLayoutManager(new PanelLayoutManager(panel_container)); | 52 // panel_container->SetLayoutManager(new PanelLayoutManager(panel_container)); |
53 | 53 |
54 class ASH_EXPORT PanelLayoutManager | 54 class ASH_EXPORT PanelLayoutManager |
55 : public aura::LayoutManager, | 55 : public aura::LayoutManager, |
56 public ash::LauncherIconObserver, | 56 public ShelfIconObserver, |
57 public ash::ShellObserver, | 57 public ShellObserver, |
58 public aura::WindowObserver, | 58 public aura::WindowObserver, |
59 public aura::client::ActivationChangeObserver, | 59 public aura::client::ActivationChangeObserver, |
60 public keyboard::KeyboardControllerObserver, | 60 public keyboard::KeyboardControllerObserver, |
61 public DisplayController::Observer, | 61 public DisplayController::Observer, |
62 public ShelfLayoutManagerObserver, | 62 public ShelfLayoutManagerObserver, |
63 public wm::WindowStateObserver { | 63 public wm::WindowStateObserver { |
64 public: | 64 public: |
65 explicit PanelLayoutManager(aura::Window* panel_container); | 65 explicit PanelLayoutManager(aura::Window* panel_container); |
66 virtual ~PanelLayoutManager(); | 66 virtual ~PanelLayoutManager(); |
67 | 67 |
(...skipping 14 matching lines...) Expand all Loading... |
82 // Overridden from aura::LayoutManager: | 82 // Overridden from aura::LayoutManager: |
83 virtual void OnWindowResized() OVERRIDE; | 83 virtual void OnWindowResized() OVERRIDE; |
84 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; | 84 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; |
85 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; | 85 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; |
86 virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE; | 86 virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE; |
87 virtual void OnChildWindowVisibilityChanged(aura::Window* child, | 87 virtual void OnChildWindowVisibilityChanged(aura::Window* child, |
88 bool visibile) OVERRIDE; | 88 bool visibile) OVERRIDE; |
89 virtual void SetChildBounds(aura::Window* child, | 89 virtual void SetChildBounds(aura::Window* child, |
90 const gfx::Rect& requested_bounds) OVERRIDE; | 90 const gfx::Rect& requested_bounds) OVERRIDE; |
91 | 91 |
92 // Overridden from ash::LauncherIconObserver | 92 // Overridden from ShelfIconObserver |
93 virtual void OnLauncherIconPositionsChanged() OVERRIDE; | 93 virtual void OnShelfIconPositionsChanged() OVERRIDE; |
94 | 94 |
95 // Overridden from ash::ShellObserver | 95 // Overridden from ShellObserver |
96 virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE; | 96 virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE; |
97 | 97 |
98 // Overridden from ash::wm::WindowStateObserver | 98 // Overridden from ash::wm::WindowStateObserver |
99 virtual void OnWindowShowTypeChanged(wm::WindowState* window_state, | 99 virtual void OnWindowShowTypeChanged(wm::WindowState* window_state, |
100 wm::WindowShowType old_type) OVERRIDE; | 100 wm::WindowShowType old_type) OVERRIDE; |
101 | 101 |
102 // Overridden from aura::WindowObserver | 102 // Overridden from aura::WindowObserver |
103 virtual void OnWindowVisibilityChanged(aura::Window* window, | 103 virtual void OnWindowVisibilityChanged(aura::Window* window, |
104 bool visible) OVERRIDE; | 104 bool visible) OVERRIDE; |
105 | 105 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 aura::Window* last_active_panel_; | 183 aura::Window* last_active_panel_; |
184 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; | 184 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; |
185 | 185 |
186 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); | 186 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); |
187 }; | 187 }; |
188 | 188 |
189 } // namespace internal | 189 } // namespace internal |
190 } // namespace ash | 190 } // namespace ash |
191 | 191 |
192 #endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ | 192 #endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ |
OLD | NEW |