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 a7cf0c7c2e6a8afc1633ae37b5612a866e574957..2e0e6a4458d744d2d8e03ca1bf2870a16e54b145 100644 |
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc |
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc |
@@ -177,8 +177,13 @@ void ToolbarButton::ShowDropDownMenu(ui::MenuSourceType source_type) { |
view)->GetDisplayNearestWindow(view); |
int left_bound = display.bounds().x(); |
#else |
- int left_bound = 0; |
- NOTIMPLEMENTED(); |
+ // 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::Display display = screen->GetDisplayNearestPoint( |
+ screen->GetCursorScreenPoint()); |
+ int left_bound = display.bounds().x(); |
#endif |
if (menu_position.x() < left_bound) |
menu_position.set_x(left_bound); |