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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/x11_window_event_filter.cc ('k') | ui/views/widget/tooltip_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 5072bd50a7e0ed343474bbdd0b443ad5bf39c018..12b6255aef37b20057298db70b940b3f7b58f890 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -137,8 +137,8 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
// If a parent is specified but no bounds are given,
// use the origin of the parent's display so that the widget
// will be added to the same display as the parent.
- gfx::Rect bounds = gfx::Screen::GetScreenFor(parent)->
- GetDisplayNearestWindow(parent).bounds();
+ gfx::Rect bounds =
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(parent).bounds();
window_bounds.set_origin(bounds.origin());
}
}
@@ -283,8 +283,8 @@ void NativeWidgetAura::CenterWindow(const gfx::Size& size) {
// When centering window, we take the intersection of the host and
// the parent. We assume the root window represents the visible
// rect of a single screen.
- gfx::Rect work_area = gfx::Screen::GetScreenFor(window_)->
- GetDisplayNearestWindow(window_).work_area();
+ gfx::Rect work_area =
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(window_).work_area();
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(window_->GetRootWindow());
@@ -404,7 +404,7 @@ void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
aura::client::GetScreenPositionClient(root);
if (screen_position_client) {
gfx::Display dst_display =
- gfx::Screen::GetScreenFor(window_)->GetDisplayMatching(bounds);
+ gfx::Screen::GetScreen()->GetDisplayMatching(bounds);
screen_position_client->SetBounds(window_, bounds, dst_display);
return;
}
@@ -643,8 +643,7 @@ void NativeWidgetAura::ClearNativeFocus() {
gfx::Rect NativeWidgetAura::GetWorkAreaBoundsInScreen() const {
if (!window_)
return gfx::Rect();
- return gfx::Screen::GetScreenFor(window_)->
- GetDisplayNearestWindow(window_).work_area();
+ return gfx::Screen::GetScreen()->GetDisplayNearestWindow(window_).work_area();
}
Widget::MoveLoopResult NativeWidgetAura::RunMoveLoop(
« no previous file with comments | « ui/views/widget/desktop_aura/x11_window_event_filter.cc ('k') | ui/views/widget/tooltip_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698