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 #include "ash/wm/workspace/workspace_manager.h" | 5 #include "ash/wm/workspace/workspace_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 // static | 154 // static |
155 bool WorkspaceManager::IsMaximizedState(ui::WindowShowState state) { | 155 bool WorkspaceManager::IsMaximizedState(ui::WindowShowState state) { |
156 return state == ui::SHOW_STATE_MAXIMIZED || | 156 return state == ui::SHOW_STATE_MAXIMIZED || |
157 state == ui::SHOW_STATE_FULLSCREEN; | 157 state == ui::SHOW_STATE_FULLSCREEN; |
158 } | 158 } |
159 | 159 |
160 // static | 160 // static |
161 bool WorkspaceManager::WillRestoreMaximized(Window* window) { | 161 bool WorkspaceManager::WillRestoreMaximized(Window* window) { |
162 return wm::IsWindowMinimized(window) && | 162 return wm::IsWindowMinimized(window) && |
163 IsMaximizedState(window->GetProperty(internal::kRestoreShowStateKey)); | 163 IsMaximizedState(window->GetProperty(aura::client::kRestoreShowStateKey)); |
164 } | 164 } |
165 | 165 |
166 WorkspaceWindowState WorkspaceManager::GetWindowState() const { | 166 WorkspaceWindowState WorkspaceManager::GetWindowState() const { |
167 if (!shelf_) | 167 if (!shelf_) |
168 return WORKSPACE_WINDOW_STATE_DEFAULT; | 168 return WORKSPACE_WINDOW_STATE_DEFAULT; |
169 | 169 |
170 const bool is_active_maximized = active_workspace_->is_maximized(); | 170 const bool is_active_maximized = active_workspace_->is_maximized(); |
171 const gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); | 171 const gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); |
172 const Window::Windows& windows(active_workspace_->window()->children()); | 172 const Window::Windows& windows(active_workspace_->window()->children()); |
173 bool window_overlaps_launcher = false; | 173 bool window_overlaps_launcher = false; |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 new_workspace->window()->Show(); | 823 new_workspace->window()->Show(); |
824 ReparentWindow(window, new_workspace->window(), NULL); | 824 ReparentWindow(window, new_workspace->window(), NULL); |
825 if (is_active) { | 825 if (is_active) { |
826 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED, | 826 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED, |
827 base::TimeDelta()); | 827 base::TimeDelta()); |
828 } | 828 } |
829 } | 829 } |
830 | 830 |
831 } // namespace internal | 831 } // namespace internal |
832 } // namespace ash | 832 } // namespace ash |
OLD | NEW |