| Index: ui/views/controls/menu/menu_controller.cc
|
| diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
|
| index 10b2cd914e768af579dec903fc6996c741838c10..f20191f931a5ac92288bfd260102948688da2cb7 100644
|
| --- a/ui/views/controls/menu/menu_controller.cc
|
| +++ b/ui/views/controls/menu/menu_controller.cc
|
| @@ -889,7 +889,7 @@ ui::PostDispatchAction MenuController::OnWillDispatchKeyEvent(
|
|
|
| void MenuController::UpdateSubmenuSelection(SubmenuView* submenu) {
|
| if (submenu->IsShowing()) {
|
| - gfx::Point point = GetScreen()->GetCursorScreenPoint();
|
| + gfx::Point point = gfx::Screen::GetScreen()->GetCursorScreenPoint();
|
| const SubmenuView* root_submenu =
|
| submenu->GetMenuItem()->GetRootMenuItem()->GetSubmenu();
|
| View::ConvertPointFromScreen(
|
| @@ -1235,14 +1235,16 @@ void MenuController::UpdateInitialLocation(const gfx::Rect& bounds,
|
|
|
| // Calculate the bounds of the monitor we'll show menus on. Do this once to
|
| // avoid repeated system queries for the info.
|
| - pending_state_.monitor_bounds = GetScreen()->GetDisplayNearestPoint(
|
| - bounds.origin()).work_area();
|
| + pending_state_.monitor_bounds = gfx::Screen::GetScreen()
|
| + ->GetDisplayNearestPoint(bounds.origin())
|
| + .work_area();
|
|
|
| if (!pending_state_.monitor_bounds.Contains(bounds)) {
|
| // Use the monitor area if the work area doesn't contain the bounds. This
|
| // handles showing a menu from the launcher.
|
| - gfx::Rect monitor_area = GetScreen()->GetDisplayNearestPoint(
|
| - bounds.origin()).bounds();
|
| + gfx::Rect monitor_area = gfx::Screen::GetScreen()
|
| + ->GetDisplayNearestPoint(bounds.origin())
|
| + .bounds();
|
| if (monitor_area.Contains(bounds))
|
| pending_state_.monitor_bounds = monitor_area;
|
| }
|
| @@ -1275,7 +1277,8 @@ bool MenuController::ShowSiblingMenu(SubmenuView* source,
|
| return false;
|
| }
|
|
|
| - gfx::NativeWindow window_under_mouse = GetScreen()->GetWindowUnderCursor();
|
| + gfx::NativeWindow window_under_mouse =
|
| + gfx::Screen::GetScreen()->GetWindowUnderCursor();
|
| // TODO(oshima): Replace with views only API.
|
| if (!owner_ || window_under_mouse != owner_->GetNativeWindow())
|
| return false;
|
| @@ -2568,10 +2571,4 @@ void MenuController::HandleMouseLocation(SubmenuView* source,
|
| }
|
| }
|
|
|
| -gfx::Screen* MenuController::GetScreen() {
|
| - Widget* root = owner_ ? owner_->GetTopLevelWidget() : NULL;
|
| - return root ? gfx::Screen::GetScreenFor(root->GetNativeView())
|
| - : gfx::Screen::GetNativeScreen();
|
| -}
|
| -
|
| } // namespace views
|
|
|