class Gtk2Border;
class Gtk2KeyBindingsHandler;
class Gtk2SignalRegistrar;
-class GConfTitlebarListener;
+class GConfListener;
// Interface to GTK2 desktop features.
//
Gtk2UI();
virtual ~Gtk2UI();
+ typedef base::Callback<ui::NativeTheme*(aura::Window* window)>
+ NativeThemeGetter;
+
+ // Setters used by GConfListener:
void SetWindowButtonOrdering(
const std::vector<views::FrameButton>& leading_buttons,
const std::vector<views::FrameButton>& trailing_buttons);
+ void SetNonClientMiddleClickAction(NonClientMiddleClickAction action);
// Draws the GTK button border for state |gtk_state| onto a bitmap.
SkBitmap DrawGtkButtonBorder(int gtk_state,
virtual SkColor GetInactiveSelectionBgColor() const OVERRIDE;
virtual SkColor GetInactiveSelectionFgColor() const OVERRIDE;
virtual double GetCursorBlinkInterval() const OVERRIDE;
- virtual ui::NativeTheme* GetNativeTheme() const OVERRIDE;
+ virtual ui::NativeTheme* GetNativeTheme(aura::Window* window) const OVERRIDE;
+ virtual void SetNativeThemeOverride(const NativeThemeGetter& callback)
+ OVERRIDE;
virtual bool GetDefaultUsesSystemTheme() const OVERRIDE;
virtual void SetDownloadCount(int count) const OVERRIDE;
virtual void SetProgressFraction(float percentage) const OVERRIDE;
views::WindowButtonOrderObserver* observer) OVERRIDE;
virtual void RemoveWindowButtonOrderObserver(
views::WindowButtonOrderObserver* observer) OVERRIDE;
- virtual void AddNativeThemeChangeObserver(
- views::NativeThemeChangeObserver* observer) OVERRIDE;
- virtual void RemoveNativeThemeChangeObserver(
- views::NativeThemeChangeObserver* observer) OVERRIDE;
virtual bool UnityIsRunning() OVERRIDE;
+ virtual NonClientMiddleClickAction GetNonClientMiddleClickAction() OVERRIDE;
virtual void NotifyWindowManagerStartupComplete() OVERRIDE;
// ui::TextEditKeybindingDelegate:
GdkColor* thumb_inactive_color,
GdkColor* track_color);
- // Gets the name of the current icon theme and passes it to our low level XDG
- // integration.
- void SetXDGIconTheme();
-
// Extracts colors and tints from the GTK theme, both for the
// ThemeService interface and the colors we send to webkit.
void LoadGtkValues();
#if defined(USE_GCONF)
// Currently, the only source of window button configuration. This will
// change if we ever have to support XFCE's configuration system or KDE's.
- scoped_ptr<GConfTitlebarListener> titlebar_listener_;
+ scoped_ptr<GConfListener> gconf_listener_;
#endif // defined(USE_GCONF)
// If either of these vectors are non-empty, they represent the current
// Objects to notify when the window frame button order changes.
ObserverList<views::WindowButtonOrderObserver> observer_list_;
- // Observers to notify when the theme state changes.
- ObserverList<views::NativeThemeChangeObserver> theme_change_observers_;
+ // Whether we should lower the window on a middle click to the non client
+ // area.
+ NonClientMiddleClickAction middle_click_action_;
// Image cache of lazily created images.
mutable ImageCache gtk_images_;
- // Whether to use the Gtk2 version of the native theme.
- bool use_gtk_;
+ // Used to override the native theme for a window. If no override is provided
+ // or the callback returns NULL, Gtk2UI will default to a NativeThemeGtk2
+ // instance.
+ NativeThemeGetter native_theme_overrider_;
DISALLOW_COPY_AND_ASSIGN(Gtk2UI);
};