Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc |
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
index b1c1e17915c0cf99ea354d2fc6c0c55e3a5577d3..87511987fca82d7949263cf644ad85cd78462c85 100644 |
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
@@ -404,6 +404,8 @@ void TabDragController::Init( |
DCHECK(!tabs.empty()); |
DCHECK(std::find(tabs.begin(), tabs.end(), source_tab) != tabs.end()); |
source_tabstrip_ = source_tabstrip; |
+ screen_ = gfx::Screen::GetScreenFor( |
+ source_tabstrip->GetWidget()->GetNativeView()); |
source_tab_offset_ = source_tab_offset; |
start_point_in_screen_ = gfx::Point(source_tab_offset, mouse_offset.y()); |
views::View::ConvertPointToScreen(source_tab, &start_point_in_screen_); |
@@ -673,7 +675,7 @@ gfx::Point TabDragController::GetWindowCreatePoint( |
// If the cursor is outside the monitor area, move it inside. For example, |
// dropping a tab onto the task bar on Windows produces this situation. |
- gfx::Rect work_area = gfx::Screen::GetDisplayNearestPoint(origin).work_area(); |
+ gfx::Rect work_area = screen_->GetDisplayNearestPoint(origin).work_area(); |
gfx::Point create_point(origin); |
if (!work_area.IsEmpty()) { |
if (create_point.x() < work_area.x()) |
@@ -1988,7 +1990,7 @@ gfx::Point TabDragController::GetCursorScreenPoint() { |
return touch_point; |
} |
#endif |
- return gfx::Screen::GetCursorScreenPoint(); |
+ return screen_->GetCursorScreenPoint(); |
} |
gfx::Point TabDragController::GetWindowOffset( |