summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/infobar_gtk.h
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 23:27:33 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 23:27:33 +0000
commit0679f33432fc97bfc5f51caca700a18a3723fcc8 (patch)
treeaf9a02cce3e133d263f843aa0f573f0afce0fea6 /chrome/browser/gtk/infobar_gtk.h
parentd11c8e956955c9dd87e98033c7c4fa152da9fd76 (diff)
downloadchromium_src-0679f33432fc97bfc5f51caca700a18a3723fcc8.zip
chromium_src-0679f33432fc97bfc5f51caca700a18a3723fcc8.tar.gz
chromium_src-0679f33432fc97bfc5f51caca700a18a3723fcc8.tar.bz2
GTK: theme the info bar border.
Also apply the default border for non-gtk themes. BUG=23390 TEST=none Review URL: http://codereview.chromium.org/304012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/infobar_gtk.h')
-rw-r--r--chrome/browser/gtk/infobar_gtk.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/chrome/browser/gtk/infobar_gtk.h b/chrome/browser/gtk/infobar_gtk.h
index 9fea78b..ff907c1 100644
--- a/chrome/browser/gtk/infobar_gtk.h
+++ b/chrome/browser/gtk/infobar_gtk.h
@@ -8,13 +8,17 @@
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/gtk/slide_animator_gtk.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.h"
#include "chrome/common/owned_widget_gtk.h"
class CustomDrawButton;
+class GtkThemeProvider;
class InfoBarContainerGtk;
class InfoBarDelegate;
-class InfoBar : public SlideAnimatorGtk::Delegate {
+class InfoBar : public SlideAnimatorGtk::Delegate,
+ public NotificationObserver {
public:
explicit InfoBar(InfoBarDelegate* delegate);
virtual ~InfoBar();
@@ -46,9 +50,16 @@ class InfoBar : public SlideAnimatorGtk::Delegate {
// Returns true if the infobar is showing the its open or close animation.
bool IsAnimating();
+ void SetThemeProvider(GtkThemeProvider* theme_provider);
+
// SlideAnimatorGtk::Delegate implementation.
virtual void Closed();
+ // NotificationOPbserver implementation.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
protected:
// Removes our associated InfoBarDelegate from the associated TabContents.
// (Will lead to this InfoBar being closed).
@@ -72,9 +83,16 @@ class InfoBar : public SlideAnimatorGtk::Delegate {
// The InfoBar's delegate.
InfoBarDelegate* delegate_;
+ // The theme provider, used for getting border colors.
+ GtkThemeProvider* theme_provider_;
+
+ NotificationRegistrar registrar_;
+
private:
static void OnCloseButton(GtkWidget* button, InfoBar* info_bar);
+ void UpdateBorderColor();
+
DISALLOW_COPY_AND_ASSIGN(InfoBar);
};