Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.h

Issue 243633003: use the right NativeTheme on bubbles + dialogs on Aura Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rejigger Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/libgtk2ui/gtk2_ui.h
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.h b/chrome/browser/ui/libgtk2ui/gtk2_ui.h
index c27bcc5314436e55803a28221f5fbed5974fdd55..3d5cb8edaf4070bd42fcc5aa1686f44a6ee3b2b5 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.h
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.h
@@ -45,6 +45,9 @@ class Gtk2UI : public views::LinuxUI {
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,
@@ -90,7 +93,9 @@ class Gtk2UI : public views::LinuxUI {
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;
@@ -256,6 +261,11 @@ class Gtk2UI : public views::LinuxUI {
// Image cache of lazily created images.
mutable ImageCache gtk_images_;
+ // 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);
};
« no previous file with comments | « chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698