| 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/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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 bool Tab::IsActive() const { | 584 bool Tab::IsActive() const { |
| 585 return controller_->IsActiveTab(this); | 585 return controller_->IsActiveTab(this); |
| 586 } | 586 } |
| 587 | 587 |
| 588 void Tab::ActiveStateChanged() { | 588 void Tab::ActiveStateChanged() { |
| 589 OnButtonColorMaybeChanged(); | 589 OnButtonColorMaybeChanged(); |
| 590 media_indicator_button_->UpdateEnabledForMuteToggle(); | 590 media_indicator_button_->UpdateEnabledForMuteToggle(); |
| 591 Layout(); | 591 Layout(); |
| 592 } | 592 } |
| 593 | 593 |
| 594 void Tab::MediaStateChanged() { |
| 595 Layout(); |
| 596 } |
| 597 |
| 594 bool Tab::IsSelected() const { | 598 bool Tab::IsSelected() const { |
| 595 return controller_->IsTabSelected(this); | 599 return controller_->IsTabSelected(this); |
| 596 } | 600 } |
| 597 | 601 |
| 598 void Tab::SetData(const TabRendererData& data) { | 602 void Tab::SetData(const TabRendererData& data) { |
| 599 DCHECK(GetWidget()); | 603 DCHECK(GetWidget()); |
| 600 | 604 |
| 601 if (data_.Equals(data)) | 605 if (data_.Equals(data)) |
| 602 return; | 606 return; |
| 603 | 607 |
| (...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1776 inactive_images_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER); | 1780 inactive_images_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER); |
| 1777 inactive_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT); | 1781 inactive_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT); |
| 1778 inactive_images_.l_width = inactive_images_.image_l->width(); | 1782 inactive_images_.l_width = inactive_images_.image_l->width(); |
| 1779 inactive_images_.r_width = inactive_images_.image_r->width(); | 1783 inactive_images_.r_width = inactive_images_.image_r->width(); |
| 1780 | 1784 |
| 1781 mask_images_.image_l = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_LEFT); | 1785 mask_images_.image_l = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_LEFT); |
| 1782 mask_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_RIGHT); | 1786 mask_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_RIGHT); |
| 1783 mask_images_.l_width = mask_images_.image_l->width(); | 1787 mask_images_.l_width = mask_images_.image_l->width(); |
| 1784 mask_images_.r_width = mask_images_.image_r->width(); | 1788 mask_images_.r_width = mask_images_.image_r->width(); |
| 1785 } | 1789 } |
| OLD | NEW |