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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 //////////////////////////////////////////////////////////////////////////////// | 167 //////////////////////////////////////////////////////////////////////////////// |
168 // DraggedTabControllerGtk, TabContentsDelegate implementation: | 168 // DraggedTabControllerGtk, TabContentsDelegate implementation: |
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 PageTransition::Type 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 } | 180 } |
181 | 181 |
182 TabContents* DraggedTabControllerGtk::OpenURLFromTab( | 182 TabContents* DraggedTabControllerGtk::OpenURLFromTab( |
183 TabContents* source, | 183 TabContents* source, |
184 const OpenURLParams& params) { | 184 const OpenURLParams& params) { |
185 if (drag_data_->GetSourceTabData()->original_delegate_) { | 185 if (drag_data_->GetSourceTabData()->original_delegate_) { |
186 OpenURLParams forward_params = params; | 186 OpenURLParams forward_params = params; |
187 if (params.disposition == CURRENT_TAB) | 187 if (params.disposition == CURRENT_TAB) |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 | 896 |
897 bool DraggedTabControllerGtk::AreTabsConsecutive() { | 897 bool DraggedTabControllerGtk::AreTabsConsecutive() { |
898 for (size_t i = 1; i < drag_data_->size(); ++i) { | 898 for (size_t i = 1; i < drag_data_->size(); ++i) { |
899 if (drag_data_->get(i - 1)->source_model_index_ + 1 != | 899 if (drag_data_->get(i - 1)->source_model_index_ + 1 != |
900 drag_data_->get(i)->source_model_index_) { | 900 drag_data_->get(i)->source_model_index_) { |
901 return false; | 901 return false; |
902 } | 902 } |
903 } | 903 } |
904 return true; | 904 return true; |
905 } | 905 } |
OLD | NEW |