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

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

Issue 9515003: Fix the full screen switching browser window dipping below launcher bar issue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the issue for managed window mode, add tests. Created 8 years, 9 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
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/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void WorkspaceManager::SetOverview(bool overview) { 180 void WorkspaceManager::SetOverview(bool overview) {
181 if (is_overview_ == overview) 181 if (is_overview_ == overview)
182 return; 182 return;
183 NOTIMPLEMENTED(); 183 NOTIMPLEMENTED();
184 } 184 }
185 185
186 void WorkspaceManager::SetWorkspaceSize(const gfx::Size& workspace_size) { 186 void WorkspaceManager::SetWorkspaceSize(const gfx::Size& workspace_size) {
187 if (workspace_size == workspace_size_) 187 if (workspace_size == workspace_size_)
188 return; 188 return;
189 workspace_size_ = workspace_size; 189 workspace_size_ = workspace_size;
190 SetWorkspaceBounds();
191 }
192
193 void WorkspaceManager::SetWorkspaceBounds() {
190 for (Workspaces::const_iterator i = workspaces_.begin(); 194 for (Workspaces::const_iterator i = workspaces_.begin();
191 i != workspaces_.end(); ++i) { 195 i != workspaces_.end(); ++i) {
192 (*i)->SetBounds(GetWorkAreaBounds()); 196 (*i)->SetBounds(GetWorkAreaBounds());
193 } 197 }
194 } 198 }
195 199
196 gfx::Rect WorkspaceManager::AlignBoundsToGrid(const gfx::Rect& bounds) { 200 gfx::Rect WorkspaceManager::AlignBoundsToGrid(const gfx::Rect& bounds) {
197 if (grid_size_ <= 1) 201 if (grid_size_ <= 1)
198 return bounds; 202 return bounds;
199 return AlignRectToGrid(bounds, grid_size_); 203 return AlignRectToGrid(bounds, grid_size_);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 if (type == Workspace::TYPE_MAXIMIZED) 420 if (type == Workspace::TYPE_MAXIMIZED)
417 workspace = new MaximizedWorkspace(this); 421 workspace = new MaximizedWorkspace(this);
418 else 422 else
419 workspace = new ManagedWorkspace(this); 423 workspace = new ManagedWorkspace(this);
420 AddWorkspace(workspace); 424 AddWorkspace(workspace);
421 return workspace; 425 return workspace;
422 } 426 }
423 427
424 } // namespace internal 428 } // namespace internal
425 } // namespace ash 429 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698