| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_LIBGTKUI_NATIVE_THEME_GTK3_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTKUI_NATIVE_THEME_GTK3_H_ |
| 6 #define CHROME_BROWSER_UI_LIBGTKUI_NATIVE_THEME_GTK3_H_ | 6 #define CHROME_BROWSER_UI_LIBGTKUI_NATIVE_THEME_GTK3_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/native_theme/native_theme_base.h" | 9 #include "ui/native_theme/native_theme_base.h" |
| 10 | 10 |
| 11 typedef struct _GtkWidget GtkWidget; | 11 typedef struct _GtkWidget GtkWidget; |
| 12 | 12 |
| 13 namespace libgtkui { | 13 namespace libgtkui { |
| 14 | 14 |
| 15 // A version of NativeTheme that uses GTK3-rendered widgets. | 15 // A version of NativeTheme that uses GTK3-rendered widgets. |
| 16 class NativeThemeGtk3 : public ui::NativeThemeBase { | 16 class NativeThemeGtk3 : public ui::NativeThemeBase { |
| 17 public: | 17 public: |
| 18 static NativeThemeGtk3* instance(); | 18 static NativeThemeGtk3* instance(); |
| 19 | 19 |
| 20 // Overridden from ui::NativeThemeBase: | 20 // Overridden from ui::NativeThemeBase: |
| 21 SkColor GetSystemColor(ColorId color_id) const override; | 21 SkColor GetSystemColor(ColorId color_id) const override; |
| 22 void PaintMenuPopupBackground( |
| 23 SkCanvas* canvas, |
| 24 const gfx::Size& size, |
| 25 const MenuBackgroundExtraParams& menu_background) const override; |
| 26 void PaintMenuItemBackground( |
| 27 SkCanvas* canvas, |
| 28 State state, |
| 29 const gfx::Rect& rect, |
| 30 const MenuItemExtraParams& menu_item) const override; |
| 22 | 31 |
| 23 private: | 32 private: |
| 24 NativeThemeGtk3(); | 33 NativeThemeGtk3(); |
| 25 ~NativeThemeGtk3() override; | 34 ~NativeThemeGtk3() override; |
| 26 | 35 |
| 27 // Returns various widgets for theming use. | 36 // Returns various widgets for theming use. |
| 28 // TODO(thomasanderson): Remove all of these. | 37 // TODO(thomasanderson): Remove all of these. |
| 29 GtkWidget* GetWindow() const; | 38 GtkWidget* GetWindow() const; |
| 30 GtkWidget* GetEntry() const; | 39 GtkWidget* GetEntry() const; |
| 31 GtkWidget* GetLabel() const; | 40 GtkWidget* GetLabel() const; |
| 32 GtkWidget* GetButton() const; | 41 GtkWidget* GetButton() const; |
| 33 GtkWidget* GetBlueButton() const; | 42 GtkWidget* GetBlueButton() const; |
| 34 GtkWidget* GetTree() const; | 43 GtkWidget* GetTree() const; |
| 35 GtkWidget* GetTooltip() const; | 44 GtkWidget* GetTooltip() const; |
| 36 GtkWidget* GetMenu() const; | 45 GtkWidget* GetMenu() const; |
| 37 GtkWidget* GetMenuItem() const; | 46 GtkWidget* GetMenuItem() const; |
| 38 | 47 |
| 39 DISALLOW_COPY_AND_ASSIGN(NativeThemeGtk3); | 48 DISALLOW_COPY_AND_ASSIGN(NativeThemeGtk3); |
| 40 }; | 49 }; |
| 41 | 50 |
| 42 } // namespace libgtkui | 51 } // namespace libgtkui |
| 43 | 52 |
| 44 #endif // CHROME_BROWSER_UI_LIBGTKUI_NATIVE_THEME_GTK3_H_ | 53 #endif // CHROME_BROWSER_UI_LIBGTKUI_NATIVE_THEME_GTK3_H_ |
| OLD | NEW |