Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ |
| 6 #define ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shelf/shelf_layout_manager_observer.h" | 9 #include "ash/shelf/shelf_layout_manager_observer.h" |
| 10 #include "ash/shell_observer.h" | 10 #include "ash/shell_observer.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 virtual void SetChildBounds(aura::Window* child, | 96 virtual void SetChildBounds(aura::Window* child, |
| 97 const gfx::Rect& requested_bounds) OVERRIDE; | 97 const gfx::Rect& requested_bounds) OVERRIDE; |
| 98 | 98 |
| 99 // ash::ShellObserver: | 99 // ash::ShellObserver: |
| 100 virtual void OnShelfAlignmentChanged(aura::RootWindow* root_window) OVERRIDE; | 100 virtual void OnShelfAlignmentChanged(aura::RootWindow* root_window) OVERRIDE; |
| 101 | 101 |
| 102 // aura::WindowObserver: | 102 // aura::WindowObserver: |
| 103 virtual void OnWindowPropertyChanged(aura::Window* window, | 103 virtual void OnWindowPropertyChanged(aura::Window* window, |
| 104 const void* key, | 104 const void* key, |
| 105 intptr_t old) OVERRIDE; | 105 intptr_t old) OVERRIDE; |
| 106 virtual void OnWindowBoundsChanged(aura::Window* window, | |
| 107 const gfx::Rect& old_bounds, | |
| 108 const gfx::Rect& new_bounds) OVERRIDE; | |
| 106 | 109 |
| 107 // aura::client::ActivationChangeObserver: | 110 // aura::client::ActivationChangeObserver: |
| 108 virtual void OnWindowActivated(aura::Window* gained_active, | 111 virtual void OnWindowActivated(aura::Window* gained_active, |
| 109 aura::Window* lost_active) OVERRIDE; | 112 aura::Window* lost_active) OVERRIDE; |
| 110 | 113 |
| 111 // ShelfLayoutManagerObserver: | 114 // ShelfLayoutManagerObserver: |
| 112 virtual void WillChangeVisibilityState( | 115 virtual void WillChangeVisibilityState( |
| 113 ShelfVisibilityState new_state) OVERRIDE; | 116 ShelfVisibilityState new_state) OVERRIDE; |
| 114 | 117 |
| 115 private: | 118 private: |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 void UpdateStacking(aura::Window* active_window); | 152 void UpdateStacking(aura::Window* active_window); |
| 150 | 153 |
| 151 // keyboard::KeyboardControllerObserver: | 154 // keyboard::KeyboardControllerObserver: |
| 152 virtual void OnKeyboardBoundsChanging( | 155 virtual void OnKeyboardBoundsChanging( |
| 153 const gfx::Rect& keyboard_bounds) OVERRIDE; | 156 const gfx::Rect& keyboard_bounds) OVERRIDE; |
| 154 | 157 |
| 155 // Parent window associated with this layout manager. | 158 // Parent window associated with this layout manager. |
| 156 aura::Window* dock_container_; | 159 aura::Window* dock_container_; |
| 157 // Protect against recursive calls to Relayout(). | 160 // Protect against recursive calls to Relayout(). |
| 158 bool in_layout_; | 161 bool in_layout_; |
| 162 // The former child being dragged. | |
| 163 aura::Window* dragged_former_child_; | |
|
flackr
2013/07/18 22:16:53
Is there any reason not to use dragged_window_ for
varkha
2013/07/18 22:58:14
Not anymore - nice catch. Done.
| |
| 159 // The docked window being dragged. | 164 // The docked window being dragged. |
| 160 aura::Window* dragged_window_; | 165 aura::Window* dragged_window_; |
| 161 // The launcher we are observing for launcher icon changes. | 166 // The launcher we are observing for launcher icon changes. |
| 162 Launcher* launcher_; | 167 Launcher* launcher_; |
| 163 // The shelf layout manager being observed for visibility changes. | 168 // The shelf layout manager being observed for visibility changes. |
| 164 ShelfLayoutManager* shelf_layout_manager_; | 169 ShelfLayoutManager* shelf_layout_manager_; |
| 165 // Tracks the visibility of the shelf. Defaults to false when there is no | 170 // Tracks the visibility of the shelf. Defaults to false when there is no |
| 166 // shelf. | 171 // shelf. |
| 167 bool shelf_hidden_; | 172 bool shelf_hidden_; |
| 168 // Current width of the dock. | 173 // Current width of the dock. |
| 169 int docked_width_; | 174 int docked_width_; |
| 170 | 175 |
| 171 // Last bounds that were sent to observers. | 176 // Last bounds that were sent to observers. |
| 172 gfx::Rect docked_bounds_; | 177 gfx::Rect docked_bounds_; |
| 173 | 178 |
| 174 // Side of the screen that the dock is positioned at. | 179 // Side of the screen that the dock is positioned at. |
| 175 DockedAlignment alignment_; | 180 DockedAlignment alignment_; |
| 176 | 181 |
| 182 // The last active window. Used to maintain stacking even if no windows are | |
| 183 // currently focused. | |
| 184 aura::Window* last_active_; | |
| 185 | |
| 177 // Observers of dock bounds changes. | 186 // Observers of dock bounds changes. |
| 178 ObserverList<DockedWindowLayoutManagerObserver> observer_list_; | 187 ObserverList<DockedWindowLayoutManagerObserver> observer_list_; |
| 179 | 188 |
| 180 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); | 189 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); |
| 181 }; | 190 }; |
| 182 | 191 |
| 183 } // namespace internal | 192 } // namespace internal |
| 184 } // namespace ash | 193 } // namespace ash |
| 185 | 194 |
| 186 #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ | 195 #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ |
| OLD | NEW |