| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/tabs/browser_tab_strip_controller.h" | 5 #include "chrome/browser/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/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" | 
| 10 #include "chrome/browser/metrics/user_metrics.h" | 10 #include "chrome/browser/metrics/user_metrics.h" | 
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 329                                              TabChangeType change_type) { | 329                                              TabChangeType change_type) { | 
| 330   if (change_type == TITLE_NOT_LOADING) { | 330   if (change_type == TITLE_NOT_LOADING) { | 
| 331     tabstrip_->TabTitleChangedNotLoading(model_index); | 331     tabstrip_->TabTitleChangedNotLoading(model_index); | 
| 332     // We'll receive another notification of the change asynchronously. | 332     // We'll receive another notification of the change asynchronously. | 
| 333     return; | 333     return; | 
| 334   } | 334   } | 
| 335 | 335 | 
| 336   SetTabDataAt(contents, model_index); | 336   SetTabDataAt(contents, model_index); | 
| 337 } | 337 } | 
| 338 | 338 | 
| 339 void BrowserTabStripController::TabReplacedAt(TabContentsWrapper* old_contents, | 339 void BrowserTabStripController::TabReplacedAt(TabStripModel* tab_strip_model, | 
|  | 340                                               TabContentsWrapper* old_contents, | 
| 340                                               TabContentsWrapper* new_contents, | 341                                               TabContentsWrapper* new_contents, | 
| 341                                               int model_index) { | 342                                               int model_index) { | 
| 342   SetTabDataAt(new_contents, model_index); | 343   SetTabDataAt(new_contents, model_index); | 
| 343 } | 344 } | 
| 344 | 345 | 
| 345 void BrowserTabStripController::TabPinnedStateChanged( | 346 void BrowserTabStripController::TabPinnedStateChanged( | 
| 346     TabContentsWrapper* contents, | 347     TabContentsWrapper* contents, | 
| 347     int model_index) { | 348     int model_index) { | 
| 348   // Currently none of the renderers render pinned state differently. | 349   // Currently none of the renderers render pinned state differently. | 
| 349 } | 350 } | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 429   DCHECK(type.value == NotificationType::TAB_CLOSEABLE_STATE_CHANGED); | 430   DCHECK(type.value == NotificationType::TAB_CLOSEABLE_STATE_CHANGED); | 
| 430   // Note that this notification may be fired during a model mutation and | 431   // Note that this notification may be fired during a model mutation and | 
| 431   // possibly before the tabstrip has processed the change. | 432   // possibly before the tabstrip has processed the change. | 
| 432   // Here, we just re-layout each existing tab to reflect the change in its | 433   // Here, we just re-layout each existing tab to reflect the change in its | 
| 433   // closeable state, and then schedule paint for entire tabstrip. | 434   // closeable state, and then schedule paint for entire tabstrip. | 
| 434   for (int i = 0; i < tabstrip_->tab_count(); ++i) { | 435   for (int i = 0; i < tabstrip_->tab_count(); ++i) { | 
| 435     tabstrip_->base_tab_at_tab_index(i)->Layout(); | 436     tabstrip_->base_tab_at_tab_index(i)->Layout(); | 
| 436   } | 437   } | 
| 437   tabstrip_->SchedulePaint(); | 438   tabstrip_->SchedulePaint(); | 
| 438 } | 439 } | 
| OLD | NEW | 
|---|