| 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/browser_tab_strip_controller.h" | 5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 // TODO(alicet): clean up dependencies on defaults.h and max tab count. | 9 // TODO(alicet): clean up dependencies on defaults.h and max tab count. |
| 10 #include "chrome/browser/defaults.h" | 10 #include "chrome/browser/defaults.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 if (index != -1 && !drop_before) { | 271 if (index != -1 && !drop_before) { |
| 272 hover_tab_selector_.StartTabTransition(index); | 272 hover_tab_selector_.StartTabTransition(index); |
| 273 } else { | 273 } else { |
| 274 hover_tab_selector_.CancelTabTransition(); | 274 hover_tab_selector_.CancelTabTransition(); |
| 275 } | 275 } |
| 276 } | 276 } |
| 277 | 277 |
| 278 void BrowserTabStripController::PerformDrop(bool drop_before, | 278 void BrowserTabStripController::PerformDrop(bool drop_before, |
| 279 int index, | 279 int index, |
| 280 const GURL& url) { | 280 const GURL& url) { |
| 281 browser::NavigateParams params(browser_, url, PageTransition::LINK); | 281 browser::NavigateParams params( |
| 282 browser_, url, content::PAGE_TRANSITION_LINK); |
| 282 params.tabstrip_index = index; | 283 params.tabstrip_index = index; |
| 283 | 284 |
| 284 if (drop_before) { | 285 if (drop_before) { |
| 285 UserMetrics::RecordAction(UserMetricsAction("Tab_DropURLBetweenTabs")); | 286 UserMetrics::RecordAction(UserMetricsAction("Tab_DropURLBetweenTabs")); |
| 286 params.disposition = NEW_FOREGROUND_TAB; | 287 params.disposition = NEW_FOREGROUND_TAB; |
| 287 } else { | 288 } else { |
| 288 UserMetrics::RecordAction(UserMetricsAction("Tab_DropURLOnTab")); | 289 UserMetrics::RecordAction(UserMetricsAction("Tab_DropURLOnTab")); |
| 289 params.disposition = CURRENT_TAB; | 290 params.disposition = CURRENT_TAB; |
| 290 params.source_contents = model_->GetTabContentsAt(index); | 291 params.source_contents = model_->GetTabContentsAt(index); |
| 291 } | 292 } |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 | 468 |
| 468 void BrowserTabStripController::StopHighlightTabsForCommand( | 469 void BrowserTabStripController::StopHighlightTabsForCommand( |
| 469 TabStripModel::ContextMenuCommand command_id, | 470 TabStripModel::ContextMenuCommand command_id, |
| 470 BaseTab* tab) { | 471 BaseTab* tab) { |
| 471 if (command_id == TabStripModel::CommandCloseTabsToRight || | 472 if (command_id == TabStripModel::CommandCloseTabsToRight || |
| 472 command_id == TabStripModel::CommandCloseOtherTabs) { | 473 command_id == TabStripModel::CommandCloseOtherTabs) { |
| 473 // Just tell all Tabs to stop pulsing - it's safe. | 474 // Just tell all Tabs to stop pulsing - it's safe. |
| 474 tabstrip_->StopAllHighlighting(); | 475 tabstrip_->StopAllHighlighting(); |
| 475 } | 476 } |
| 476 } | 477 } |
| OLD | NEW |