Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_button.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/toolbar_button.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index 31fe49498b982a8523848ad796fc12f3ebaa2192..3e333871193b46a19f400f58490348766ab4e691 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -222,14 +222,13 @@ void ToolbarButton::ShowDropDownMenu(ui::MenuSourceType source_type) {
// Use the left bound of the display on which
// the menu button exists.
gfx::NativeView view = GetWidget()->GetNativeView();
- gfx::Display display = gfx::Screen::GetScreenFor(
- view)->GetDisplayNearestWindow(view);
+ gfx::Display display =
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(view);
int left_bound = display.bounds().x();
#else
// The window might be positioned over the edge between two screens. We'll
// want to position the dropdown on the screen the mouse cursor is on.
- gfx::NativeView view = GetWidget()->GetNativeView();
- gfx::Screen* screen = gfx::Screen::GetScreenFor(view);
+ gfx::Screen* screen = gfx::Screen::GetScreen();
gfx::Display display = screen->GetDisplayNearestPoint(
screen->GetCursorScreenPoint());
int left_bound = display.bounds().x();
« no previous file with comments | « chrome/browser/ui/views/tabs/window_finder_x11.cc ('k') | chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698