| 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..890198d4501d730573d6f70721d09557a76bc213 100644
|
| --- a/ui/views/corewm/tooltip_win.cc
|
| +++ b/ui/views/corewm/tooltip_win.cc
|
| @@ -12,7 +12,7 @@
|
| #include "ui/base/l10n/l10n_util_win.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| #include "ui/gfx/screen.h"
|
| -#include "ui/gfx/win/dpi.h"
|
| +#include "ui/gfx/screen_win.h"
|
| #include "ui/views/corewm/cursor_height_provider_win.h"
|
|
|
| namespace views {
|
| @@ -77,8 +77,7 @@ 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_);
|
| + gfx::Point screen_point = gfx::ScreenWin::DIPToScreenPoint(location_);
|
| const int cursoroffset = GetCurrentCursorVisibleHeight();
|
| screen_point.Offset(0, cursoroffset);
|
|
|
| @@ -86,11 +85,13 @@ void TooltipWin::PositionTooltip() {
|
| reinterpret_cast<LPARAM>(&toolinfo_));
|
| const gfx::Size size(LOWORD(tooltip_size), HIWORD(tooltip_size));
|
|
|
| + // This code only runs for non-metro, so GetNativeScreen() is fine.
|
| const gfx::Display display(
|
| - gfx::Screen::GetNativeScreen()->GetDisplayNearestPoint(screen_point));
|
| + gfx::Screen::GetNativeScreen()->GetDisplayNearestPoint(location_));
|
|
|
| gfx::Rect tooltip_bounds(screen_point, size);
|
| - tooltip_bounds.AdjustToFit(gfx::win::DIPToScreenRect(display.work_area()));
|
| + tooltip_bounds.AdjustToFit(
|
| + gfx::ScreenWin::DIPToScreenRect(parent_hwnd_, display.work_area()));
|
| SetWindowPos(tooltip_hwnd_, NULL, tooltip_bounds.x(), tooltip_bounds.y(), 0,
|
| 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
| }
|
| @@ -98,7 +99,7 @@ void TooltipWin::PositionTooltip() {
|
| int TooltipWin::GetMaxWidth(const gfx::Point& location,
|
| aura::Window* context) const {
|
| // This code only runs for non-metro, so GetNativeScreen() is fine.
|
| - const gfx::Point screen_point = gfx::win::DIPToScreenPoint(location);
|
| + const gfx::Point screen_point = gfx::ScreenWin::DIPToScreenPoint(location);
|
| gfx::Display display(
|
| gfx::Screen::GetNativeScreen()->GetDisplayNearestPoint(screen_point));
|
| const gfx::Rect monitor_bounds = display.bounds();
|
|
|