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

Side by Side Diff: ui/aura_shell/workspace/workspace.cc

Issue 8574033: Beginnings of Window Modality support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura_shell/workspace/workspace.h" 5 #include "ui/aura_shell/workspace/workspace.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 int Workspace::GetIndexOf(aura::Window* window) const { 233 int Workspace::GetIndexOf(aura::Window* window) const {
234 aura::Window::Windows::const_iterator i = 234 aura::Window::Windows::const_iterator i =
235 std::find(windows_.begin(), windows_.end(), window); 235 std::find(windows_.begin(), windows_.end(), window);
236 return i == windows_.end() ? -1 : i - windows_.begin(); 236 return i == windows_.end() ? -1 : i - windows_.begin();
237 } 237 }
238 238
239 bool Workspace::CanAdd(aura::Window* window) const { 239 bool Workspace::CanAdd(aura::Window* window) const {
240 // TODO(oshima): This should be based on available space and the 240 // TODO(oshima): This should be based on available space and the
241 // size of the |window|. 241 // size of the |window|.
242 NOTIMPLEMENTED(); 242 //NOTIMPLEMENTED();
sky 2011/11/16 17:13:06 Did you intend to comment this out?
243 return windows_.size() < g_max_windows_per_workspace; 243 return windows_.size() < g_max_windows_per_workspace;
244 } 244 }
245 245
246 void Workspace::MoveWindowTo( 246 void Workspace::MoveWindowTo(
247 aura::Window* window, 247 aura::Window* window,
248 const gfx::Point& origin, 248 const gfx::Point& origin,
249 bool animate) { 249 bool animate) {
250 gfx::Rect bounds = GetLayoutBounds(window); 250 gfx::Rect bounds = GetLayoutBounds(window);
251 gfx::Rect work_area = GetWorkAreaBounds(); 251 gfx::Rect work_area = GetWorkAreaBounds();
252 // Make sure the window isn't bigger than the workspace size. 252 // Make sure the window isn't bigger than the workspace size.
(...skipping 22 matching lines...) Expand all
275 275
276 // static 276 // static
277 size_t Workspace::SetMaxWindowsCount(size_t max) { 277 size_t Workspace::SetMaxWindowsCount(size_t max) {
278 int old = g_max_windows_per_workspace; 278 int old = g_max_windows_per_workspace;
279 g_max_windows_per_workspace = max; 279 g_max_windows_per_workspace = max;
280 return old; 280 return old;
281 } 281 }
282 282
283 } // namespace internal 283 } // namespace internal
284 } // namespace aura_shell 284 } // namespace aura_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698