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 #include "chrome/browser/metrics/user_metrics.h" | 9 #include "chrome/browser/metrics/user_metrics.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 // them if permitted by the model. | 393 // them if permitted by the model. |
394 if (model_->delegate()->LargeIconsPermitted()) | 394 if (model_->delegate()->LargeIconsPermitted()) |
395 app_icon = contents->GetExtensionAppIcon(); | 395 app_icon = contents->GetExtensionAppIcon(); |
396 | 396 |
397 if (app_icon) | 397 if (app_icon) |
398 data->favicon = *app_icon; | 398 data->favicon = *app_icon; |
399 else | 399 else |
400 data->favicon = contents->GetFavicon(); | 400 data->favicon = contents->GetFavicon(); |
401 data->network_state = TabContentsNetworkState(contents); | 401 data->network_state = TabContentsNetworkState(contents); |
402 data->title = contents->GetTitle(); | 402 data->title = contents->GetTitle(); |
| 403 data->url = contents->GetURL(); |
403 data->loading = contents->is_loading(); | 404 data->loading = contents->is_loading(); |
404 data->crashed_status = contents->crashed_status(); | 405 data->crashed_status = contents->crashed_status(); |
405 data->incognito = contents->profile()->IsOffTheRecord(); | 406 data->incognito = contents->profile()->IsOffTheRecord(); |
406 data->show_icon = contents->ShouldDisplayFavicon(); | 407 data->show_icon = contents->ShouldDisplayFavicon(); |
407 data->mini = model_->IsMiniTab(model_index); | 408 data->mini = model_->IsMiniTab(model_index); |
408 data->blocked = model_->IsTabBlocked(model_index); | 409 data->blocked = model_->IsTabBlocked(model_index); |
409 data->app = contents->is_app(); | 410 data->app = contents->is_app(); |
410 } | 411 } |
411 | 412 |
412 void BrowserTabStripController::StartHighlightTabsForCommand( | 413 void BrowserTabStripController::StartHighlightTabsForCommand( |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 DCHECK(type.value == NotificationType::TAB_CLOSEABLE_STATE_CHANGED); | 445 DCHECK(type.value == NotificationType::TAB_CLOSEABLE_STATE_CHANGED); |
445 // Note that this notification may be fired during a model mutation and | 446 // Note that this notification may be fired during a model mutation and |
446 // possibly before the tabstrip has processed the change. | 447 // possibly before the tabstrip has processed the change. |
447 // Here, we just re-layout each existing tab to reflect the change in its | 448 // Here, we just re-layout each existing tab to reflect the change in its |
448 // closeable state, and then schedule paint for entire tabstrip. | 449 // closeable state, and then schedule paint for entire tabstrip. |
449 for (int i = 0; i < tabstrip_->tab_count(); ++i) { | 450 for (int i = 0; i < tabstrip_->tab_count(); ++i) { |
450 tabstrip_->base_tab_at_tab_index(i)->Layout(); | 451 tabstrip_->base_tab_at_tab_index(i)->Layout(); |
451 } | 452 } |
452 tabstrip_->SchedulePaint(); | 453 tabstrip_->SchedulePaint(); |
453 } | 454 } |
OLD | NEW |