| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <math.h> | 5 #include <math.h> |
| 6 | 6 |
| 7 #include "chrome/browser/views/tabs/dragged_tab_controller.h" | 7 #include "chrome/browser/views/tabs/dragged_tab_controller.h" |
| 8 | 8 |
| 9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
| 10 #include "chrome/browser/frame_util.h" | 10 #include "chrome/browser/frame_util.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 bool DraggedTabController::IsDragSourceTab(Tab* tab) const { | 137 bool DraggedTabController::IsDragSourceTab(Tab* tab) const { |
| 138 return source_tab_ == tab; | 138 return source_tab_ == tab; |
| 139 } | 139 } |
| 140 | 140 |
| 141 /////////////////////////////////////////////////////////////////////////////// | 141 /////////////////////////////////////////////////////////////////////////////// |
| 142 // DraggedTabController, PageNavigator implementation: | 142 // DraggedTabController, PageNavigator implementation: |
| 143 | 143 |
| 144 void DraggedTabController::OpenURLFromTab(TabContents* source, | 144 void DraggedTabController::OpenURLFromTab(TabContents* source, |
| 145 const GURL& url, | 145 const GURL& url, |
| 146 const GURL& referrer, |
| 146 WindowOpenDisposition disposition, | 147 WindowOpenDisposition disposition, |
| 147 PageTransition::Type transition) { | 148 PageTransition::Type transition) { |
| 148 if (original_delegate_) { | 149 if (original_delegate_) { |
| 149 if (disposition == CURRENT_TAB) | 150 if (disposition == CURRENT_TAB) |
| 150 disposition = NEW_WINDOW; | 151 disposition = NEW_WINDOW; |
| 151 | 152 |
| 152 original_delegate_->OpenURLFromTab(source, url, disposition, transition); | 153 original_delegate_->OpenURLFromTab(source, url, referrer, |
| 154 disposition, transition); |
| 153 } | 155 } |
| 154 } | 156 } |
| 155 | 157 |
| 156 /////////////////////////////////////////////////////////////////////////////// | 158 /////////////////////////////////////////////////////////////////////////////// |
| 157 // DraggedTabController, TabContentsDelegate implementation: | 159 // DraggedTabController, TabContentsDelegate implementation: |
| 158 | 160 |
| 159 void DraggedTabController::NavigationStateChanged(const TabContents* source, | 161 void DraggedTabController::NavigationStateChanged(const TabContents* source, |
| 160 unsigned changed_flags) { | 162 unsigned changed_flags) { |
| 161 if (view_.get()) | 163 if (view_.get()) |
| 162 view_->Update(); | 164 view_->Update(); |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 Tab* tab = GetTabMatchingDraggedContents(attached_tabstrip_); | 784 Tab* tab = GetTabMatchingDraggedContents(attached_tabstrip_); |
| 783 if (tab) | 785 if (tab) |
| 784 tab->SetVisible(true); | 786 tab->SetVisible(true); |
| 785 } | 787 } |
| 786 CleanUpHiddenFrame(); | 788 CleanUpHiddenFrame(); |
| 787 | 789 |
| 788 if (!in_destructor_) | 790 if (!in_destructor_) |
| 789 source_tabstrip_->DestroyDragController(); | 791 source_tabstrip_->DestroyDragController(); |
| 790 } | 792 } |
| 791 | 793 |
| OLD | NEW |