OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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_LIBGTK2UI_GTK2_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ | 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
14 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" | 15 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" |
15 #include "chrome/browser/ui/libgtk2ui/gtk2_signal_registrar.h" | 16 #include "chrome/browser/ui/libgtk2ui/gtk2_signal_registrar.h" |
16 #include "chrome/browser/ui/libgtk2ui/libgtk2ui_export.h" | 17 #include "chrome/browser/ui/libgtk2ui/libgtk2ui_export.h" |
17 #include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h" | 18 #include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h" |
18 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h" | 19 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h" |
19 #include "ui/gfx/color_utils.h" | 20 #include "ui/gfx/color_utils.h" |
20 #include "ui/views/linux_ui/linux_ui.h" | 21 #include "ui/views/linux_ui/linux_ui.h" |
21 #include "ui/views/window/frame_buttons.h" | 22 #include "ui/views/window/frame_buttons.h" |
22 | 23 |
23 typedef struct _GdkColor GdkColor; | 24 typedef struct _GdkColor GdkColor; |
24 typedef struct _GtkBorder GtkBorder; | 25 typedef struct _GtkBorder GtkBorder; |
25 typedef struct _GtkStyle GtkStyle; | 26 typedef struct _GtkStyle GtkStyle; |
26 typedef struct _GtkWidget GtkWidget; | 27 typedef struct _GtkWidget GtkWidget; |
27 | 28 |
28 class SkBitmap; | 29 class SkBitmap; |
29 | 30 |
30 namespace gfx { | 31 namespace gfx { |
31 class Image; | 32 class Image; |
| 33 class ScopedPangoFontDescription; |
32 } | 34 } |
33 | 35 |
34 namespace libgtk2ui { | 36 namespace libgtk2ui { |
35 class Gtk2Border; | 37 class Gtk2Border; |
36 class Gtk2KeyBindingsHandler; | 38 class Gtk2KeyBindingsHandler; |
37 class Gtk2SignalRegistrar; | 39 class Gtk2SignalRegistrar; |
38 class GConfListener; | 40 class GConfListener; |
39 | 41 |
40 // Interface to GTK2 desktop features. | 42 // Interface to GTK2 desktop features. |
41 // | 43 // |
(...skipping 16 matching lines...) Expand all Loading... |
58 bool focused, | 60 bool focused, |
59 bool call_to_action, | 61 bool call_to_action, |
60 int width, | 62 int width, |
61 int height) const; | 63 int height) const; |
62 | 64 |
63 // ui::LinuxInputMethodContextFactory: | 65 // ui::LinuxInputMethodContextFactory: |
64 virtual scoped_ptr<ui::LinuxInputMethodContext> CreateInputMethodContext( | 66 virtual scoped_ptr<ui::LinuxInputMethodContext> CreateInputMethodContext( |
65 ui::LinuxInputMethodContextDelegate* delegate) const OVERRIDE; | 67 ui::LinuxInputMethodContextDelegate* delegate) const OVERRIDE; |
66 | 68 |
67 // gfx::LinuxFontDelegate: | 69 // gfx::LinuxFontDelegate: |
68 virtual bool UseAntialiasing() const OVERRIDE; | 70 virtual gfx::FontRenderParams GetDefaultFontRenderParams() const OVERRIDE; |
69 virtual gfx::FontRenderParams::Hinting GetHintingStyle() const OVERRIDE; | 71 virtual scoped_ptr<gfx::ScopedPangoFontDescription> |
70 virtual gfx::FontRenderParams::SubpixelRendering | 72 GetDefaultPangoFontDescription() const OVERRIDE; |
71 GetSubpixelRenderingStyle() const OVERRIDE; | |
72 virtual std::string GetDefaultFontDescription() const OVERRIDE; | |
73 virtual double GetFontDPI() const OVERRIDE; | 73 virtual double GetFontDPI() const OVERRIDE; |
74 | 74 |
75 // ui::LinuxShellDialog: | 75 // ui::LinuxShellDialog: |
76 virtual ui::SelectFileDialog* CreateSelectFileDialog( | 76 virtual ui::SelectFileDialog* CreateSelectFileDialog( |
77 ui::SelectFileDialog::Listener* listener, | 77 ui::SelectFileDialog::Listener* listener, |
78 ui::SelectFilePolicy* policy) const OVERRIDE; | 78 ui::SelectFilePolicy* policy) const OVERRIDE; |
79 | 79 |
80 // ui::LinuxUI: | 80 // ui::LinuxUI: |
81 virtual void Initialize() OVERRIDE; | 81 virtual void Initialize() OVERRIDE; |
82 virtual gfx::Image GetThemeImageNamed(int id) const OVERRIDE; | 82 virtual gfx::Image GetThemeImageNamed(int id) const OVERRIDE; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 SkColor focus_ring_color_; | 220 SkColor focus_ring_color_; |
221 SkColor thumb_active_color_; | 221 SkColor thumb_active_color_; |
222 SkColor thumb_inactive_color_; | 222 SkColor thumb_inactive_color_; |
223 SkColor track_color_; | 223 SkColor track_color_; |
224 SkColor active_selection_bg_color_; | 224 SkColor active_selection_bg_color_; |
225 SkColor active_selection_fg_color_; | 225 SkColor active_selection_fg_color_; |
226 SkColor inactive_selection_bg_color_; | 226 SkColor inactive_selection_bg_color_; |
227 SkColor inactive_selection_fg_color_; | 227 SkColor inactive_selection_fg_color_; |
228 | 228 |
229 // Pango description for the default UI font. | 229 // Pango description for the default UI font. |
230 std::string default_font_description_; | 230 scoped_ptr<gfx::ScopedPangoFontDescription> default_font_description_; |
231 | 231 |
232 #if defined(USE_GCONF) | 232 #if defined(USE_GCONF) |
233 // Currently, the only source of window button configuration. This will | 233 // Currently, the only source of window button configuration. This will |
234 // change if we ever have to support XFCE's configuration system or KDE's. | 234 // change if we ever have to support XFCE's configuration system or KDE's. |
235 scoped_ptr<GConfListener> gconf_listener_; | 235 scoped_ptr<GConfListener> gconf_listener_; |
236 #endif // defined(USE_GCONF) | 236 #endif // defined(USE_GCONF) |
237 | 237 |
238 // If either of these vectors are non-empty, they represent the current | 238 // If either of these vectors are non-empty, they represent the current |
239 // window button configuration. | 239 // window button configuration. |
240 std::vector<views::FrameButton> leading_buttons_; | 240 std::vector<views::FrameButton> leading_buttons_; |
(...skipping 22 matching lines...) Expand all Loading... |
263 } // namespace libgtk2ui | 263 } // namespace libgtk2ui |
264 | 264 |
265 // Access point to the GTK2 desktop system. This should be the only symbol that | 265 // Access point to the GTK2 desktop system. This should be the only symbol that |
266 // is exported in the library; everything else should be used through the | 266 // is exported in the library; everything else should be used through the |
267 // interface, because eventually this .so will be loaded through dlopen at | 267 // interface, because eventually this .so will be loaded through dlopen at |
268 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or | 268 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or |
269 // QT or whatever. | 269 // QT or whatever. |
270 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); | 270 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); |
271 | 271 |
272 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ | 272 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
OLD | NEW |