OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 UI_VIEWS_LINUX_UI_LINUX_UI_H_ | 5 #ifndef UI_VIEWS_LINUX_UI_LINUX_UI_H_ |
6 #define UI_VIEWS_LINUX_UI_LINUX_UI_H_ | 6 #define UI_VIEWS_LINUX_UI_LINUX_UI_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 } | 24 } |
25 | 25 |
26 namespace ui { | 26 namespace ui { |
27 class NativeTheme; | 27 class NativeTheme; |
28 } | 28 } |
29 | 29 |
30 namespace views { | 30 namespace views { |
31 class Border; | 31 class Border; |
32 class LabelButton; | 32 class LabelButton; |
33 class View; | 33 class View; |
34 class NativeThemeChangeObserver; | 34 class SystemThemeChangeObserver; |
35 class WindowButtonOrderObserver; | 35 class WindowButtonOrderObserver; |
36 | 36 |
37 // Adapter class with targets to render like different toolkits. Set by any | 37 // Adapter class with targets to render like different toolkits. Set by any |
38 // project that wants to do linux desktop native rendering. | 38 // project that wants to do linux desktop native rendering. |
39 // | 39 // |
40 // TODO(erg): We're hardcoding GTK2, when we'll need to have backends for (at | 40 // TODO(erg): We're hardcoding GTK2, when we'll need to have backends for (at |
41 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very | 41 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very |
42 // complex method that pokes around with dlopen against a libuigtk2.so, a | 42 // complex method that pokes around with dlopen against a libuigtk2.so, a |
43 // liuigtk3.so, etc. | 43 // liuigtk3.so, etc. |
44 class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory, | 44 class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // laid out. If the order is anything other than the default min,max,close on | 121 // laid out. If the order is anything other than the default min,max,close on |
122 // the right, will immediately send a button change event to the observer. | 122 // the right, will immediately send a button change event to the observer. |
123 virtual void AddWindowButtonOrderObserver( | 123 virtual void AddWindowButtonOrderObserver( |
124 WindowButtonOrderObserver* observer) = 0; | 124 WindowButtonOrderObserver* observer) = 0; |
125 | 125 |
126 // Removes the observer from the LinuxUI's list. | 126 // Removes the observer from the LinuxUI's list. |
127 virtual void RemoveWindowButtonOrderObserver( | 127 virtual void RemoveWindowButtonOrderObserver( |
128 WindowButtonOrderObserver* observer) = 0; | 128 WindowButtonOrderObserver* observer) = 0; |
129 | 129 |
130 // Notifies the observer when the native theme changes. | 130 // Notifies the observer when the native theme changes. |
131 virtual void AddNativeThemeChangeObserver( | 131 virtual void AddSystemThemeChangeObserver( |
132 NativeThemeChangeObserver* observer) = 0; | 132 SystemThemeChangeObserver* observer) = 0; |
133 virtual void RemoveNativeThemeChangeObserver( | 133 virtual void RemoveSystemThemeChangeObserver( |
134 NativeThemeChangeObserver* observer) = 0; | 134 SystemThemeChangeObserver* observer) = 0; |
135 | 135 |
136 // Determines whether the user's window manager is Unity. | 136 // Determines whether the user's window manager is Unity. |
137 virtual bool UnityIsRunning() = 0; | 137 virtual bool UnityIsRunning() = 0; |
138 | 138 |
139 // What action we should take when the user middle clicks on non-client | 139 // What action we should take when the user middle clicks on non-client |
140 // area. The default is lowering the window. | 140 // area. The default is lowering the window. |
141 virtual NonClientMiddleClickAction GetNonClientMiddleClickAction() = 0; | 141 virtual NonClientMiddleClickAction GetNonClientMiddleClickAction() = 0; |
142 | 142 |
143 // Notifies the window manager that start up has completed. | 143 // Notifies the window manager that start up has completed. |
144 // Normally Chromium opens a new window on startup and GTK does this | 144 // Normally Chromium opens a new window on startup and GTK does this |
145 // automatically. In case Chromium does not open a new window on startup, | 145 // automatically. In case Chromium does not open a new window on startup, |
146 // e.g. an existing browser window already exists, this should be called. | 146 // e.g. an existing browser window already exists, this should be called. |
147 virtual void NotifyWindowManagerStartupComplete() = 0; | 147 virtual void NotifyWindowManagerStartupComplete() = 0; |
148 }; | 148 }; |
149 | 149 |
150 } // namespace views | 150 } // namespace views |
151 | 151 |
152 #endif // UI_VIEWS_LINUX_UI_LINUX_UI_H_ | 152 #endif // UI_VIEWS_LINUX_UI_LINUX_UI_H_ |
OLD | NEW |