BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / libgtk2ui / native_theme_gtk2.h
blobf5e8ca9d4d77443aef237a5877ee901b720cdca4
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_NATIVE_THEME_GTK2_H_
6 #define CHROME_BROWSER_UI_LIBGTK2UI_NATIVE_THEME_GTK2_H_
8 #include <gtk/gtk.h>
10 #include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h"
11 #include "ui/native_theme/native_theme_base.h"
14 namespace libgtk2ui {
16 // A version of NativeTheme that uses GTK2 supplied colours instead of the
17 // default aura colours. Analogue to NativeThemeWin, except that can't be
18 // compiled into the main chrome binary like the Windows code can.
19 class NativeThemeGtk2 : public ui::NativeThemeBase {
20 public:
21 static NativeThemeGtk2* instance();
23 // Overridden from ui::NativeThemeBase:
24 SkColor GetSystemColor(ColorId color_id) const override;
25 void PaintMenuPopupBackground(
26 SkCanvas* canvas,
27 const gfx::Size& size,
28 const MenuBackgroundExtraParams& menu_background) const override;
29 void PaintMenuItemBackground(
30 SkCanvas* canvas,
31 State state,
32 const gfx::Rect& rect,
33 const MenuListExtraParams& menu_list) const override;
35 // Returns various widgets for theming use.
36 GtkWidget* GetWindow() const;
37 GtkWidget* GetEntry() const;
38 GtkWidget* GetLabel() const;
39 GtkWidget* GetButton() const;
40 GtkWidget* GetBlueButton() const;
41 GtkWidget* GetTree() const;
42 GtkWidget* GetTooltip() const;
43 GtkWidget* GetMenu() const;
44 GtkWidget* GetMenuItem() const;
46 private:
47 NativeThemeGtk2();
48 ~NativeThemeGtk2() override;
50 mutable OwnedWidgetGtk fake_window_;
51 mutable OwnedWidgetGtk fake_entry_;
52 mutable OwnedWidgetGtk fake_label_;
53 mutable OwnedWidgetGtk fake_button_;
54 mutable OwnedWidgetGtk fake_bluebutton_;
55 mutable OwnedWidgetGtk fake_tree_;
56 mutable OwnedWidgetGtk fake_tooltip_;
57 mutable OwnedWidgetGtk fake_menu_;
58 mutable OwnedWidgetGtk fake_menu_item_;
60 DISALLOW_COPY_AND_ASSIGN(NativeThemeGtk2);
63 } // namespace libgtk2ui
65 #endif // CHROME_BROWSER_UI_LIBGTK2UI_NATIVE_THEME_GTK2_H_