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

Unified Diff: chrome/browser/ui/views/tabs/tab.h

Issue 591963002: Tab audio mute control (views UI), behind a switch (off by default). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed mpearson's comments; added a few CloseTab UMA's. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698