summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs/tab_renderer_gtk.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-17 20:37:34 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-17 20:37:34 +0000
commit96997a53442ca17ccadb816838f641b0cde568e9 (patch)
tree9778b59d7d5a5dd8bab435e38acfd860ea5b6161 /chrome/browser/gtk/tabs/tab_renderer_gtk.h
parentf92977e5e3bbd7c310f64859541fbb3575b09f5e (diff)
downloadchromium_src-96997a53442ca17ccadb816838f641b0cde568e9.zip
chromium_src-96997a53442ca17ccadb816838f641b0cde568e9.tar.gz
chromium_src-96997a53442ca17ccadb816838f641b0cde568e9.tar.bz2
GTK: Fix corrupted tab edges when theme changes.
The tab renderer caches composited images, but this means that pieces of the old theme hang around when we switch themes. Drop the cache when we hear a BROWSER_THEME_CHANGED notification. BUG=none TEST=none Review URL: http://codereview.chromium.org/601095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs/tab_renderer_gtk.h')
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
index 0c50f12..440a0d7 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.h
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
@@ -30,7 +30,8 @@ class TabContents;
class ThemeProvider;
class ThrobAnimation;
-class TabRendererGtk : public AnimationDelegate {
+class TabRendererGtk : public AnimationDelegate,
+ public NotificationObserver {
public:
// Possible animation states.
enum AnimationState {
@@ -146,6 +147,11 @@ class TabRendererGtk : public AnimationDelegate {
// Sets the bounds of the tab.
virtual void SetBounds(const gfx::Rect& bounds);
+ // Provide NotificationObserver implementation.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
// Advance the loading animation to the next frame, or hide the animation if
// the tab isn't loading. Returns |true| if the icon area needs to be
// repainted.
@@ -407,6 +413,9 @@ class TabRendererGtk : public AnimationDelegate {
// The current color of the close button.
SkColor close_button_color_;
+ // Used to listen for theme change notifications.
+ NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(TabRendererGtk);
};