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

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

Issue 10857021: Prepare a bunch of ash tests for workspace2. With Workspace2 you can't (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_manager.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_manager.h" 5 #include "ash/wm/workspace/workspace_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 workspace->RemoveWindow(window); 127 workspace->RemoveWindow(window);
128 CleanupWorkspace(workspace); 128 CleanupWorkspace(workspace);
129 } 129 }
130 130
131 void WorkspaceManager::SetActiveWorkspaceByWindow(aura::Window* window) { 131 void WorkspaceManager::SetActiveWorkspaceByWindow(aura::Window* window) {
132 Workspace* workspace = FindBy(window); 132 Workspace* workspace = FindBy(window);
133 if (workspace) 133 if (workspace)
134 workspace->Activate(); 134 workspace->Activate();
135 } 135 }
136 136
137 void WorkspaceManager::SetGridSize(int grid_size) {
138 grid_size_ = grid_size;
139 }
140
137 void WorkspaceManager::UpdateShelfVisibility() { 141 void WorkspaceManager::UpdateShelfVisibility() {
138 if (shelf_) 142 if (shelf_)
139 shelf_->UpdateVisibilityState(); 143 shelf_->UpdateVisibilityState();
140 } 144 }
141 145
142 WorkspaceWindowState WorkspaceManager::GetWindowState() const { 146 WorkspaceWindowState WorkspaceManager::GetWindowState() const {
143 if (!shelf_ || !active_workspace_) 147 if (!shelf_ || !active_workspace_)
144 return WORKSPACE_WINDOW_STATE_DEFAULT; 148 return WORKSPACE_WINDOW_STATE_DEFAULT;
145 149
146 // TODO: this code needs to be made multi-display aware. 150 // TODO: this code needs to be made multi-display aware.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 return workspace; 352 return workspace;
349 } 353 }
350 354
351 void WorkspaceManager::CleanupWorkspace(Workspace* workspace) { 355 void WorkspaceManager::CleanupWorkspace(Workspace* workspace) {
352 if (workspace->type() != Workspace::TYPE_MANAGED && workspace->is_empty()) 356 if (workspace->type() != Workspace::TYPE_MANAGED && workspace->is_empty())
353 delete workspace; 357 delete workspace;
354 } 358 }
355 359
356 } // namespace internal 360 } // namespace internal
357 } // namespace ash 361 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_manager.h ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698