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

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

Issue 2107603002: Makes the pinned tab title change indicator hide correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 5 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
OLDNEW
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/tab.h" 5 #include "chrome/browser/ui/views/tabs/tab.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 } 564 }
565 565
566 Tab::~Tab() { 566 Tab::~Tab() {
567 } 567 }
568 568
569 bool Tab::IsActive() const { 569 bool Tab::IsActive() const {
570 return controller_->IsActiveTab(this); 570 return controller_->IsActiveTab(this);
571 } 571 }
572 572
573 void Tab::ActiveStateChanged() { 573 void Tab::ActiveStateChanged() {
574 // The pinned tab title changed indicator is only shown for inactive tabs.
575 // When transitioning between active and inactive always reset the state
576 // to enforce that.
577 SetPinnedTabTitleChangedIndicatorVisible(false);
574 OnButtonColorMaybeChanged(); 578 OnButtonColorMaybeChanged();
575 alert_indicator_button_->UpdateEnabledForMuteToggle(); 579 alert_indicator_button_->UpdateEnabledForMuteToggle();
576 Layout(); 580 Layout();
577 } 581 }
578 582
579 void Tab::AlertStateChanged() { 583 void Tab::AlertStateChanged() {
580 Layout(); 584 Layout();
581 } 585 }
582 586
583 bool Tab::IsSelected() const { 587 bool Tab::IsSelected() const {
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 inactive_images_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER); 1745 inactive_images_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER);
1742 inactive_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT); 1746 inactive_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT);
1743 inactive_images_.l_width = inactive_images_.image_l->width(); 1747 inactive_images_.l_width = inactive_images_.image_l->width();
1744 inactive_images_.r_width = inactive_images_.image_r->width(); 1748 inactive_images_.r_width = inactive_images_.image_r->width();
1745 1749
1746 mask_images_.image_l = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_LEFT); 1750 mask_images_.image_l = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_LEFT);
1747 mask_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_RIGHT); 1751 mask_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_RIGHT);
1748 mask_images_.l_width = mask_images_.image_l->width(); 1752 mask_images_.l_width = mask_images_.image_l->width();
1749 mask_images_.r_width = mask_images_.image_r->width(); 1753 mask_images_.r_width = mask_images_.image_r->width();
1750 } 1754 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698