summaryrefslogtreecommitdiffstats
path: root/ash/tooltips
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 21:51:44 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 21:51:44 +0000
commite72fa4d643005f438978d8a9c21272f3acd64061 (patch)
treefabd135523ba0954c3c6b861dd21c5e165512580 /ash/tooltips
parentf33386d952654acfad4f62029ece49f0e7ecb200 (diff)
downloadchromium_src-e72fa4d643005f438978d8a9c21272f3acd64061.zip
chromium_src-e72fa4d643005f438978d8a9c21272f3acd64061.tar.gz
chromium_src-e72fa4d643005f438978d8a9c21272f3acd64061.tar.bz2
Revert r 144499 "Rename the remaining usage of Monitor to Display"
Temporarily reverting rename change to investigate 133784 TBR=oshima@chromium.org BUG=123160 TEST=none Review URL: https://chromiumcodereview.appspot.com/10689014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144573 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 4798cd33..64ca6f0 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 display_bounds =
+ gfx::Rect monitor_bounds =
gfx::Screen::GetDisplayNearestPoint(gfx::Point(x, y)).bounds();
- return (display_bounds.width() + 1) / 2;
+ return (monitor_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 display_bounds =
+ gfx::Rect monitor_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() > display_bounds.right()) {
- int h_offset = tooltip_rect.right() - display_bounds.right();
+ if (tooltip_rect.right() > monitor_bounds.right()) {
+ int h_offset = tooltip_rect.right() - monitor_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() > display_bounds.bottom())
+ if (tooltip_rect.bottom() > monitor_bounds.bottom())
tooltip_rect.set_y(mouse_pos.y() - tooltip_height);
- widget_->SetBounds(tooltip_rect.AdjustToFit(display_bounds));
+ widget_->SetBounds(tooltip_rect.AdjustToFit(monitor_bounds));
}
};