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

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

Issue 2290053002: Remove some unused theming code for GTK. (Closed)
Patch Set: remove GtkThemeIconSource Created 4 years, 4 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/themes/theme_service_aurax11.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.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.h
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.h b/chrome/browser/ui/libgtk2ui/gtk2_ui.h
index fa7f2688ec036b094a1ac49b19dd484d10785e0c..e98ddfee39e3fbe1b6915ed649e393e5c93f1719 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.h
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.h
@@ -19,18 +19,12 @@
#include "ui/views/linux_ui/linux_ui.h"
#include "ui/views/window/frame_buttons.h"
-typedef struct _GtkBorder GtkBorder;
typedef struct _GtkStyle GtkStyle;
typedef struct _GtkWidget GtkWidget;
class SkBitmap;
-namespace gfx {
-class Image;
-}
-
namespace libgtk2ui {
-class Gtk2Border;
class Gtk2KeyBindingsHandler;
class GConfListener;
@@ -77,10 +71,8 @@ class Gtk2UI : public views::LinuxUI {
// TODO(varkha): This should not be necessary once Material Design is on
// unconditionally.
void MaterialDesignControllerReady() override;
- gfx::Image GetThemeImageNamed(int id) const override;
bool GetTint(int id, color_utils::HSL* tint) const override;
bool GetColor(int id, SkColor* color) const override;
- bool HasCustomImage(int id) const override;
SkColor GetFocusRingColor() const override;
SkColor GetThumbActiveColor() const override;
SkColor GetThumbInactiveColor() const override;
@@ -123,7 +115,6 @@ class Gtk2UI : public views::LinuxUI {
private:
typedef std::map<int, SkColor> ColorMap;
typedef std::map<int, color_utils::HSL> TintMap;
- typedef std::map<int, gfx::Image> ImageCache;
// This method returns the colors webkit will use for the scrollbars. When no
// colors are specified by the GTK+ theme, this function averages of the
@@ -144,29 +135,11 @@ class Gtk2UI : public views::LinuxUI {
// Reads in explicit theme frame colors from the ChromeGtkFrame style class
// or generates them per our fallback algorithm.
- SkColor BuildFrameColors();
+ void BuildFrameColors();
// Gets a tint which depends on the default for |id| as well as |color|.
color_utils::HSL ColorToTint(int id, SkColor color);
- // Lazily generates each image used in the gtk theme.
- gfx::Image GenerateGtkThemeImage(int id) const;
- SkBitmap GenerateGtkThemeBitmap(int id) const;
-
- // Creates a GTK+ version of IDR_THEME_FRAME. Instead of tinting, this
- // creates a theme configurable gradient ending with |color_id| at the
- // bottom, and |gradient_name| at the top if that color is specified in the
- // theme.
- SkBitmap GenerateFrameImage(int color_id,
- const char* gradient_name) const;
-
- // Takes the base frame image |base_id| and tints it with |tint_id|.
- SkBitmap GenerateTabImage(int base_id) const;
-
- // Tints an icon based on tint.
- SkBitmap GenerateTintedIcon(int base_id,
- const color_utils::HSL& tint) const;
-
// Returns the tint for buttons that contrasts with the normal window
// background color.
void GetNormalButtonTintHSL(color_utils::HSL* tint) const;
@@ -181,9 +154,6 @@ class Gtk2UI : public views::LinuxUI {
// Gets a color for the background of the call to action button.
SkColor CallToActionBgColor(int gtk_state) const;
- // Frees all calculated images and color data.
- void ClearAllThemeData();
-
// Updates |default_font_*|.
void UpdateDefaultFont();
@@ -234,9 +204,6 @@ class Gtk2UI : public views::LinuxUI {
// area.
NonClientMiddleClickAction middle_click_action_;
- // 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.
« no previous file with comments | « chrome/browser/themes/theme_service_aurax11.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698