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

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

Issue 1234223005: Initial gtk3 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Silence gtk memory leak Created 5 years, 3 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/menu_util.cc ('k') | chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/native_theme_gtk2.h
diff --git a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.h b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.h
index 78e9c8997708366dd17be024d3a0453cb3e85c9a..abc4cf15a74bf2af032da02465225b79a2e28967 100644
--- a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.h
+++ b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.h
@@ -10,7 +10,6 @@
#include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h"
#include "ui/native_theme/native_theme_base.h"
-typedef struct _GdkColor GdkColor;
namespace libgtk2ui {
@@ -22,14 +21,6 @@ class NativeThemeGtk2 : public ui::NativeThemeBase {
static NativeThemeGtk2* instance();
// Overridden from ui::NativeThemeBase:
- gfx::Size GetPartSize(Part part,
- State state,
- const ExtraParams& extra) const override;
- void Paint(SkCanvas* canvas,
- Part part,
- State state,
- const gfx::Rect& rect,
- const ExtraParams& extra) const override;
SkColor GetSystemColor(ColorId color_id) const override;
void PaintMenuPopupBackground(
SkCanvas* canvas,
@@ -41,37 +32,28 @@ class NativeThemeGtk2 : public ui::NativeThemeBase {
const gfx::Rect& rect,
const MenuListExtraParams& menu_list) const override;
+ // Returns various widgets for theming use.
+ GtkWidget* GetWindow() const;
+ GtkWidget* GetEntry() const;
+ GtkWidget* GetLabel() const;
+ GtkWidget* GetButton() const;
+ GtkWidget* GetTree() const;
+ GtkWidget* GetTooltip() const;
+ GtkWidget* GetMenu() const;
+ GtkWidget* GetMenuItem() const;
+
private:
NativeThemeGtk2();
~NativeThemeGtk2() override;
- // Implementation of GetSystemColor.
- GdkColor GetSystemGdkColor(ColorId color_id) const;
-
- // Returns styles associated with various widget types.
- GtkWidget* GetRealizedWindow() const;
- GtkStyle* GetWindowStyle() const;
- GtkStyle* GetEntryStyle() const;
- GtkStyle* GetLabelStyle() const;
- GtkStyle* GetButtonStyle() const;
- GtkStyle* GetTreeStyle() const;
- GtkStyle* GetTooltipStyle() const;
- GtkStyle* GetMenuStyle() const;
- GtkStyle* GetMenuItemStyle() const;
-
- void PaintComboboxArrow(SkCanvas* canvas,
- GtkStateType state,
- const gfx::Rect& rect) const;
-
- mutable GtkWidget* fake_window_;
- mutable GtkWidget* fake_tooltip_;
+ mutable OwnedWidgetGtk fake_window_;
mutable OwnedWidgetGtk fake_entry_;
mutable OwnedWidgetGtk fake_label_;
mutable OwnedWidgetGtk fake_button_;
mutable OwnedWidgetGtk fake_tree_;
-
+ mutable OwnedWidgetGtk fake_tooltip_;
mutable OwnedWidgetGtk fake_menu_;
- mutable GtkWidget* fake_menu_item_;
+ mutable OwnedWidgetGtk fake_menu_item_;
DISALLOW_COPY_AND_ASSIGN(NativeThemeGtk2);
};
« no previous file with comments | « chrome/browser/ui/libgtk2ui/menu_util.cc ('k') | chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698