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

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

Issue 1415873006: Revert of Paint tab-loading throbbers into a ui::Layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c8c59bec3762a1bdbf0ff320a69a0e5ece969627..fc0937e08f546fa1cb29fadcc138f2cd7a558fc9 100644
--- a/chrome/browser/ui/views/tabs/tab.h
+++ b/chrome/browser/ui/views/tabs/tab.h
@@ -89,7 +89,8 @@
void SetData(const TabRendererData& data);
const TabRendererData& data() const { return data_; }
- // Sets the network state.
+ // Sets the network state. If the network state changes NetworkStateChanged is
+ // invoked.
void UpdateLoadingAnimation(TabRendererData::NetworkState state);
// Starts/Stops a pulse animation.
@@ -155,15 +156,15 @@
private:
friend class TabTest;
+ FRIEND_TEST_ALL_PREFIXES(TabTest, CloseButtonLayout);
+
friend class TabStripTest;
FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked);
FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked);
// The animation object used to swap the favicon with the sad tab icon.
class FaviconCrashAnimation;
-
class TabCloseButton;
- class ThrobberView;
// Contains a cached image and the values used to generate it.
struct ImageCacheEntry {
@@ -246,7 +247,8 @@
void PaintIcon(gfx::Canvas* canvas);
// Invoked if data_.network_state changes, or the network_state is not none.
- void AdvanceLoadingAnimation();
+ void AdvanceLoadingAnimation(TabRendererData::NetworkState old_state,
+ TabRendererData::NetworkState state);
// Returns the number of favicon-size elements that can fit in the tab's
// current size.
@@ -332,6 +334,15 @@
// crashes.
int favicon_hiding_offset_;
+ // The point in time when the tab icon was first painted in the waiting state.
+ base::TimeTicks waiting_start_time_;
+
+ // The point in time when the tab icon was first painted in the loading state.
+ base::TimeTicks loading_start_time_;
+
+ // Paint state for the throbber after the most recent waiting paint.
+ gfx::ThrobberWaitingState waiting_state_;
+
// Step in the immersive loading progress indicator.
int immersive_loading_step_;
@@ -347,7 +358,6 @@
scoped_refptr<gfx::AnimationContainer> animation_container_;
- ThrobberView* throbber_;
MediaIndicatorButton* media_indicator_button_;
views::ImageButton* close_button_;
views::Label* title_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698