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

Unified Diff: ui/display/screen.cc

Issue 2721203007: gfx::NativeView <-> NativeWindow in dislpay.h (Closed)
Patch Set: scope Created 3 years, 10 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/display/screen.h ('k') | ui/display/screen_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/screen.cc
diff --git a/ui/display/screen.cc b/ui/display/screen.cc
index f77133ace84ee5ddf29a8fa9be27130dbfabc3d0..6136f707d487b831b6656e7e9747602a9dcbaec4 100644
--- a/ui/display/screen.cc
+++ b/ui/display/screen.cc
@@ -34,6 +34,10 @@ void Screen::SetScreenInstance(Screen* instance) {
g_screen = instance;
}
+Display GetDisplayNearestView(gfx::NativeView view) const {
+ return GetDisplayNearestWindow(WindowForView(view));
+}
+
gfx::Rect Screen::ScreenToDIPRectInWindow(gfx::NativeView view,
const gfx::Rect& screen_rect) const {
float scale = GetDisplayNearestWindow(view).device_scale_factor();
« no previous file with comments | « ui/display/screen.h ('k') | ui/display/screen_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698