| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gtk/tabs/dragged_tab_controller_gtk.h" | 5 #include "chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/callback_old.h" | 9 #include "base/callback_old.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Make sure we're fully detached from whatever TabStrip we're attached to | 238 // Make sure we're fully detached from whatever TabStrip we're attached to |
| 239 // (if any). | 239 // (if any). |
| 240 if (attached_tabstrip_) | 240 if (attached_tabstrip_) |
| 241 Detach(); | 241 Detach(); |
| 242 | 242 |
| 243 if (target_tabstrip) | 243 if (target_tabstrip) |
| 244 Attach(target_tabstrip, screen_point); | 244 Attach(target_tabstrip, screen_point); |
| 245 } | 245 } |
| 246 | 246 |
| 247 if (!target_tabstrip) { | 247 if (!target_tabstrip) { |
| 248 bring_to_front_timer_.Start(FROM_HERE, | 248 bring_to_front_timer_.Start( |
| 249 base::TimeDelta::FromMilliseconds(kBringToFrontDelay), this, | 249 base::TimeDelta::FromMilliseconds(kBringToFrontDelay), this, |
| 250 &DraggedTabControllerGtk::BringWindowUnderMouseToFront); | 250 &DraggedTabControllerGtk::BringWindowUnderMouseToFront); |
| 251 } | 251 } |
| 252 | 252 |
| 253 MoveTab(screen_point); | 253 MoveTab(screen_point); |
| 254 } | 254 } |
| 255 | 255 |
| 256 void DraggedTabControllerGtk::MoveTab(const gfx::Point& screen_point) { | 256 void DraggedTabControllerGtk::MoveTab(const gfx::Point& screen_point) { |
| 257 gfx::Point dragged_tab_point = GetDraggedTabPoint(screen_point); | 257 gfx::Point dragged_tab_point = GetDraggedTabPoint(screen_point); |
| 258 | 258 |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 gfx::NativeView dragged_tab = dragged_tab_->widget(); | 771 gfx::NativeView dragged_tab = dragged_tab_->widget(); |
| 772 dock_windows_.insert(dragged_tab); | 772 dock_windows_.insert(dragged_tab); |
| 773 window = DockInfo::GetLocalProcessWindowAtPoint(GetCursorScreenPoint(), | 773 window = DockInfo::GetLocalProcessWindowAtPoint(GetCursorScreenPoint(), |
| 774 dock_windows_); | 774 dock_windows_); |
| 775 dock_windows_.erase(dragged_tab); | 775 dock_windows_.erase(dragged_tab); |
| 776 } | 776 } |
| 777 | 777 |
| 778 if (window) | 778 if (window) |
| 779 gtk_window_present(GTK_WINDOW(window)); | 779 gtk_window_present(GTK_WINDOW(window)); |
| 780 } | 780 } |
| OLD | NEW |