summaryrefslogtreecommitdiffstats
path: root/ash/tooltips
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 22:21:47 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 22:21:47 +0000
commit2e236a564aa06711455408a2b13ac8f52ac79343 (patch)
tree04478bff847bfd8b6d90437bf79f41a5caf0b398 /ash/tooltips
parent56827e84ada3c06d8533e01d2fa739f0cb432fa8 (diff)
downloadchromium_src-2e236a564aa06711455408a2b13ac8f52ac79343.zip
chromium_src-2e236a564aa06711455408a2b13ac8f52ac79343.tar.gz
chromium_src-2e236a564aa06711455408a2b13ac8f52ac79343.tar.bz2
Relanding r144499:
Rename the remaining usage of Monitor to Display BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=144499 Review URL: https://chromiumcodereview.appspot.com/10675011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/tooltips')
-rw-r--r--ash/tooltips/tooltip_controller.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/ash/tooltips/tooltip_controller.cc b/ash/tooltips/tooltip_controller.cc
index 64ca6f0..4798cd33 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));
}
};