summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/custom_button.h
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 19:16:39 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 19:16:39 +0000
commit7a2a9ce8a5fd79c2fbb5bf3db7a7d58bbd73ce80 (patch)
tree74b9d0ffa81673c7d14c3670d4466500ce96a542 /chrome/browser/gtk/custom_button.h
parent87f8ce656196b6e6e2cd87e379891128b45b2174 (diff)
downloadchromium_src-7a2a9ce8a5fd79c2fbb5bf3db7a7d58bbd73ce80.zip
chromium_src-7a2a9ce8a5fd79c2fbb5bf3db7a7d58bbd73ce80.tar.gz
chromium_src-7a2a9ce8a5fd79c2fbb5bf3db7a7d58bbd73ce80.tar.bz2
Revert "Add button tinting to the toolbar buttons."
This reverts commit r20396. TBR=erg Review URL: http://codereview.chromium.org/155367 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/custom_button.h')
-rw-r--r--chrome/browser/gtk/custom_button.h40
1 files changed, 3 insertions, 37 deletions
diff --git a/chrome/browser/gtk/custom_button.h b/chrome/browser/gtk/custom_button.h
index 2c6bc68..143a090 100644
--- a/chrome/browser/gtk/custom_button.h
+++ b/chrome/browser/gtk/custom_button.h
@@ -11,28 +11,20 @@
#include "base/gfx/rect.h"
#include "base/scoped_ptr.h"
-#include "chrome/common/notification_observer.h"
-#include "chrome/common/notification_registrar.h"
#include "chrome/common/owned_widget_gtk.h"
-class ThemeProvider;
-
// These classes implement two kinds of custom-drawn buttons. They're
// used on the toolbar and the bookmarks bar.
// CustomDrawButtonBase provides the base for building a custom drawn button.
// It handles managing the pixbufs containing all the static images used to draw
// the button. It also manages painting these pixbufs.
-class CustomDrawButtonBase : public NotificationObserver {
+class CustomDrawButtonBase {
public:
- // If the images come from ResourceBundle rather than the theme provider,
- // pass in NULL for |theme_provider|.
- CustomDrawButtonBase(ThemeProvider* theme_provider,
- int normal_id,
+ CustomDrawButtonBase(int normal_id,
int active_id,
int highlight_id,
int depressed_id);
-
~CustomDrawButtonBase();
GdkPixbuf* pixbufs(int i) const { return pixbufs_[i]; }
@@ -41,11 +33,6 @@ class CustomDrawButtonBase : public NotificationObserver {
void set_paint_override(int state) { paint_override_ = state; }
- // Provide NotificationObserver implementation.
- virtual void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details);
-
private:
// We store one GdkPixbuf* for each possible state of the button;
// INSENSITIVE is the last available state;
@@ -54,17 +41,6 @@ class CustomDrawButtonBase : public NotificationObserver {
// If non-negative, the state to paint the button.
int paint_override_;
- // We need to remember the image ids that the user passes in and the theme
- // provider so we can reload images if the user changes theme.
- int normal_id_;
- int active_id_;
- int highlight_id_;
- int depressed_id_;
- ThemeProvider* theme_provider_;
-
- // Used to listen for theme change notifications.
- NotificationRegistrar registrar_;
-
DISALLOW_COPY_AND_ASSIGN(CustomDrawButtonBase);
};
@@ -80,19 +56,9 @@ class CustomDrawButton {
int highlight_id,
int depressed_id,
const char* stock_id);
-
- // Same as above, but uses themed (and possibly tinted) images.
- CustomDrawButton(ThemeProvider* theme_provider,
- int normal_id,
- int active_id,
- int highlight_id,
- int depressed_id,
- const char* stock_id);
-
+ explicit CustomDrawButton(const std::string& filename);
~CustomDrawButton();
- void Init();
-
GtkWidget* widget() const { return widget_.get(); }
gfx::Rect bounds() const {