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

Unified Diff: chrome/browser/gtk/tabs/tab_renderer_gtk.h

Issue 155588: GTK Themes: Tint throbbers like we tint all other buttons in the interface. (Closed)
Patch Set: Changes for tony Created 11 years, 5 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 | « chrome/browser/gtk/tabs/tab_gtk.cc ('k') | chrome/browser/gtk/tabs/tab_renderer_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/tabs/tab_renderer_gtk.h
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
index 9f52a6c25f1f166bc55a43b2731ff8f2fef498d5..a5e8e04600e8972b31e37283e79b3cd530249dca 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.h
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
@@ -14,6 +14,8 @@
#include "base/basictypes.h"
#include "base/gfx/rect.h"
#include "base/string16.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.h"
#include "chrome/common/owned_widget_gtk.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -34,9 +36,11 @@ class TabRendererGtk : public AnimationDelegate {
ANIMATION_LOADING
};
- class LoadingAnimation {
+ class LoadingAnimation : public NotificationObserver {
public:
struct Data {
+ explicit Data(ThemeProvider* theme_provider);
+
SkBitmap* waiting_animation_frames;
SkBitmap* loading_animation_frames;
int loading_animation_frame_count;
@@ -44,7 +48,7 @@ class TabRendererGtk : public AnimationDelegate {
int waiting_to_loading_frame_count_ratio;
};
- explicit LoadingAnimation(const Data* data);
+ explicit LoadingAnimation(ThemeProvider* theme_provider);
// Advance the loading animation to the next frame, or hide the animation if
// the tab isn't loading.
@@ -60,8 +64,19 @@ class TabRendererGtk : public AnimationDelegate {
return data_->loading_animation_frames;
}
+ // Provide NotificationObserver implementation.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
private:
- const Data* const data_;
+ scoped_ptr<Data> data_;
+
+ // Used to listen for theme change notifications.
+ NotificationRegistrar registrar_;
+
+ // Gives us our throbber images.
+ ThemeProvider* theme_provider_;
// Current state of the animation.
AnimationState animation_state_;
@@ -72,7 +87,7 @@ class TabRendererGtk : public AnimationDelegate {
DISALLOW_COPY_AND_ASSIGN(LoadingAnimation);
};
- TabRendererGtk();
+ explicit TabRendererGtk(ThemeProvider* theme_provider);
virtual ~TabRendererGtk();
// TabContents. If only the loading state was updated, the loading_only flag
« no previous file with comments | « chrome/browser/gtk/tabs/tab_gtk.cc ('k') | chrome/browser/gtk/tabs/tab_renderer_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698