| Index: chrome/browser/ui/gtk/gconf_titlebar_listener.h
|
| ===================================================================
|
| --- chrome/browser/ui/gtk/gconf_titlebar_listener.h (revision 164859)
|
| +++ chrome/browser/ui/gtk/gconf_titlebar_listener.h (working copy)
|
| @@ -12,35 +12,23 @@
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| +#include "chrome/browser/ui/gtk/titlebar_listener.h"
|
| #include "ui/base/gtk/gtk_signal.h"
|
|
|
| -class BrowserTitlebar;
|
| -template <typename T> struct DefaultSingletonTraits;
|
| -
|
| // On GNOME desktops, subscribes to the gconf key which controlls button order.
|
| -// Everywhere else, SetTiltebarButtons() just calls back into BrowserTitlebar
|
| +// Everywhere else, SetTitlebarButtons() just calls back into BrowserTitlebar
|
| // with the default ordering.
|
| -//
|
| -// Meant to be used as a Singleton through base/memory/singleton.h's interface.
|
| -class GConfTitlebarListener {
|
| +class GConfTitlebarListener : public TitlebarListener::Delegate {
|
| public:
|
| - // Returns the singleton instance.
|
| - static GConfTitlebarListener* GetInstance();
|
| + GConfTitlebarListener();
|
|
|
| - // Sets the current titlebar button order. On GNOME desktops, also subscribes
|
| - // to further notifications when this changes.
|
| - void SetTitlebarButtons(BrowserTitlebar* titlebar);
|
| -
|
| - // Removes |titlebar| from the list of objects observing button order change
|
| - // notifications.
|
| - void RemoveObserver(BrowserTitlebar* titlebar);
|
| -
|
| - protected:
|
| + private:
|
| + // Refcounted.
|
| ~GConfTitlebarListener();
|
|
|
| - private:
|
| - // Private constructor to enforce singleton access.
|
| - GConfTitlebarListener();
|
| + // TitlebarListener::Delegate implementation.
|
| + virtual bool Init() OVERRIDE;
|
| + virtual std::string GetCurrentValue() OVERRIDE;
|
|
|
| // Called whenever the metacity key changes.
|
| CHROMEG_CALLBACK_2(GConfTitlebarListener, void, OnChangeNotification,
|
| @@ -61,10 +49,6 @@
|
| // The current button ordering as heard from gconf.
|
| std::string current_value_;
|
|
|
| - // BrowserTitlebar objects which have subscribed to updates.
|
| - std::set<BrowserTitlebar*> titlebars_;
|
| -
|
| - friend struct DefaultSingletonTraits<GConfTitlebarListener>;
|
| DISALLOW_COPY_AND_ASSIGN(GConfTitlebarListener);
|
| };
|
|
|
|
|