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

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

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
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/views/chrome_views_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
index 1feebbc86c7c69b95fa71ae125d64188257d3619..e09d73fc786e809c0cd97e7c141e8472e83be249 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -449,10 +449,21 @@ double Gtk2UI::GetCursorBlinkInterval() const {
return cursor_blink ? (cursor_blink_time / kGtkCursorBlinkCycleFactor) : 0.0;
}
-ui::NativeTheme* Gtk2UI::GetNativeTheme() const {
+ui::NativeTheme* Gtk2UI::GetNativeTheme(aura::Window* window) const {
+ ui::NativeTheme* native_theme_override = NULL;
+ if (!native_theme_overrider_.is_null())
+ native_theme_override = native_theme_overrider_.Run(window);
+
+ if (native_theme_override)
+ return native_theme_override;
+
return NativeThemeGtk2::instance();
}
+void Gtk2UI::SetNativeThemeOverride(const NativeThemeGetter& callback) {
+ native_theme_overrider_ = callback;
+}
+
bool Gtk2UI::GetDefaultUsesSystemTheme() const {
scoped_ptr<base::Environment> env(base::Environment::Create());
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/views/chrome_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698