| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 // TODO(adriansc): Remove this method once refactoring has changed all call | 170 // TODO(adriansc): Remove this method once refactoring has changed all call |
| 171 // sites. | 171 // sites. |
| 172 TabContents* DraggedTabControllerGtk::OpenURLFromTab( | 172 TabContents* DraggedTabControllerGtk::OpenURLFromTab( |
| 173 TabContents* source, | 173 TabContents* source, |
| 174 const GURL& url, | 174 const GURL& url, |
| 175 const GURL& referrer, | 175 const GURL& referrer, |
| 176 WindowOpenDisposition disposition, | 176 WindowOpenDisposition disposition, |
| 177 content::PageTransition transition) { | 177 content::PageTransition transition) { |
| 178 return OpenURLFromTab(source, | 178 return OpenURLFromTab(source, |
| 179 OpenURLParams(url, referrer, disposition, transition)); | 179 OpenURLParams(url, referrer, disposition, transition, |
| 180 false)); |
| 180 } | 181 } |
| 181 | 182 |
| 182 TabContents* DraggedTabControllerGtk::OpenURLFromTab( | 183 TabContents* DraggedTabControllerGtk::OpenURLFromTab( |
| 183 TabContents* source, | 184 TabContents* source, |
| 184 const OpenURLParams& params) { | 185 const OpenURLParams& params) { |
| 185 if (drag_data_->GetSourceTabData()->original_delegate_) { | 186 if (drag_data_->GetSourceTabData()->original_delegate_) { |
| 186 OpenURLParams forward_params = params; | 187 OpenURLParams forward_params = params; |
| 187 if (params.disposition == CURRENT_TAB) | 188 if (params.disposition == CURRENT_TAB) |
| 188 forward_params.disposition = NEW_WINDOW; | 189 forward_params.disposition = NEW_WINDOW; |
| 189 | 190 |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 | 897 |
| 897 bool DraggedTabControllerGtk::AreTabsConsecutive() { | 898 bool DraggedTabControllerGtk::AreTabsConsecutive() { |
| 898 for (size_t i = 1; i < drag_data_->size(); ++i) { | 899 for (size_t i = 1; i < drag_data_->size(); ++i) { |
| 899 if (drag_data_->get(i - 1)->source_model_index_ + 1 != | 900 if (drag_data_->get(i - 1)->source_model_index_ + 1 != |
| 900 drag_data_->get(i)->source_model_index_) { | 901 drag_data_->get(i)->source_model_index_) { |
| 901 return false; | 902 return false; |
| 902 } | 903 } |
| 903 } | 904 } |
| 904 return true; | 905 return true; |
| 905 } | 906 } |
| OLD | NEW |