| Index: chrome/browser/gtk/custom_button.h
|
| diff --git a/chrome/browser/gtk/custom_button.h b/chrome/browser/gtk/custom_button.h
|
| index 2c6bc68ea95be933912ca1c34354cac52a9b662c..143a090d2ced55e98722047de8853626e882585a 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 {
|
|
|