| 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/tab_renderer.h" | 5 #include "chrome/browser/views/tabs/tab_renderer.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 return hover_animation_.get() ? | 828 return hover_animation_.get() ? |
| 829 kHoverOpacity * hover_animation_->GetCurrentValue() : 0; | 829 kHoverOpacity * hover_animation_->GetCurrentValue() : 0; |
| 830 } | 830 } |
| 831 | 831 |
| 832 //////////////////////////////////////////////////////////////////////////////// | 832 //////////////////////////////////////////////////////////////////////////////// |
| 833 // TabRenderer, private: | 833 // TabRenderer, private: |
| 834 | 834 |
| 835 void TabRenderer::StartCrashAnimation() { | 835 void TabRenderer::StartCrashAnimation() { |
| 836 if (!crash_animation_) | 836 if (!crash_animation_) |
| 837 crash_animation_ = new FavIconCrashAnimation(this); | 837 crash_animation_ = new FavIconCrashAnimation(this); |
| 838 crash_animation_->Reset(); | 838 crash_animation_->Stop(); |
| 839 crash_animation_->Start(); | 839 crash_animation_->Start(); |
| 840 } | 840 } |
| 841 | 841 |
| 842 void TabRenderer::StopCrashAnimation() { | 842 void TabRenderer::StopCrashAnimation() { |
| 843 if (!crash_animation_) | 843 if (!crash_animation_) |
| 844 return; | 844 return; |
| 845 crash_animation_->Stop(); | 845 crash_animation_->Stop(); |
| 846 } | 846 } |
| 847 | 847 |
| 848 bool TabRenderer::IsPerformingCrashAnimation() const { | 848 bool TabRenderer::IsPerformingCrashAnimation() const { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 | 889 |
| 890 void TabRenderer::SetBlocked(bool blocked) { | 890 void TabRenderer::SetBlocked(bool blocked) { |
| 891 if (data_.blocked == blocked) | 891 if (data_.blocked == blocked) |
| 892 return; | 892 return; |
| 893 data_.blocked = blocked; | 893 data_.blocked = blocked; |
| 894 if (blocked) | 894 if (blocked) |
| 895 StartPulse(); | 895 StartPulse(); |
| 896 else | 896 else |
| 897 StopPulse(); | 897 StopPulse(); |
| 898 } | 898 } |
| OLD | NEW |