| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 void BrowserTabStripController::TabInsertedAt(WebContents* contents, | 383 void BrowserTabStripController::TabInsertedAt(WebContents* contents, |
| 384 int model_index, | 384 int model_index, |
| 385 bool is_active) { | 385 bool is_active) { |
| 386 DCHECK(contents); | 386 DCHECK(contents); |
| 387 DCHECK(model_->ContainsIndex(model_index)); | 387 DCHECK(model_->ContainsIndex(model_index)); |
| 388 AddTab(contents, model_index, is_active); | 388 AddTab(contents, model_index, is_active); |
| 389 } | 389 } |
| 390 | 390 |
| 391 void BrowserTabStripController::TabDetachedAt(WebContents* contents, | 391 void BrowserTabStripController::TabDetachedAt(WebContents* contents, |
| 392 int model_index) { | 392 int model_index, |
| 393 bool closing_all) { |
| 393 // Cancel any pending tab transition. | 394 // Cancel any pending tab transition. |
| 394 hover_tab_selector_.CancelTabTransition(); | 395 hover_tab_selector_.CancelTabTransition(); |
| 395 | 396 |
| 396 tabstrip_->RemoveTabAt(model_index); | 397 tabstrip_->RemoveTabAt(model_index); |
| 397 } | 398 } |
| 398 | 399 |
| 399 void BrowserTabStripController::TabSelectionChanged( | 400 void BrowserTabStripController::TabSelectionChanged( |
| 400 TabStripModel* tab_strip_model, | 401 TabStripModel* tab_strip_model, |
| 401 const ui::ListSelectionModel& old_model) { | 402 const ui::ListSelectionModel& old_model) { |
| 402 tabstrip_->SetSelection(old_model, model_->selection_model()); | 403 tabstrip_->SetSelection(old_model, model_->selection_model()); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 SetTabRendererDataFromModel(contents, index, &data, NEW_TAB); | 525 SetTabRendererDataFromModel(contents, index, &data, NEW_TAB); |
| 525 tabstrip_->AddTabAt(index, data, is_active); | 526 tabstrip_->AddTabAt(index, data, is_active); |
| 526 } | 527 } |
| 527 | 528 |
| 528 void BrowserTabStripController::UpdateLayoutType() { | 529 void BrowserTabStripController::UpdateLayoutType() { |
| 529 bool adjust_layout = false; | 530 bool adjust_layout = false; |
| 530 TabStripLayoutType layout_type = | 531 TabStripLayoutType layout_type = |
| 531 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); | 532 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); |
| 532 tabstrip_->SetLayoutType(layout_type, adjust_layout); | 533 tabstrip_->SetLayoutType(layout_type, adjust_layout); |
| 533 } | 534 } |
| OLD | NEW |