| 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/layout_manager.h" | 20 #include "ui/aura/layout_manager.h" |
| 21 #include "ui/aura/window_observer.h" | |
| 22 #include "ui/keyboard/keyboard_controller.h" | 21 #include "ui/keyboard/keyboard_controller.h" |
| 23 #include "ui/keyboard/keyboard_controller_observer.h" | 22 #include "ui/keyboard/keyboard_controller_observer.h" |
| 24 #include "ui/wm/public/activation_change_observer.h" | 23 #include "ui/wm/public/activation_change_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 { |
| (...skipping 17 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 24 matching lines...) Expand all Loading... |
| 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 OnPostWindowStateTypeChange( | 98 virtual void OnPostWindowStateTypeChange( |
| 101 wm::WindowState* window_state, | 99 wm::WindowState* window_state, |
| 102 wm::WindowStateType old_type) OVERRIDE; | 100 wm::WindowStateType old_type) OVERRIDE; |
| 103 | 101 |
| 104 // Overridden from aura::WindowObserver | |
| 105 virtual void OnWindowVisibilityChanged(aura::Window* window, | |
| 106 bool visible) OVERRIDE; | |
| 107 | |
| 108 // Overridden from aura::client::ActivationChangeObserver | 102 // Overridden from aura::client::ActivationChangeObserver |
| 109 virtual void OnWindowActivated(aura::Window* gained_active, | 103 virtual void OnWindowActivated(aura::Window* gained_active, |
| 110 aura::Window* lost_active) OVERRIDE; | 104 aura::Window* lost_active) OVERRIDE; |
| 111 | 105 |
| 112 // Overridden from DisplayController::Observer | 106 // Overridden from DisplayController::Observer |
| 113 virtual void OnDisplayConfigurationChanged() OVERRIDE; | 107 virtual void OnDisplayConfigurationChanged() OVERRIDE; |
| 114 | 108 |
| 115 // Overridden from ShelfLayoutManagerObserver | 109 // Overridden from ShelfLayoutManagerObserver |
| 116 virtual void WillChangeVisibilityState( | 110 virtual void WillChangeVisibilityState( |
| 117 ShelfVisibilityState new_state) OVERRIDE; | 111 ShelfVisibilityState new_state) OVERRIDE; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 aura::Window* last_active_panel_; | 183 aura::Window* last_active_panel_; |
| 190 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; | 184 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; |
| 191 | 185 |
| 192 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); | 186 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); |
| 193 }; | 187 }; |
| 194 | 188 |
| 195 } // namespace internal | 189 } // namespace internal |
| 196 } // namespace ash | 190 } // namespace ash |
| 197 | 191 |
| 198 #endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ | 192 #endif // ASH_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ |
| OLD | NEW |