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

Unified Diff: ui/aura/window_tree_host_x11.cc

Issue 1922783002: Move gfx::Display/Screen to display::Display/Screen in aura/events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/aura/window_tree_host_x11.cc
diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc
index a5675e9f3cedb32fc07ed8bb48bd7404c56a1a82..0bbd0a0ce0e799f47c777b9438f6d89e5cb8fea0 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -37,6 +37,7 @@
#include "ui/compositor/compositor.h"
#include "ui/compositor/dip_util.h"
#include "ui/compositor/layer.h"
+#include "ui/display/screen.h"
#include "ui/events/devices/x11/device_data_manager_x11.h"
#include "ui/events/devices/x11/device_list_cache_x11.h"
#include "ui/events/devices/x11/touch_factory_x11.h"
@@ -47,7 +48,6 @@
#include "ui/events/platform/platform_event_observer.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/events/platform/x11/x11_event_source.h"
-#include "ui/gfx/screen.h"
using std::max;
using std::min;
@@ -257,8 +257,9 @@ uint32_t WindowTreeHostX11::DispatchEvent(const ui::PlatformEvent& event) {
client::CursorClient* cursor_client =
client::GetCursorClient(root_window);
if (cursor_client) {
- const gfx::Display display =
- gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window);
+ const display::Display display =
+ display::Screen::GetScreen()->GetDisplayNearestWindow(
+ root_window);
cursor_client->SetDisplay(display);
}
// EnterNotify creates ET_MOUSE_MOVE. Mark as synthesized as this is
@@ -399,7 +400,7 @@ void WindowTreeHostX11::SetBounds(const gfx::Rect& bounds) {
// Even if the host window's size doesn't change, aura's root window
// size, which is in DIP, changes when the scale changes.
float current_scale = compositor()->device_scale_factor();
- float new_scale = gfx::Screen::GetScreen()
+ float new_scale = display::Screen::GetScreen()
->GetDisplayNearestWindow(window())
.device_scale_factor();
bool origin_changed = bounds_.origin() != bounds.origin();

Powered by Google App Engine
This is Rietveld 408576698