| 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 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1766 event_source_ == EVENT_SOURCE_TOUCH && | 1766 event_source_ == EVENT_SOURCE_TOUCH && |
| 1767 aura::Env::GetInstance()->is_touch_down()) { | 1767 aura::Env::GetInstance()->is_touch_down()) { |
| 1768 views::Widget* widget = GetAttachedBrowserWidget(); | 1768 views::Widget* widget = GetAttachedBrowserWidget(); |
| 1769 DCHECK(widget); | 1769 DCHECK(widget); |
| 1770 aura::Window* widget_window = widget->GetNativeWindow(); | 1770 aura::Window* widget_window = widget->GetNativeWindow(); |
| 1771 DCHECK(widget_window->GetRootWindow()); | 1771 DCHECK(widget_window->GetRootWindow()); |
| 1772 gfx::PointF touch_point_f; | 1772 gfx::PointF touch_point_f; |
| 1773 bool got_touch_point = ui::GestureRecognizer::Get()-> | 1773 bool got_touch_point = ui::GestureRecognizer::Get()-> |
| 1774 GetLastTouchPointForTarget(widget_window, &touch_point_f); | 1774 GetLastTouchPointForTarget(widget_window, &touch_point_f); |
| 1775 CHECK(got_touch_point); | 1775 CHECK(got_touch_point); |
| 1776 // TODO(tdresser): Switch to using gfx::PointF. See crbug.com/337824. | |
| 1777 gfx::Point touch_point = gfx::ToFlooredPoint(touch_point_f); | 1776 gfx::Point touch_point = gfx::ToFlooredPoint(touch_point_f); |
| 1778 wm::ConvertPointToScreen(widget_window->GetRootWindow(), &touch_point); | 1777 wm::ConvertPointToScreen(widget_window->GetRootWindow(), &touch_point); |
| 1779 return touch_point; | 1778 return touch_point; |
| 1780 } | 1779 } |
| 1781 #endif | 1780 #endif |
| 1782 | 1781 |
| 1783 return screen_->GetCursorScreenPoint(); | 1782 return screen_->GetCursorScreenPoint(); |
| 1784 } | 1783 } |
| 1785 | 1784 |
| 1786 gfx::Vector2d TabDragController::GetWindowOffset( | 1785 gfx::Vector2d TabDragController::GetWindowOffset( |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1816 it != browser_list->end(); ++it) { | 1815 it != browser_list->end(); ++it) { |
| 1817 if ((*it)->tab_strip_model()->empty()) | 1816 if ((*it)->tab_strip_model()->empty()) |
| 1818 exclude.insert((*it)->window()->GetNativeWindow()); | 1817 exclude.insert((*it)->window()->GetNativeWindow()); |
| 1819 } | 1818 } |
| 1820 #endif | 1819 #endif |
| 1821 return GetLocalProcessWindowAtPoint(host_desktop_type_, | 1820 return GetLocalProcessWindowAtPoint(host_desktop_type_, |
| 1822 screen_point, | 1821 screen_point, |
| 1823 exclude); | 1822 exclude); |
| 1824 | 1823 |
| 1825 } | 1824 } |
| OLD | NEW |