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

Unified Diff: ash/tooltips/tooltip_controller.cc

Issue 10675011: Rename the remaining usage of Monitor to Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 6 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 | « ash/test/ash_test_base.cc ('k') | ash/wm/base_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/tooltips/tooltip_controller.cc
diff --git a/ash/tooltips/tooltip_controller.cc b/ash/tooltips/tooltip_controller.cc
index 64ca6f0b2bb59928e85875595f6f2e5904432736..4798cd33ecf009ab174d5c0bb0e733c1fe2d91ce 100644
--- a/ash/tooltips/tooltip_controller.cc
+++ b/ash/tooltips/tooltip_controller.cc
@@ -66,9 +66,9 @@ gfx::Font GetDefaultFont() {
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::Rect display_bounds =
gfx::Screen::GetDisplayNearestPoint(gfx::Point(x, y)).bounds();
- return (monitor_bounds.width() + 1) / 2;
+ return (display_bounds.width() + 1) / 2;
}
// Creates a widget of type TYPE_TOOLTIP
@@ -155,22 +155,22 @@ class TooltipController::Tooltip {
tooltip_height);
tooltip_rect.Offset(kCursorOffsetX, kCursorOffsetY);
- gfx::Rect monitor_bounds =
+ gfx::Rect display_bounds =
gfx::Screen::GetDisplayNearestPoint(tooltip_rect.origin()).bounds();
// If tooltip is out of bounds on the x axis, we simply shift it
// horizontally by the offset.
- if (tooltip_rect.right() > monitor_bounds.right()) {
- int h_offset = tooltip_rect.right() - monitor_bounds.right();
+ if (tooltip_rect.right() > display_bounds.right()) {
+ int h_offset = tooltip_rect.right() - display_bounds.right();
tooltip_rect.Offset(-h_offset, 0);
}
// If tooltip is out of bounds on the y axis, we flip it to appear above the
// mouse cursor instead of below.
- if (tooltip_rect.bottom() > monitor_bounds.bottom())
+ if (tooltip_rect.bottom() > display_bounds.bottom())
tooltip_rect.set_y(mouse_pos.y() - tooltip_height);
- widget_->SetBounds(tooltip_rect.AdjustToFit(monitor_bounds));
+ widget_->SetBounds(tooltip_rect.AdjustToFit(display_bounds));
}
};
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/wm/base_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698