| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/tabs/dragged_tab_controller_gtk.h" | 5 #include "chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 if (original_delegate_) { | 139 if (original_delegate_) { |
| 140 original_delegate_->AddNewContents(source, new_contents, disposition, | 140 original_delegate_->AddNewContents(source, new_contents, disposition, |
| 141 initial_pos, user_gesture); | 141 initial_pos, user_gesture); |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 | 144 |
| 145 void DraggedTabControllerGtk::ActivateContents(TabContents* contents) { | 145 void DraggedTabControllerGtk::ActivateContents(TabContents* contents) { |
| 146 // Ignored. | 146 // Ignored. |
| 147 } | 147 } |
| 148 | 148 |
| 149 void DraggedTabControllerGtk::DeactivateContents(TabContents* contents) { | |
| 150 // Ignored. | |
| 151 } | |
| 152 | |
| 153 void DraggedTabControllerGtk::LoadingStateChanged(TabContents* source) { | 149 void DraggedTabControllerGtk::LoadingStateChanged(TabContents* source) { |
| 154 // TODO(jhawkins): It would be nice to respond to this message by changing the | 150 // TODO(jhawkins): It would be nice to respond to this message by changing the |
| 155 // screen shot in the dragged tab. | 151 // screen shot in the dragged tab. |
| 156 if (dragged_tab_.get()) | 152 if (dragged_tab_.get()) |
| 157 dragged_tab_->Update(); | 153 dragged_tab_->Update(); |
| 158 } | 154 } |
| 159 | 155 |
| 160 void DraggedTabControllerGtk::CloseContents(TabContents* source) { | 156 void DraggedTabControllerGtk::CloseContents(TabContents* source) { |
| 161 // Theoretically could be called by a window. Should be ignored | 157 // Theoretically could be called by a window. Should be ignored |
| 162 // because window.close() is ignored (usually, even though this | 158 // because window.close() is ignored (usually, even though this |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 gfx::NativeView dragged_tab = dragged_tab_->widget(); | 772 gfx::NativeView dragged_tab = dragged_tab_->widget(); |
| 777 dock_windows_.insert(dragged_tab); | 773 dock_windows_.insert(dragged_tab); |
| 778 window = DockInfo::GetLocalProcessWindowAtPoint(GetCursorScreenPoint(), | 774 window = DockInfo::GetLocalProcessWindowAtPoint(GetCursorScreenPoint(), |
| 779 dock_windows_); | 775 dock_windows_); |
| 780 dock_windows_.erase(dragged_tab); | 776 dock_windows_.erase(dragged_tab); |
| 781 } | 777 } |
| 782 | 778 |
| 783 if (window) | 779 if (window) |
| 784 gtk_window_present(GTK_WINDOW(window)); | 780 gtk_window_present(GTK_WINDOW(window)); |
| 785 } | 781 } |
| OLD | NEW |