summaryrefslogtreecommitdiff
path: root/chromium/ui/gtk/gtk_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/gtk/gtk_util.h')
-rw-r--r--chromium/ui/gtk/gtk_util.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/chromium/ui/gtk/gtk_util.h b/chromium/ui/gtk/gtk_util.h
index 67550b1fd24..6be49077607 100644
--- a/chromium/ui/gtk/gtk_util.h
+++ b/chromium/ui/gtk/gtk_util.h
@@ -5,16 +5,12 @@
#ifndef UI_GTK_GTK_UTIL_H_
#define UI_GTK_GTK_UTIL_H_
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
-
#include <string>
#include <vector>
#include "base/component_export.h"
#include "ui/base/glib/scoped_gobject.h"
#include "ui/color/color_id.h"
-#include "ui/gtk/gtk_buildflags.h"
#include "ui/gtk/gtk_compat.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/window/frame_buttons.h"
@@ -33,11 +29,10 @@ class KeyEvent;
namespace gtk {
-extern const char kGtkCSSMenu[];
-extern const char kGtkCSSMenuItem[];
-extern const char kGtkCSSMenuScrollbar[];
+const char* GtkCssMenu();
+const char* GtkCssMenuItem();
+const char* GtkCssMenuScrollbar();
-COMPONENT_EXPORT(GTK)
void GtkInitFromCommandLine(const base::CommandLine& command_line);
// Sets |dialog| as transient for |parent|, which will keep it on top and center
@@ -122,7 +117,6 @@ class GtkCssContext {
using ScopedCssProvider = ScopedGObject<GtkCssProvider>;
-#if BUILDFLAG(GTK_VERSION) < 4
} // namespace gtk
// Template override cannot be in the gtk namespace.
@@ -150,13 +144,10 @@ inline void ScopedGObject<GtkStyleContext>::Unref() {
}
namespace gtk {
-#endif
// Converts ui::NativeTheme::State to GtkStateFlags.
GtkStateFlags StateToStateFlags(ui::NativeTheme::State state);
-SkColor GdkRgbaToSkColor(const GdkRGBA& color);
-
// If |context| is nullptr, creates a new top-level style context
// specified by parsing |css_node|. Otherwise, creates the child
// context with |context| as the parent.
@@ -171,8 +162,6 @@ GtkCssContext AppendCssNodeToStyleContext(GtkCssContext context,
// must g_object_unref() the returned context.
GtkCssContext GetStyleContextFromCss(const std::string& css_selector);
-SkColor GetFgColorFromStyleContext(GtkStyleContext* context);
-
SkColor GetBgColorFromStyleContext(GtkCssContext context);
// Overrides properties on |context| and all its parents with those
@@ -249,7 +238,7 @@ float GetDeviceScaleFactor();
GdkTexture* GetTextureFromRenderNode(GskRenderNode* node);
// Gets the GTK theme color for a given `color_id`.
-base::Optional<SkColor> SkColorFromColorId(ui::ColorId color_id);
+absl::optional<SkColor> SkColorFromColorId(ui::ColorId color_id);
} // namespace gtk