| 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_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| 6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "ash/shell_observer.h" | 10 #include "ash/shell_observer.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 virtual void OnWindowPropertyChanged(aura::Window* window, | 55 virtual void OnWindowPropertyChanged(aura::Window* window, |
| 56 const void* key, | 56 const void* key, |
| 57 intptr_t old) OVERRIDE; | 57 intptr_t old) OVERRIDE; |
| 58 | 58 |
| 59 // ash::WindowSettings::Observer overrides: | 59 // ash::WindowSettings::Observer overrides: |
| 60 virtual void OnTrackedByWorkspaceChanged(aura::Window* window, | 60 virtual void OnTrackedByWorkspaceChanged(aura::Window* window, |
| 61 bool old) OVERRIDE; | 61 bool old) OVERRIDE; |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Overridden from BaseLayoutManager: | 64 // Overridden from BaseLayoutManager: |
| 65 virtual void ShowStateChanged(aura::Window* window, | 65 virtual void ShowStateChanged(wm::WindowState* window_state, |
| 66 ui::WindowShowState last_show_state) OVERRIDE; | 66 ui::WindowShowState last_show_state) OVERRIDE; |
| 67 virtual void AdjustAllWindowsBoundsForWorkAreaChange( | 67 virtual void AdjustAllWindowsBoundsForWorkAreaChange( |
| 68 AdjustWindowReason reason) OVERRIDE; | 68 AdjustWindowReason reason) OVERRIDE; |
| 69 virtual void AdjustWindowBoundsForWorkAreaChange( | 69 virtual void AdjustWindowBoundsForWorkAreaChange( |
| 70 aura::Window* window, | 70 wm::WindowState* window_state, |
| 71 AdjustWindowReason reason) OVERRIDE; | 71 AdjustWindowReason reason) OVERRIDE; |
| 72 | 72 |
| 73 void AdjustWindowBoundsWhenAdded(aura::Window* window); | 73 void AdjustWindowBoundsWhenAdded(wm::WindowState* window_state); |
| 74 | 74 |
| 75 void UpdateDesktopVisibility(); | 75 void UpdateDesktopVisibility(); |
| 76 | 76 |
| 77 // Updates the bounds of the window for a show state change from | 77 // Updates the bounds of the window for a show state change from |
| 78 // |last_show_state|. | 78 // |last_show_state|. |
| 79 void UpdateBoundsFromShowState(aura::Window* window, | 79 void UpdateBoundsFromShowState(wm::WindowState* window_state, |
| 80 ui::WindowShowState last_show_state); | 80 ui::WindowShowState last_show_state); |
| 81 | 81 |
| 82 // If |window| is maximized or fullscreen the bounds of the window are set and | 82 // If |window_state| is maximized or fullscreen the bounds of the |
| 83 // true is returned. Does nothing otherwise. | 83 // window are set and true is returned. Does nothing otherwise. |
| 84 bool SetMaximizedOrFullscreenBounds(aura::Window* window); | 84 bool SetMaximizedOrFullscreenBounds(wm::WindowState* window_state); |
| 85 | 85 |
| 86 internal::ShelfLayoutManager* shelf_; | 86 internal::ShelfLayoutManager* shelf_; |
| 87 aura::Window* window_; | 87 aura::Window* window_; |
| 88 | 88 |
| 89 // The work area. Cached to avoid unnecessarily moving windows during a | 89 // The work area. Cached to avoid unnecessarily moving windows during a |
| 90 // workspace switch. | 90 // workspace switch. |
| 91 gfx::Rect work_area_; | 91 gfx::Rect work_area_; |
| 92 | 92 |
| 93 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); | 93 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace internal | 96 } // namespace internal |
| 97 } // namespace ash | 97 } // namespace ash |
| 98 | 98 |
| 99 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 99 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| OLD | NEW |