| 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 8542c625dcf8faa0cfb83df646aa88a7d9115edc..bd8325fd2ed9e51879ae54eea95378b98f421806 100644
|
| --- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
|
| +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
|
| @@ -198,7 +198,6 @@ TabDragController::TabDragController()
|
| : event_source_(EVENT_SOURCE_MOUSE),
|
| source_tabstrip_(NULL),
|
| attached_tabstrip_(NULL),
|
| - screen_(NULL),
|
| host_desktop_type_(chrome::HOST_DESKTOP_TYPE_NATIVE),
|
| can_release_capture_(true),
|
| offset_to_width_ratio_(0),
|
| @@ -263,8 +262,6 @@ void TabDragController::Init(
|
| source_tabstrip_ = source_tabstrip;
|
| was_source_maximized_ = source_tabstrip->GetWidget()->IsMaximized();
|
| was_source_fullscreen_ = source_tabstrip->GetWidget()->IsFullscreen();
|
| - screen_ = gfx::Screen::GetScreenFor(
|
| - source_tabstrip->GetWidget()->GetNativeView());
|
| host_desktop_type_ = chrome::GetHostDesktopTypeForNativeView(
|
| source_tabstrip->GetWidget()->GetNativeView());
|
| // Do not release capture when transferring capture between widgets on:
|
| @@ -482,7 +479,8 @@ gfx::Point TabDragController::GetWindowCreatePoint(
|
| const gfx::Point& origin) const {
|
| // 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 = screen_->GetDisplayNearestPoint(origin).work_area();
|
| + gfx::Rect work_area =
|
| + gfx::Screen::GetScreen()->GetDisplayNearestPoint(origin).work_area();
|
| gfx::Point create_point(origin);
|
| if (!work_area.IsEmpty()) {
|
| if (create_point.x() < work_area.x())
|
| @@ -1647,8 +1645,9 @@ gfx::Rect TabDragController::CalculateDraggedBrowserBounds(
|
| views::View::ConvertPointToWidget(source, ¢er);
|
| gfx::Rect new_bounds(source->GetWidget()->GetRestoredBounds());
|
|
|
| - gfx::Rect work_area =
|
| - screen_->GetDisplayNearestPoint(last_point_in_screen_).work_area();
|
| + gfx::Rect work_area = gfx::Screen::GetScreen()
|
| + ->GetDisplayNearestPoint(last_point_in_screen_)
|
| + .work_area();
|
| if (new_bounds.size().width() >= work_area.size().width() &&
|
| new_bounds.size().height() >= work_area.size().height()) {
|
| new_bounds = work_area;
|
| @@ -1782,7 +1781,7 @@ gfx::Point TabDragController::GetCursorScreenPoint() {
|
| }
|
| #endif
|
|
|
| - return screen_->GetCursorScreenPoint();
|
| + return gfx::Screen::GetScreen()->GetCursorScreenPoint();
|
| }
|
|
|
| gfx::Vector2d TabDragController::GetWindowOffset(
|
|
|