Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: ash/wm/workspace/workspace_manager2.cc

Issue 11201002: Removes worskpace 1 code. Will rename next. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove constants and add back kDisableLoginAnimations Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/workspace_manager2.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_manager2.h" 5 #include "ash/wm/workspace/workspace_manager2.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return state == ui::SHOW_STATE_MAXIMIZED || 147 return state == ui::SHOW_STATE_MAXIMIZED ||
148 state == ui::SHOW_STATE_FULLSCREEN; 148 state == ui::SHOW_STATE_FULLSCREEN;
149 } 149 }
150 150
151 // static 151 // static
152 bool WorkspaceManager2::WillRestoreMaximized(Window* window) { 152 bool WorkspaceManager2::WillRestoreMaximized(Window* window) {
153 return wm::IsWindowMinimized(window) && 153 return wm::IsWindowMinimized(window) &&
154 IsMaximizedState(window->GetProperty(internal::kRestoreShowStateKey)); 154 IsMaximizedState(window->GetProperty(internal::kRestoreShowStateKey));
155 } 155 }
156 156
157 bool WorkspaceManager2::IsInMaximizedMode() const {
158 return active_workspace_ && active_workspace_->is_maximized();
159 }
160
161 WorkspaceWindowState WorkspaceManager2::GetWindowState() const { 157 WorkspaceWindowState WorkspaceManager2::GetWindowState() const {
162 if (!shelf_) 158 if (!shelf_)
163 return WORKSPACE_WINDOW_STATE_DEFAULT; 159 return WORKSPACE_WINDOW_STATE_DEFAULT;
164 160
165 const bool is_active_maximized = active_workspace_->is_maximized(); 161 const bool is_active_maximized = active_workspace_->is_maximized();
166 const gfx::Rect shelf_bounds(shelf_->GetIdealBounds()); 162 const gfx::Rect shelf_bounds(shelf_->GetIdealBounds());
167 const Window::Windows& windows(active_workspace_->window()->children()); 163 const Window::Windows& windows(active_workspace_->window()->children());
168 bool window_overlaps_launcher = false; 164 bool window_overlaps_launcher = false;
169 bool has_maximized_window = false; 165 bool has_maximized_window = false;
170 for (Window::Windows::const_iterator i = windows.begin(); 166 for (Window::Windows::const_iterator i = windows.begin();
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 new_workspace->window()->Show(); 712 new_workspace->window()->Show();
717 ReparentWindow(window, new_workspace->window(), NULL); 713 ReparentWindow(window, new_workspace->window(), NULL);
718 if (is_active) { 714 if (is_active) {
719 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED, 715 SetActiveWorkspace(new_workspace, SWITCH_TRACKED_BY_WORKSPACE_CHANGED,
720 base::TimeDelta()); 716 base::TimeDelta());
721 } 717 }
722 } 718 }
723 719
724 } // namespace internal 720 } // namespace internal
725 } // namespace ash 721 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_manager2.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698