Index: ui/views/corewm/tooltip_win.cc |
diff --git a/ui/views/corewm/tooltip_win.cc b/ui/views/corewm/tooltip_win.cc |
index 46635d2ba5d137b818eabf946bd582bb6a8b82e4..b892d3871a2080acecc5cdca85e7b619b2b30d75 100644 |
--- a/ui/views/corewm/tooltip_win.cc |
+++ b/ui/views/corewm/tooltip_win.cc |
@@ -77,7 +77,6 @@ bool TooltipWin::EnsureTooltipWindow() { |
} |
void TooltipWin::PositionTooltip() { |
- // This code only runs for non-metro, so GetNativeScreen() is fine. |
gfx::Point screen_point = gfx::win::DIPToScreenPoint(location_); |
const int cursoroffset = GetCurrentCursorVisibleHeight(); |
screen_point.Offset(0, cursoroffset); |
@@ -87,7 +86,7 @@ void TooltipWin::PositionTooltip() { |
const gfx::Size size(LOWORD(tooltip_size), HIWORD(tooltip_size)); |
const gfx::Display display( |
- gfx::Screen::GetNativeScreen()->GetDisplayNearestPoint(screen_point)); |
+ gfx::Screen::GetScreen()->GetDisplayNearestPoint(screen_point)); |
gfx::Rect tooltip_bounds(screen_point, size); |
tooltip_bounds.AdjustToFit(gfx::win::DIPToScreenRect(display.work_area())); |
@@ -95,12 +94,10 @@ void TooltipWin::PositionTooltip() { |
0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); |
} |
-int TooltipWin::GetMaxWidth(const gfx::Point& location, |
- aura::Window* context) const { |
- // This code only runs for non-metro, so GetNativeScreen() is fine. |
+int TooltipWin::GetMaxWidth(const gfx::Point& location) const { |
const gfx::Point screen_point = gfx::win::DIPToScreenPoint(location); |
gfx::Display display( |
- gfx::Screen::GetNativeScreen()->GetDisplayNearestPoint(screen_point)); |
+ gfx::Screen::GetScreen()->GetDisplayNearestPoint(screen_point)); |
const gfx::Rect monitor_bounds = display.bounds(); |
return (monitor_bounds.width() + 1) / 2; |
} |
@@ -126,7 +123,7 @@ void TooltipWin::SetText(aura::Window* window, |
SendMessage(tooltip_hwnd_, TTM_SETTOOLINFO, 0, |
reinterpret_cast<LPARAM>(&toolinfo_)); |
- int max_width = GetMaxWidth(location_, window); |
+ int max_width = GetMaxWidth(location_); |
SendMessage(tooltip_hwnd_, TTM_SETMAXTIPWIDTH, 0, max_width); |
} |