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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 10836065: Improve WorkspaceWindowResizer::CompleteDrag() so that the function moves the window to a root windo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final rebase 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 | « ui/views/widget/desktop_native_widget_helper_aura.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/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_change_observer.h" 10 #include "ui/aura/client/activation_change_observer.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 window_->GetProperty(aura::client::kRestoreBoundsKey); 450 window_->GetProperty(aura::client::kRestoreBoundsKey);
451 return restore_bounds ? *restore_bounds : window_->bounds(); 451 return restore_bounds ? *restore_bounds : window_->bounds();
452 } 452 }
453 453
454 void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) { 454 void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
455 aura::RootWindow* root = window_->GetRootWindow(); 455 aura::RootWindow* root = window_->GetRootWindow();
456 if (root) { 456 if (root) {
457 aura::client::ScreenPositionClient* screen_position_client = 457 aura::client::ScreenPositionClient* screen_position_client =
458 aura::client::GetScreenPositionClient(root); 458 aura::client::GetScreenPositionClient(root);
459 if (screen_position_client) { 459 if (screen_position_client) {
460 screen_position_client->SetBounds(window_, bounds); 460 gfx::Display dst_display = gfx::Screen::GetDisplayMatching(bounds);
461 screen_position_client->SetBounds(window_, bounds, dst_display);
461 return; 462 return;
462 } 463 }
463 } 464 }
464 window_->SetBounds(bounds); 465 window_->SetBounds(bounds);
465 } 466 }
466 467
467 void NativeWidgetAura::SetSize(const gfx::Size& size) { 468 void NativeWidgetAura::SetSize(const gfx::Size& size) {
468 window_->SetBounds(gfx::Rect(window_->bounds().origin(), size)); 469 window_->SetBounds(gfx::Rect(window_->bounds().origin(), size));
469 } 470 }
470 471
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 return aura::Env::GetInstance()->is_mouse_button_down(); 1050 return aura::Env::GetInstance()->is_mouse_button_down();
1050 } 1051 }
1051 1052
1052 // static 1053 // static
1053 bool NativeWidgetPrivate::IsTouchDown() { 1054 bool NativeWidgetPrivate::IsTouchDown() {
1054 return aura::Env::GetInstance()->is_touch_down(); 1055 return aura::Env::GetInstance()->is_touch_down();
1055 } 1056 }
1056 1057
1057 } // namespace internal 1058 } // namespace internal
1058 } // namespace views 1059 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_native_widget_helper_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698