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

Unified Diff: ui/views/widget/tooltip_manager_aura.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
« no previous file with comments | « ui/views/widget/tooltip_manager.cc ('k') | ui/views/widget/tooltip_manager_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/tooltip_manager_aura.cc
diff --git a/ui/views/widget/tooltip_manager_aura.cc b/ui/views/widget/tooltip_manager_aura.cc
index 0636daea18a4d948f1762f299e5c9065b1f57fb9..2b76750a2963b3d9e8803902ca8e8698f89a51ef 100644
--- a/ui/views/widget/tooltip_manager_aura.cc
+++ b/ui/views/widget/tooltip_manager_aura.cc
@@ -28,9 +28,10 @@ gfx::Font TooltipManager::GetDefaultFont() {
}
// static
-int TooltipManager::GetMaxWidth(int x, int y) {
+int TooltipManager::GetMaxWidth(int x, int y, gfx::NativeView context) {
gfx::Rect monitor_bounds =
- gfx::Screen::GetDisplayNearestPoint(gfx::Point(x, y)).bounds();
+ gfx::Screen::GetScreenFor(context)->GetDisplayNearestPoint(
+ gfx::Point(x, y)).bounds();
return (monitor_bounds.width() + 1) / 2;
}
« no previous file with comments | « ui/views/widget/tooltip_manager.cc ('k') | ui/views/widget/tooltip_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698