| 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/views/tabs/dragged_tab_controller.h" | 5 #include "chrome/browser/ui/views/tabs/dragged_tab_controller.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 // DraggedTabController, PageNavigator implementation: | 405 // DraggedTabController, PageNavigator implementation: |
| 406 | 406 |
| 407 // TODO(adriansc): Remove this method once refactoring changed all call sites. | 407 // TODO(adriansc): Remove this method once refactoring changed all call sites. |
| 408 TabContents* DraggedTabController::OpenURLFromTab( | 408 TabContents* DraggedTabController::OpenURLFromTab( |
| 409 TabContents* source, | 409 TabContents* source, |
| 410 const GURL& url, | 410 const GURL& url, |
| 411 const GURL& referrer, | 411 const GURL& referrer, |
| 412 WindowOpenDisposition disposition, | 412 WindowOpenDisposition disposition, |
| 413 content::PageTransition transition) { | 413 content::PageTransition transition) { |
| 414 return OpenURLFromTab(source, | 414 return OpenURLFromTab(source, |
| 415 OpenURLParams(url, referrer, disposition, transition)); | 415 OpenURLParams(url, referrer, disposition, transition, |
| 416 false)); |
| 416 } | 417 } |
| 417 | 418 |
| 418 TabContents* DraggedTabController::OpenURLFromTab(TabContents* source, | 419 TabContents* DraggedTabController::OpenURLFromTab(TabContents* source, |
| 419 const OpenURLParams& params) { | 420 const OpenURLParams& params) { |
| 420 if (source_tab_drag_data()->original_delegate) { | 421 if (source_tab_drag_data()->original_delegate) { |
| 421 OpenURLParams forward_params = params; | 422 OpenURLParams forward_params = params; |
| 422 if (params.disposition == CURRENT_TAB) | 423 if (params.disposition == CURRENT_TAB) |
| 423 forward_params.disposition = NEW_WINDOW; | 424 forward_params.disposition = NEW_WINDOW; |
| 424 | 425 |
| 425 return source_tab_drag_data()->original_delegate->OpenURLFromTab( | 426 return source_tab_drag_data()->original_delegate->OpenURLFromTab( |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 | 1379 |
| 1379 bool DraggedTabController::AreTabsConsecutive() { | 1380 bool DraggedTabController::AreTabsConsecutive() { |
| 1380 for (size_t i = 1; i < drag_data_.size(); ++i) { | 1381 for (size_t i = 1; i < drag_data_.size(); ++i) { |
| 1381 if (drag_data_[i - 1].source_model_index + 1 != | 1382 if (drag_data_[i - 1].source_model_index + 1 != |
| 1382 drag_data_[i].source_model_index) { | 1383 drag_data_[i].source_model_index) { |
| 1383 return false; | 1384 return false; |
| 1384 } | 1385 } |
| 1385 } | 1386 } |
| 1386 return true; | 1387 return true; |
| 1387 } | 1388 } |
| OLD | NEW |