OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" | 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 const gfx::Point& mouse_offset, | 256 const gfx::Point& mouse_offset, |
257 int source_tab_offset, | 257 int source_tab_offset, |
258 const ui::ListSelectionModel& initial_selection_model, | 258 const ui::ListSelectionModel& initial_selection_model, |
259 MoveBehavior move_behavior, | 259 MoveBehavior move_behavior, |
260 EventSource event_source) { | 260 EventSource event_source) { |
261 DCHECK(!tabs.empty()); | 261 DCHECK(!tabs.empty()); |
262 DCHECK(std::find(tabs.begin(), tabs.end(), source_tab) != tabs.end()); | 262 DCHECK(std::find(tabs.begin(), tabs.end(), source_tab) != tabs.end()); |
263 source_tabstrip_ = source_tabstrip; | 263 source_tabstrip_ = source_tabstrip; |
264 was_source_maximized_ = source_tabstrip->GetWidget()->IsMaximized(); | 264 was_source_maximized_ = source_tabstrip->GetWidget()->IsMaximized(); |
265 was_source_fullscreen_ = source_tabstrip->GetWidget()->IsFullscreen(); | 265 was_source_fullscreen_ = source_tabstrip->GetWidget()->IsFullscreen(); |
266 screen_ = gfx::Screen::GetScreenFor( | 266 screen_ = gfx::Screen::GetScreen(); |
267 source_tabstrip->GetWidget()->GetNativeView()); | |
268 host_desktop_type_ = chrome::GetHostDesktopTypeForNativeView( | 267 host_desktop_type_ = chrome::GetHostDesktopTypeForNativeView( |
269 source_tabstrip->GetWidget()->GetNativeView()); | 268 source_tabstrip->GetWidget()->GetNativeView()); |
270 // Do not release capture when transferring capture between widgets on: | 269 // Do not release capture when transferring capture between widgets on: |
271 // - Desktop Linux | 270 // - Desktop Linux |
272 // Mouse capture is not synchronous on desktop Linux. Chrome makes | 271 // Mouse capture is not synchronous on desktop Linux. Chrome makes |
273 // transferring capture between widgets without releasing capture appear | 272 // transferring capture between widgets without releasing capture appear |
274 // synchronous on desktop Linux, so use that. | 273 // synchronous on desktop Linux, so use that. |
275 // - Ash | 274 // - Ash |
276 // Releasing capture on Ash cancels gestures so avoid it. | 275 // Releasing capture on Ash cancels gestures so avoid it. |
277 #if defined(OS_LINUX) | 276 #if defined(OS_LINUX) |
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1818 it != browser_list->end(); ++it) { | 1817 it != browser_list->end(); ++it) { |
1819 if ((*it)->tab_strip_model()->empty()) | 1818 if ((*it)->tab_strip_model()->empty()) |
1820 exclude.insert((*it)->window()->GetNativeWindow()); | 1819 exclude.insert((*it)->window()->GetNativeWindow()); |
1821 } | 1820 } |
1822 #endif | 1821 #endif |
1823 return GetLocalProcessWindowAtPoint(host_desktop_type_, | 1822 return GetLocalProcessWindowAtPoint(host_desktop_type_, |
1824 screen_point, | 1823 screen_point, |
1825 exclude); | 1824 exclude); |
1826 | 1825 |
1827 } | 1826 } |
OLD | NEW |