Index: chrome/browser/ui/views/tabs/tab.h |
diff --git a/chrome/browser/ui/views/tabs/tab.h b/chrome/browser/ui/views/tabs/tab.h |
index ff9d9b1fd8e56117218c15e7588c05e044adb778..80ff350e69b8c255cbbaba7b1fd59692cd4d4bb9 100644 |
--- a/chrome/browser/ui/views/tabs/tab.h |
+++ b/chrome/browser/ui/views/tabs/tab.h |
@@ -147,6 +147,7 @@ class Tab : public gfx::AnimationDelegate, |
// The animation object used to swap the favicon with the sad tab icon. |
class FaviconCrashAnimation; |
+ class MediaIndicatorButton; |
class TabCloseButton; |
// Contains a cached image and the values used to generate it. |
@@ -225,9 +226,8 @@ class Tab : public gfx::AnimationDelegate, |
int tab_id); |
void PaintActiveTabBackground(gfx::Canvas* canvas); |
- // Paints the favicon and media indicator icon, mirrored for RTL if needed. |
+ // Paints the favicon, mirrored for RTL if needed. |
void PaintIcon(gfx::Canvas* canvas); |
- void PaintMediaIndicator(gfx::Canvas* canvas); |
// Invoked if data_.network_state changes, or the network_state is not none. |
void AdvanceLoadingAnimation(TabRendererData::NetworkState old_state, |
@@ -264,10 +264,6 @@ class Tab : public gfx::AnimationDelegate, |
// Returns true if the crash animation is currently running. |
bool IsPerformingCrashAnimation() const; |
- // Starts the media indicator fade-in/out animation. There's no stop method |
- // because this is not a continuous animation. |
- void StartMediaIndicatorAnimation(); |
- |
// Schedules repaint task for icon. |
void ScheduleIconPaint(); |
@@ -279,6 +275,9 @@ class Tab : public gfx::AnimationDelegate, |
int* tab_id, |
int* frame_id) const; |
+ // Returns |media_indicator_button_|, creating it on-demand. |
+ MediaIndicatorButton* LazyGetMediaIndicatorButton(); |
sky
2014/09/23 22:58:18
Nuke the 'Lazy'. That is, make it GetMediaIndicato
miu
2014/09/24 22:34:16
Done.
|
+ |
// Performs a one-time initialization of static resources such as tab images. |
static void InitTabResources(); |
@@ -335,14 +334,10 @@ class Tab : public gfx::AnimationDelegate, |
// Crash icon animation (in place of favicon). |
scoped_ptr<gfx::LinearAnimation> crash_icon_animation_; |
- // Media indicator fade-in/out animation (i.e., only on show/hide, not a |
- // continuous animation). |
- scoped_ptr<gfx::Animation> media_indicator_animation_; |
- TabMediaState animating_media_state_; |
- |
scoped_refptr<gfx::AnimationContainer> animation_container_; |
views::ImageButton* close_button_; |
+ MediaIndicatorButton* media_indicator_button_; // NULL until first use. |
views::Label* title_; |
bool tab_activated_with_last_tap_down_; |
@@ -351,7 +346,6 @@ class Tab : public gfx::AnimationDelegate, |
// The bounds of various sections of the display. |
gfx::Rect favicon_bounds_; |
- gfx::Rect media_indicator_bounds_; |
// The offset used to paint the inactive background image. |
gfx::Point background_offset_; |