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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.h

Issue 12315139: Sort out build dependencies for LinuxUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/ui/libgtk2ui/libgtk2ui_export.h" 12 #include "chrome/browser/ui/libgtk2ui/libgtk2ui_export.h"
13 #include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h" 13 #include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h"
14 #include "ui/gfx/color_utils.h" 14 #include "ui/gfx/color_utils.h"
15 #include "ui/shell_dialogs/linux_ui_shell_dialog.h" 15 #include "ui/linux_ui/linux_ui.h"
16 16
17 typedef struct _GdkColor GdkColor; 17 typedef struct _GdkColor GdkColor;
18 typedef struct _GtkStyle GtkStyle; 18 typedef struct _GtkStyle GtkStyle;
19 typedef struct _GtkWidget GtkWidget; 19 typedef struct _GtkWidget GtkWidget;
20 20
21 class SkBitmap; 21 class SkBitmap;
22 22
23 namespace gfx { 23 namespace gfx {
24 class Image; 24 class Image;
25 } 25 }
26 26
27 namespace libgtk2ui { 27 namespace libgtk2ui {
28 28
29 // Interface to GTK2 desktop features. 29 // Interface to GTK2 desktop features.
30 // 30 //
31 class Gtk2UI : public ui::LinuxUIShellDialog { 31 class Gtk2UI : public ui::LinuxUI {
32 public: 32 public:
33 Gtk2UI(); 33 Gtk2UI();
34 virtual ~Gtk2UI(); 34 virtual ~Gtk2UI();
35 35
36 // ui::LinuxShellDialog:
37 virtual ui::SelectFileDialog* CreateSelectFileDialog(
38 ui::SelectFileDialog::Listener* listener,
39 ui::SelectFilePolicy* policy) const OVERRIDE;
40
36 // ui::LinuxUI: 41 // ui::LinuxUI:
37 virtual bool UseNativeTheme() const OVERRIDE; 42 virtual bool UseNativeTheme() const OVERRIDE;
38 virtual gfx::Image* GetThemeImageNamed(int id) const OVERRIDE; 43 virtual gfx::Image* GetThemeImageNamed(int id) const OVERRIDE;
39 virtual bool GetColor(int id, SkColor* color) const OVERRIDE; 44 virtual bool GetColor(int id, SkColor* color) const OVERRIDE;
40 45 virtual ui::NativeTheme* GetNativeTheme() const OVERRIDE;
41 // ui::LinuxUIShellDialog:
42 virtual ui::SelectFileDialog* CreateSelectFileDialog(
43 ui::SelectFileDialog::Listener* listener,
44 ui::SelectFilePolicy* policy) const OVERRIDE;
45 46
46 private: 47 private:
47 typedef std::map<int, SkColor> ColorMap; 48 typedef std::map<int, SkColor> ColorMap;
48 typedef std::map<int, color_utils::HSL> TintMap; 49 typedef std::map<int, color_utils::HSL> TintMap;
49 typedef std::map<int, gfx::Image*> ImageCache; 50 typedef std::map<int, gfx::Image*> ImageCache;
50 51
51 // This method returns the colors webkit will use for the scrollbars. When no 52 // This method returns the colors webkit will use for the scrollbars. When no
52 // colors are specified by the GTK+ theme, this function averages of the 53 // colors are specified by the GTK+ theme, this function averages of the
53 // thumb part and of the track colors. 54 // thumb part and of the track colors.
54 void GetScrollbarColors(GdkColor* thumb_active_color, 55 void GetScrollbarColors(GdkColor* thumb_active_color,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } // namespace libgtk2ui 157 } // namespace libgtk2ui
157 158
158 // Access point to the GTK2 desktop system. This should be the only symbol that 159 // Access point to the GTK2 desktop system. This should be the only symbol that
159 // is exported in the library; everything else should be used through the 160 // is exported in the library; everything else should be used through the
160 // interface, because eventually this .so will be loaded through dlopen at 161 // interface, because eventually this .so will be loaded through dlopen at
161 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or 162 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or
162 // QT or whatever. 163 // QT or whatever.
163 LIBGTK2UI_EXPORT ui::LinuxUI* BuildGtk2UI(); 164 LIBGTK2UI_EXPORT ui::LinuxUI* BuildGtk2UI();
164 165
165 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ 166 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698