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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.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
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index e2fb724b9146b073cbb06b8b2d997c12ba6c4888..e2eaf147b954f7cfc527db9825e60eeebbba6630 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -820,7 +820,7 @@ void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) {
if (fullscreen) {
restored_bounds_in_pixels_ = bounds_in_pixels_;
const gfx::Display display =
- gfx::Screen::GetScreenFor(NULL)->GetDisplayNearestWindow(window());
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(window());
bounds_in_pixels_ = ToPixelRect(display.bounds());
} else {
bounds_in_pixels_ = restored_bounds_in_pixels_;
@@ -938,10 +938,10 @@ void DesktopWindowTreeHostX11::SizeConstraintsChanged() {
// DesktopWindowTreeHostX11, aura::WindowTreeHost implementation:
gfx::Transform DesktopWindowTreeHostX11::GetRootTransform() const {
- gfx::Display display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
+ gfx::Display display = gfx::Screen::GetScreen()->GetPrimaryDisplay();
if (window_mapped_) {
aura::Window* win = const_cast<aura::Window*>(window());
- display = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(win);
+ display = gfx::Screen::GetScreen()->GetDisplayNearestWindow(win);
}
float scale = display.device_scale_factor();
@@ -1287,7 +1287,7 @@ void DesktopWindowTreeHostX11::InitX11Window(
gfx::Size DesktopWindowTreeHostX11::AdjustSize(
const gfx::Size& requested_size_in_pixels) {
std::vector<gfx::Display> displays =
- gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)->GetAllDisplays();
+ gfx::Screen::GetScreen()->GetAllDisplays();
// Compare against all monitor sizes. The window manager can move the window
// to whichever monitor it wants.
for (size_t i = 0; i < displays.size(); ++i) {
@@ -1533,9 +1533,9 @@ void DesktopWindowTreeHostX11::ConvertEventToDifferentHost(
DesktopWindowTreeHostX11* host) {
DCHECK_NE(this, host);
const gfx::Display display_src =
- gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(window());
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(window());
const gfx::Display display_dest =
- gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(host->window());
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(host->window());
DCHECK_EQ(display_src.device_scale_factor(),
display_dest.device_scale_factor());
gfx::Vector2d offset = GetLocationOnNativeScreen() -
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.cc ('k') | ui/views/widget/desktop_aura/x11_window_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698