| 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" |
| 11 #include "ui/base/ime/linux/linux_input_method_context_factory.h" | 11 #include "ui/base/ime/linux/linux_input_method_context_factory.h" |
| 12 #include "ui/events/x/text_edit_key_bindings_delegate_x11.h" |
| 12 #include "ui/gfx/linux_font_delegate.h" | 13 #include "ui/gfx/linux_font_delegate.h" |
| 13 #include "ui/shell_dialogs/linux_shell_dialog.h" | 14 #include "ui/shell_dialogs/linux_shell_dialog.h" |
| 14 #include "ui/views/controls/button/button.h" | 15 #include "ui/views/controls/button/button.h" |
| 15 #include "ui/views/linux_ui/status_icon_linux.h" | 16 #include "ui/views/linux_ui/status_icon_linux.h" |
| 16 #include "ui/views/views_export.h" | 17 #include "ui/views/views_export.h" |
| 17 | 18 |
| 18 // The main entrypoint into Linux toolkit specific code. GTK code should only | 19 // The main entrypoint into Linux toolkit specific code. GTK code should only |
| 19 // be executed behind this interface. | 20 // be executed behind this interface. |
| 20 | 21 |
| 21 namespace gfx { | 22 namespace gfx { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 35 | 36 |
| 36 // 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 |
| 37 // project that wants to do linux desktop native rendering. | 38 // project that wants to do linux desktop native rendering. |
| 38 // | 39 // |
| 39 // 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 |
| 40 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very | 41 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very |
| 41 // 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 |
| 42 // liuigtk3.so, etc. | 43 // liuigtk3.so, etc. |
| 43 class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory, | 44 class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory, |
| 44 public gfx::LinuxFontDelegate, | 45 public gfx::LinuxFontDelegate, |
| 45 public ui::LinuxShellDialog { | 46 public ui::LinuxShellDialog, |
| 47 public ui::TextEditKeyBindingsDelegateX11 { |
| 46 public: | 48 public: |
| 47 virtual ~LinuxUI() {} | 49 virtual ~LinuxUI() {} |
| 48 | 50 |
| 49 // Sets the dynamically loaded singleton that draws the desktop native UI. | 51 // Sets the dynamically loaded singleton that draws the desktop native UI. |
| 50 static void SetInstance(LinuxUI* instance); | 52 static void SetInstance(LinuxUI* instance); |
| 51 | 53 |
| 52 // Returns a LinuxUI instance for the toolkit used in the user's desktop | 54 // Returns a LinuxUI instance for the toolkit used in the user's desktop |
| 53 // environment. | 55 // environment. |
| 54 // | 56 // |
| 55 // Can return NULL, in case no toolkit has been set. (For example, if we're | 57 // Can return NULL, in case no toolkit has been set. (For example, if we're |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // Notifies the window manager that start up has completed. | 130 // Notifies the window manager that start up has completed. |
| 129 // Normally Chromium opens a new window on startup and GTK does this | 131 // Normally Chromium opens a new window on startup and GTK does this |
| 130 // automatically. In case Chromium does not open a new window on startup, | 132 // automatically. In case Chromium does not open a new window on startup, |
| 131 // e.g. an existing browser window already exists, this should be called. | 133 // e.g. an existing browser window already exists, this should be called. |
| 132 virtual void NotifyWindowManagerStartupComplete() = 0; | 134 virtual void NotifyWindowManagerStartupComplete() = 0; |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 } // namespace views | 137 } // namespace views |
| 136 | 138 |
| 137 #endif // UI_VIEWS_LINUX_UI_LINUX_UI_H_ | 139 #endif // UI_VIEWS_LINUX_UI_LINUX_UI_H_ |
| OLD | NEW |