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