Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 6783015: Improvements to tab title prefix eliding as per email discussions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/extensions/extension_tab_helper.h" 9 #include "chrome/browser/extensions/extension_tab_helper.h"
10 #include "chrome/browser/metrics/user_metrics.h" 10 #include "chrome/browser/metrics/user_metrics.h"
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 // them if permitted by the model. 396 // them if permitted by the model.
397 if (model_->delegate()->LargeIconsPermitted()) 397 if (model_->delegate()->LargeIconsPermitted())
398 app_icon = wrapper->extension_tab_helper()->GetExtensionAppIcon(); 398 app_icon = wrapper->extension_tab_helper()->GetExtensionAppIcon();
399 399
400 if (app_icon) 400 if (app_icon)
401 data->favicon = *app_icon; 401 data->favicon = *app_icon;
402 else 402 else
403 data->favicon = contents->GetFavicon(); 403 data->favicon = contents->GetFavicon();
404 data->network_state = TabContentsNetworkState(contents); 404 data->network_state = TabContentsNetworkState(contents);
405 data->title = contents->GetTitle(); 405 data->title = contents->GetTitle();
406 data->url = contents->GetURL();
406 data->loading = contents->is_loading(); 407 data->loading = contents->is_loading();
407 data->crashed_status = contents->crashed_status(); 408 data->crashed_status = contents->crashed_status();
408 data->incognito = contents->profile()->IsOffTheRecord(); 409 data->incognito = contents->profile()->IsOffTheRecord();
409 data->show_icon = contents->ShouldDisplayFavicon(); 410 data->show_icon = contents->ShouldDisplayFavicon();
410 data->mini = model_->IsMiniTab(model_index); 411 data->mini = model_->IsMiniTab(model_index);
411 data->blocked = model_->IsTabBlocked(model_index); 412 data->blocked = model_->IsTabBlocked(model_index);
412 data->app = wrapper->extension_tab_helper()->is_app(); 413 data->app = wrapper->extension_tab_helper()->is_app();
413 } 414 }
414 415
415 void BrowserTabStripController::StartHighlightTabsForCommand( 416 void BrowserTabStripController::StartHighlightTabsForCommand(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 DCHECK(type.value == NotificationType::TAB_CLOSEABLE_STATE_CHANGED); 448 DCHECK(type.value == NotificationType::TAB_CLOSEABLE_STATE_CHANGED);
448 // Note that this notification may be fired during a model mutation and 449 // Note that this notification may be fired during a model mutation and
449 // possibly before the tabstrip has processed the change. 450 // possibly before the tabstrip has processed the change.
450 // Here, we just re-layout each existing tab to reflect the change in its 451 // Here, we just re-layout each existing tab to reflect the change in its
451 // closeable state, and then schedule paint for entire tabstrip. 452 // closeable state, and then schedule paint for entire tabstrip.
452 for (int i = 0; i < tabstrip_->tab_count(); ++i) { 453 for (int i = 0; i < tabstrip_->tab_count(); ++i) {
453 tabstrip_->base_tab_at_tab_index(i)->Layout(); 454 tabstrip_->base_tab_at_tab_index(i)->Layout();
454 } 455 }
455 tabstrip_->SchedulePaint(); 456 tabstrip_->SchedulePaint();
456 } 457 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab_strip.cc ('k') | chrome/browser/ui/views/tabs/tab_renderer_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698