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

Unified Diff: ash/tooltips/tooltip_controller.cc

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 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: ash/tooltips/tooltip_controller.cc
diff --git a/ash/tooltips/tooltip_controller.cc b/ash/tooltips/tooltip_controller.cc
index ba69352dd915a60e7ec42f24467d602d8ac8de62..45957db739b4646638268ccdd68d58e47949ea77 100644
--- a/ash/tooltips/tooltip_controller.cc
+++ b/ash/tooltips/tooltip_controller.cc
@@ -65,7 +65,7 @@ int GetMaxWidth(int x, int y) {
// TODO(varunjain): implementation duplicated in tooltip_manager_aura. Figure
// out a way to merge.
gfx::Rect monitor_bounds =
- gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y));
+ gfx::Screen::GetMonitorNearestPoint(gfx::Point(x, y)).bounds();
return (monitor_bounds.width() + 1) / 2;
}
@@ -155,7 +155,7 @@ class TooltipController::Tooltip {
tooltip_rect.Offset(kCursorOffsetX, kCursorOffsetY);
gfx::Rect monitor_bounds =
- gfx::Screen::GetMonitorAreaNearestPoint(tooltip_rect.origin());
+ gfx::Screen::GetMonitorNearestPoint(tooltip_rect.origin()).bounds();
// If tooltip is out of bounds on the x axis, we simply shift it
// horizontally by the offset.

Powered by Google App Engine
This is Rietveld 408576698