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

Unified Diff: ui/views/drag_utils.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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/drag_utils.cc
diff --git a/ui/views/drag_utils.cc b/ui/views/drag_utils.cc
index b88e5c1aa8ab7891f9e72ae5bb563cf902bcc4ea..50cf583d0a8fcc5f6b2d887b7d8a909784db692f 100644
--- a/ui/views/drag_utils.cc
+++ b/ui/views/drag_utils.cc
@@ -29,8 +29,9 @@ ui::ScaleFactor GetDeviceScaleFactorForNativeView(views::Widget* widget) {
// yet care about device scale factor on other platforms. So to keep drag and
// drop behavior on other platforms un-touched, we wrap this in the #if guard.
if (widget && widget->GetNativeView()) {
- gfx::Display display = gfx::Screen::GetDisplayNearestWindow(
- widget->GetNativeView());
+ gfx::NativeView view = widget->GetNativeView();
+ gfx::Display display = gfx::Screen::GetScreenFor(view)->
+ GetDisplayNearestWindow(view);
device_scale_factor = ui::GetScaleFactorFromScale(
display.device_scale_factor());
}
« no previous file with comments | « ui/views/controls/scrollbar/base_scroll_bar_button.cc ('k') | ui/views/examples/content_client/examples_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698