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

Side by Side Diff: chrome/browser/ui/views/tabs/tab.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 (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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Sets the container all animations run from. 75 // Sets the container all animations run from.
76 void SetAnimationContainer(gfx::AnimationContainer* container); 76 void SetAnimationContainer(gfx::AnimationContainer* container);
77 77
78 // Returns true if this tab is the active tab. 78 // Returns true if this tab is the active tab.
79 bool IsActive() const; 79 bool IsActive() const;
80 80
81 // Notifies the MediaIndicatorButton that the active state of this tab has 81 // Notifies the MediaIndicatorButton that the active state of this tab has
82 // changed. 82 // changed.
83 void ActiveStateChanged(); 83 void ActiveStateChanged();
84 84
85 // Called when the media indicator has changed states.
86 void MediaStateChanged();
87
85 // Returns true if the tab is selected. 88 // Returns true if the tab is selected.
86 bool IsSelected() const; 89 bool IsSelected() const;
87 90
88 // Sets the data this tabs displays. Invokes DataChanged. Should only be 91 // Sets the data this tabs displays. Invokes DataChanged. Should only be
89 // called after Tab is added to widget hierarchy. 92 // called after Tab is added to widget hierarchy.
90 void SetData(const TabRendererData& data); 93 void SetData(const TabRendererData& data);
91 const TabRendererData& data() const { return data_; } 94 const TabRendererData& data() const { return data_; }
92 95
93 // Sets the network state. 96 // Sets the network state.
94 void UpdateLoadingAnimation(TabRendererData::NetworkState state); 97 void UpdateLoadingAnimation(TabRendererData::NetworkState state);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Returns the inverse of the slope of the diagonal portion of the tab outer 169 // Returns the inverse of the slope of the diagonal portion of the tab outer
167 // border. (This is a positive value, so it's specifically for the slope of 170 // border. (This is a positive value, so it's specifically for the slope of
168 // the leading edge.) 171 // the leading edge.)
169 // 172 //
170 // This returns the inverse (dx/dy instead of dy/dx) because we use exact 173 // This returns the inverse (dx/dy instead of dy/dx) because we use exact
171 // values for the vertical distances between points and then compute the 174 // values for the vertical distances between points and then compute the
172 // horizontal deltas from those. 175 // horizontal deltas from those.
173 static float GetInverseDiagonalSlope(); 176 static float GetInverseDiagonalSlope();
174 177
175 private: 178 private:
179 friend class MediaIndicatorButtonTest;
176 friend class TabTest; 180 friend class TabTest;
177 friend class TabStripTest; 181 friend class TabStripTest;
178 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked); 182 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked);
179 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked); 183 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked);
180 184
181 // The animation object used to swap the favicon with the sad tab icon. 185 // The animation object used to swap the favicon with the sad tab icon.
182 class FaviconCrashAnimation; 186 class FaviconCrashAnimation;
183 187
184 class TabCloseButton; 188 class TabCloseButton;
185 class ThrobberView; 189 class ThrobberView;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 SkColor button_color_; 400 SkColor button_color_;
397 401
398 // As the majority of the tabs are inactive, and painting tabs is slowish, 402 // As the majority of the tabs are inactive, and painting tabs is slowish,
399 // we cache a handful of the inactive tab backgrounds here. 403 // we cache a handful of the inactive tab backgrounds here.
400 static ImageCache* image_cache_; 404 static ImageCache* image_cache_;
401 405
402 DISALLOW_COPY_AND_ASSIGN(Tab); 406 DISALLOW_COPY_AND_ASSIGN(Tab);
403 }; 407 };
404 408
405 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 409 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/media_indicator_button_unittest.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698