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

Unified Diff: chrome/browser/ui/libgtkui/native_theme_gtk3.h

Issue 2854773002: Gtk3: Fix black patches on GtkFileChooser dialogs (Closed)
Patch Set: . Created 3 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/libgtkui/gtk_util.h ('k') | chrome/browser/ui/libgtkui/native_theme_gtk3.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtkui/native_theme_gtk3.h
diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk3.h b/chrome/browser/ui/libgtkui/native_theme_gtk3.h
index 5317336e9350a1049d1d673eb39775c278b2328d..7d6c3cefe0708d129d3197605dd150814afa9dac 100644
--- a/chrome/browser/ui/libgtkui/native_theme_gtk3.h
+++ b/chrome/browser/ui/libgtkui/native_theme_gtk3.h
@@ -7,18 +7,23 @@
#include "base/macros.h"
#include "base/optional.h"
+#include "ui/base/glib/glib_signal.h"
+#include "ui/base/glib/scoped_gobject.h"
#include "ui/native_theme/native_theme_base.h"
+typedef struct _GtkCssProvider GtkCssProvider;
+typedef struct _GtkParamSpec GtkParamSpec;
+typedef struct _GtkSettings GtkSettings;
+
namespace libgtkui {
+using ScopedCssProvider = ScopedGObject<GtkCssProvider>;
+
// A version of NativeTheme that uses GTK3-rendered widgets.
class NativeThemeGtk3 : public ui::NativeThemeBase {
public:
static NativeThemeGtk3* instance();
- // Called when gtk theme changes.
- void ResetColorCache();
-
// Overridden from ui::NativeThemeBase:
SkColor GetSystemColor(ColorId color_id) const override;
void PaintArrowButton(cc::PaintCanvas* canvas,
@@ -63,8 +68,18 @@ class NativeThemeGtk3 : public ui::NativeThemeBase {
NativeThemeGtk3();
~NativeThemeGtk3() override;
+ void SetThemeCssOverride(ScopedCssProvider provider);
+
+ CHROMEG_CALLBACK_1(NativeThemeGtk3,
+ void,
+ OnThemeChanged,
+ GtkSettings*,
+ GtkParamSpec*);
+
mutable base::Optional<SkColor> color_cache_[kColorId_NumColors];
+ ScopedCssProvider theme_css_override_;
+
DISALLOW_COPY_AND_ASSIGN(NativeThemeGtk3);
};
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_util.h ('k') | chrome/browser/ui/libgtkui/native_theme_gtk3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698