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

Side by Side Diff: ui/linux_ui/linux_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
« no previous file with comments | « ui/base/linux_ui.cc ('k') | ui/linux_ui/linux_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_BASE_LINUX_UI_H_ 5 #ifndef UI_LINUX_UI_LINUX_UI_H_
6 #define UI_BASE_LINUX_UI_H_ 6 #define UI_LINUX_UI_LINUX_UI_H_
7 7
8 #include "ui/base/ui_export.h"
9 #include "third_party/skia/include/core/SkColor.h" 8 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/linux_ui/linux_ui_export.h"
10 #include "ui/shell_dialogs/linux_shell_dialog.h"
10 11
11 // The main entrypoint into Linux toolkit specific code. GTK code should only 12 // The main entrypoint into Linux toolkit specific code. GTK code should only
12 // be executed behind this interface. 13 // be executed behind this interface.
13 14
14 namespace gfx { 15 namespace gfx {
15 class Image; 16 class Image;
16 } 17 }
17 18
18 namespace ui { 19 namespace ui {
19 class SelectFilePolicy; 20 class NativeTheme;
20 21
21 // Adapter class with targets to render like different toolkits. Set by any 22 // Adapter class with targets to render like different toolkits. Set by any
22 // project that wants to do linux desktop native rendering. 23 // project that wants to do linux desktop native rendering.
23 // 24 //
24 // TODO(erg): We're hardcoding GTK2, when we'll need to have backends for (at 25 // TODO(erg): We're hardcoding GTK2, when we'll need to have backends for (at
25 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very 26 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very
26 // complex method that pokes around with dlopen against a libuigtk2.so, a 27 // complex method that pokes around with dlopen against a libuigtk2.so, a
27 // liuigtk3.so, etc. 28 // liuigtk3.so, etc.
28 class UI_EXPORT LinuxUI { 29 //
30 // TODO(erg): This class should be folded into ui/views/ instead of living in
31 // its own component once we've deleted out the GTK+ port.
32 class LINUX_UI_EXPORT LinuxUI : public LinuxShellDialog {
29 public: 33 public:
30 virtual ~LinuxUI() {} 34 virtual ~LinuxUI() {}
31 35
32 // Sets the dynamically loaded singleton that draws the desktop native UI. 36 // Sets the dynamically loaded singleton that draws the desktop native UI.
33 static void SetInstance(LinuxUI* instance); 37 static void SetInstance(LinuxUI* instance);
34 38
35 // Returns a LinuxUI instance for the toolkit used in the user's desktop 39 // Returns a LinuxUI instance for the toolkit used in the user's desktop
36 // environment. 40 // environment.
37 // 41 //
38 // Can return NULL, in case no toolkit has been set. (For example, if we're 42 // Can return NULL, in case no toolkit has been set. (For example, if we're
39 // running with the "--ash" flag.) 43 // running with the "--ash" flag.)
40 static const LinuxUI* instance(); 44 static const LinuxUI* instance();
41 45
42 // Returns an themed image per theme_provider.h 46 // Returns an themed image per theme_provider.h
43 virtual bool UseNativeTheme() const = 0; 47 virtual bool UseNativeTheme() const = 0;
44 virtual gfx::Image* GetThemeImageNamed(int id) const = 0; 48 virtual gfx::Image* GetThemeImageNamed(int id) const = 0;
45 virtual bool GetColor(int id, SkColor* color) const = 0; 49 virtual bool GetColor(int id, SkColor* color) const = 0;
50
51 // Returns a NativeTheme that will provide system colors and draw system
52 // style widgets.
53 virtual NativeTheme* GetNativeTheme() const = 0;
46 }; 54 };
47 55
48 } // namespace ui 56 } // namespace ui
49 57
50 #endif // UI_BASE_LINUX_UI_H_ 58 #endif // UI_LINUX_UI_LINUX_UI_H_
OLDNEW
« no previous file with comments | « ui/base/linux_ui.cc ('k') | ui/linux_ui/linux_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698