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

Side by Side Diff: ui/aura/window.cc

Issue 10795027: Move a window if the sceren bounds being set is in other display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adjust for win_aura Created 8 years, 5 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_window_resizer.cc ('k') | no next file » | 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 "ui/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 else 291 else
292 SetBoundsInternal(new_bounds); 292 SetBoundsInternal(new_bounds);
293 } 293 }
294 294
295 void Window::SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen) { 295 void Window::SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen) {
296 RootWindow* root = GetRootWindow(); 296 RootWindow* root = GetRootWindow();
297 if (root) { 297 if (root) {
298 gfx::Point origin = new_bounds_in_screen.origin(); 298 gfx::Point origin = new_bounds_in_screen.origin();
299 aura::client::ScreenPositionClient* screen_position_client = 299 aura::client::ScreenPositionClient* screen_position_client =
300 aura::client::GetScreenPositionClient(root); 300 aura::client::GetScreenPositionClient(root);
301 screen_position_client->ConvertPointFromScreen( 301 screen_position_client->SetBounds(this, new_bounds_in_screen);
302 parent(), &origin);
303 SetBounds(gfx::Rect(origin, new_bounds_in_screen.size()));
304 return; 302 return;
305 } 303 }
306 SetBounds(new_bounds_in_screen); 304 SetBounds(new_bounds_in_screen);
307 } 305 }
308 306
309 gfx::Rect Window::GetTargetBounds() const { 307 gfx::Rect Window::GetTargetBounds() const {
310 return layer_->GetTargetBounds(); 308 return layer_->GetTargetBounds();
311 } 309 }
312 310
313 const gfx::Rect& Window::bounds() const { 311 const gfx::Rect& Window::bounds() const {
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 for (Windows::const_reverse_iterator it = children_.rbegin(), 945 for (Windows::const_reverse_iterator it = children_.rbegin(),
948 rend = children_.rend(); 946 rend = children_.rend();
949 it != rend; ++it) { 947 it != rend; ++it) {
950 Window* child = *it; 948 Window* child = *it;
951 child->PrintWindowHierarchy(depth + 1); 949 child->PrintWindowHierarchy(depth + 1);
952 } 950 }
953 } 951 }
954 #endif 952 #endif
955 953
956 } // namespace aura 954 } // namespace aura
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698