| 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 "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/extensions/tab_helper.h" | 10 #include "chrome/browser/extensions/tab_helper.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 if (change_type == TITLE_NOT_LOADING) { | 404 if (change_type == TITLE_NOT_LOADING) { |
| 405 tabstrip_->TabTitleChangedNotLoading(model_index); | 405 tabstrip_->TabTitleChangedNotLoading(model_index); |
| 406 // We'll receive another notification of the change asynchronously. | 406 // We'll receive another notification of the change asynchronously. |
| 407 return; | 407 return; |
| 408 } | 408 } |
| 409 | 409 |
| 410 SetTabDataAt(contents, model_index); | 410 SetTabDataAt(contents, model_index); |
| 411 } | 411 } |
| 412 | 412 |
| 413 void BrowserTabStripController::TabReplacedAt(TabStripModel* tab_strip_model, | 413 void BrowserTabStripController::TabReplacedAt(TabStripModel* tab_strip_model, |
| 414 TabContents* old_contents, | 414 WebContents* old_contents, |
| 415 TabContents* new_contents, | 415 WebContents* new_contents, |
| 416 int model_index) { | 416 int model_index) { |
| 417 SetTabDataAt(new_contents->web_contents(), model_index); | 417 SetTabDataAt(new_contents, model_index); |
| 418 } | 418 } |
| 419 | 419 |
| 420 void BrowserTabStripController::TabPinnedStateChanged(WebContents* contents, | 420 void BrowserTabStripController::TabPinnedStateChanged(WebContents* contents, |
| 421 int model_index) { | 421 int model_index) { |
| 422 // Currently none of the renderers render pinned state differently. | 422 // Currently none of the renderers render pinned state differently. |
| 423 } | 423 } |
| 424 | 424 |
| 425 void BrowserTabStripController::TabMiniStateChanged(WebContents* contents, | 425 void BrowserTabStripController::TabMiniStateChanged(WebContents* contents, |
| 426 int model_index) { | 426 int model_index) { |
| 427 SetTabDataAt(contents, model_index); | 427 SetTabDataAt(contents, model_index); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 SetTabRendererDataFromModel(contents, index, &data, NEW_TAB); | 514 SetTabRendererDataFromModel(contents, index, &data, NEW_TAB); |
| 515 tabstrip_->AddTabAt(index, data, is_active); | 515 tabstrip_->AddTabAt(index, data, is_active); |
| 516 } | 516 } |
| 517 | 517 |
| 518 void BrowserTabStripController::UpdateLayoutType() { | 518 void BrowserTabStripController::UpdateLayoutType() { |
| 519 bool adjust_layout = false; | 519 bool adjust_layout = false; |
| 520 TabStripLayoutType layout_type = | 520 TabStripLayoutType layout_type = |
| 521 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); | 521 DetermineTabStripLayout(g_browser_process->local_state(), &adjust_layout); |
| 522 tabstrip_->SetLayoutType(layout_type, adjust_layout); | 522 tabstrip_->SetLayoutType(layout_type, adjust_layout); |
| 523 } | 523 } |
| OLD | NEW |