| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 namespace ash { | 39 namespace ash { |
| 40 class Launcher; | 40 class Launcher; |
| 41 | 41 |
| 42 namespace internal { | 42 namespace internal { |
| 43 class DockedWindowLayoutManagerObserver; | 43 class DockedWindowLayoutManagerObserver; |
| 44 class DockedWindowResizerTest; | 44 class DockedWindowResizerTest; |
| 45 class ShelfLayoutManager; | 45 class ShelfLayoutManager; |
| 46 class WorkspaceController; | 46 class WorkspaceController; |
| 47 | 47 |
| 48 // User action recorded for use in UMA histograms. |
| 49 enum DockedAction { |
| 50 DOCKED_ACTION_CANCEL, // Dragged into or out of dock but cancelled. |
| 51 DOCKED_ACTION_DOCK, // Dragged and docked a window. |
| 52 DOCKED_ACTION_UNDOCK, // Dragged and undocked a window. |
| 53 DOCKED_ACTION_RESIZE, // Resized a docked window. |
| 54 DOCKED_ACTION_REORDER, // Reordered docked windows. |
| 55 DOCKED_ACTION_EVICT, // A docked window could not stay docked. |
| 56 DOCKED_ACTION_MAXIMIZE, // Maximized a docked window. |
| 57 DOCKED_ACTION_MINIMIZE, // Minimized a docked window. |
| 58 DOCKED_ACTION_RESTORE, // Restored a docked window that was minimized. |
| 59 DOCKED_ACTION_CLOSE, // Closed a window while it was docked. |
| 60 DOCKED_ACTION_COUNT, // Maximum value of this enum for histograms use. |
| 61 }; |
| 62 |
| 48 struct WindowWithHeight { | 63 struct WindowWithHeight { |
| 49 explicit WindowWithHeight(aura::Window* window) : | 64 explicit WindowWithHeight(aura::Window* window) : |
| 50 window_(window), | 65 window_(window), |
| 51 height_(window->bounds().height()) { } | 66 height_(window->bounds().height()) { } |
| 52 aura::Window* window() { return window_; } | 67 aura::Window* window() { return window_; } |
| 53 const aura::Window* window() const { return window_; } | 68 const aura::Window* window() const { return window_; } |
| 54 aura::Window* window_; | 69 aura::Window* window_; |
| 55 int height_; | 70 int height_; |
| 56 }; | 71 }; |
| 57 | 72 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // Target bounds of a docked window being dragged. | 275 // Target bounds of a docked window being dragged. |
| 261 gfx::Rect dragged_bounds_; | 276 gfx::Rect dragged_bounds_; |
| 262 | 277 |
| 263 // Side of the screen that the dock is positioned at. | 278 // Side of the screen that the dock is positioned at. |
| 264 DockedAlignment alignment_; | 279 DockedAlignment alignment_; |
| 265 | 280 |
| 266 // The last active window. Used to maintain stacking order even if no windows | 281 // The last active window. Used to maintain stacking order even if no windows |
| 267 // are currently focused. | 282 // are currently focused. |
| 268 aura::Window* last_active_window_; | 283 aura::Window* last_active_window_; |
| 269 | 284 |
| 285 // Number of windows that were docked last time when a window was docked or |
| 286 // undocked. |
| 287 int previous_docked_windows_; |
| 288 |
| 270 // Widget used to paint a background for the docked area. | 289 // Widget used to paint a background for the docked area. |
| 271 scoped_ptr<views::Widget> background_widget_; | 290 scoped_ptr<views::Widget> background_widget_; |
| 272 | 291 |
| 273 // Observers of dock bounds changes. | 292 // Observers of dock bounds changes. |
| 274 ObserverList<DockedWindowLayoutManagerObserver> observer_list_; | 293 ObserverList<DockedWindowLayoutManagerObserver> observer_list_; |
| 275 | 294 |
| 276 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); | 295 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); |
| 277 }; | 296 }; |
| 278 | 297 |
| 279 } // namespace internal | 298 } // namespace internal |
| 280 } // namespace ash | 299 } // namespace ash |
| 281 | 300 |
| 282 #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ | 301 #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ |
| OLD | NEW |