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

Side by Side Diff: chrome/browser/ui/views/tabs/media_indicator_button.h

Issue 1653113002: Fix favicon disappearing on pinned tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pkasting comments Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_MEDIA_INDICATOR_BUTTON_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_MEDIA_INDICATOR_BUTTON_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_MEDIA_INDICATOR_BUTTON_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_MEDIA_INDICATOR_BUTTON_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/tabs/tab_utils.h" 10 #include "chrome/browser/ui/tabs/tab_utils.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 bool DoesIntersectRect(const View* target, 70 bool DoesIntersectRect(const View* target,
71 const gfx::Rect& rect) const override; 71 const gfx::Rect& rect) const override;
72 72
73 // views::Button: 73 // views::Button:
74 void NotifyClick(const ui::Event& event) override; 74 void NotifyClick(const ui::Event& event) override;
75 75
76 // views::CustomButton: 76 // views::CustomButton:
77 bool IsTriggerableEvent(const ui::Event& event) override; 77 bool IsTriggerableEvent(const ui::Event& event) override;
78 78
79 private: 79 private:
80 friend class MediaIndicatorButtonTest;
80 class FadeAnimationDelegate; 81 class FadeAnimationDelegate;
81 82
82 // Returns the tab (parent view) of this MediaIndicatorButton. 83 // Returns the tab (parent view) of this MediaIndicatorButton.
83 Tab* GetTab() const; 84 Tab* GetTab() const;
84 85
85 // Resets the images to display on the button to reflect |state| and the 86 // Resets the images to display on the button to reflect |state| and the
86 // parent tab's button color. Should be called when either of these changes. 87 // parent tab's button color. Should be called when either of these changes.
87 void ResetImages(TabMediaState state); 88 void ResetImages(TabMediaState state);
88 89
89 Tab* const parent_tab_; 90 Tab* const parent_tab_;
90 91
91 TabMediaState media_state_; 92 TabMediaState media_state_;
92 93
93 // Media indicator fade-in/out animation (i.e., only on show/hide, not a 94 // Media indicator fade-in/out animation (i.e., only on show/hide, not a
94 // continuous animation). 95 // continuous animation).
95 scoped_ptr<gfx::AnimationDelegate> fade_animation_delegate_; 96 scoped_ptr<gfx::AnimationDelegate> fade_animation_delegate_;
96 scoped_ptr<gfx::Animation> fade_animation_; 97 scoped_ptr<gfx::Animation> fade_animation_;
97 TabMediaState showing_media_state_; 98 TabMediaState showing_media_state_;
98 99
99 DISALLOW_COPY_AND_ASSIGN(MediaIndicatorButton); 100 DISALLOW_COPY_AND_ASSIGN(MediaIndicatorButton);
100 }; 101 };
101 102
102 #endif // CHROME_BROWSER_UI_VIEWS_TABS_MEDIA_INDICATOR_BUTTON_H_ 103 #endif // CHROME_BROWSER_UI_VIEWS_TABS_MEDIA_INDICATOR_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc ('k') | chrome/browser/ui/views/tabs/media_indicator_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698