OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |