diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-03-24 18:49:30 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-28 13:33:11 +0100 |
commit | 9be81c588afc913f5214d78608fecafeef8bc160 (patch) | |
tree | 19b06bff7e5016845ad30babc32ae5cc9f3834e6 /src/core/chromium_overrides.cpp | |
parent | 9a1a09bf82ea98a2b69b351120619c787ce990a8 (diff) |
Get rid of GTK dependencies
Build with aura by default and remove GTK related code.
This patch introduces a mechanism for setting gyp build
configuration variables using a GYP_CONFIG and adds a
desktop_linux.pri configuration for this target.
Change-Id: I6b044ba52ebb20c187572669af94a6fc280b0412
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/core/chromium_overrides.cpp')
-rw-r--r-- | src/core/chromium_overrides.cpp | 84 |
1 files changed, 82 insertions, 2 deletions
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp index b0f8702d0..2b1b1632e 100644 --- a/src/core/chromium_overrides.cpp +++ b/src/core/chromium_overrides.cpp @@ -41,8 +41,13 @@ #include "chromium_overrides.h" +#include "qtwebenginecoreglobal.h" +#include "base/values.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" +#include "content/browser/renderer_host/pepper/pepper_truetype_font_list.h" +#include "content/common/font_list.h" + #include <QGuiApplication> #include <QScreen> #include <QWindow> @@ -53,10 +58,17 @@ #endif #if defined(USE_X11) -#include "base/message_loop/message_pump_gtk.h" +#include "base/message_loop/message_pump_x11.h" #include <X11/Xlib.h> #endif +#if defined(USE_AURA) && !defined(USE_OZONE) +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/base/dragdrop/os_exchange_data_provider_aura.h" +#include "ui/gfx/render_text.h" +#include "ui/gfx/platform_font.h" +#endif + void GetScreenInfoFromNativeWindow(QWindow* window, blink::WebScreenInfo* results) { QScreen* screen = window->screen(); @@ -77,7 +89,7 @@ void GetScreenInfoFromNativeWindow(QWindow* window, blink::WebScreenInfo* result namespace base { #if defined(USE_X11) -Display* MessagePumpGtk::GetDefaultXDisplay() { +Display* MessagePumpForUI::GetDefaultXDisplay() { static void *display = qApp->platformNativeInterface()->nativeResourceForScreen(QByteArrayLiteral("display"), qApp->primaryScreen()); if (!display) { // XLib isn't available or has not been initialized, which is a decision we wish to @@ -118,6 +130,74 @@ void RenderWidgetHostViewPort::GetDefaultScreenInfo(blink::WebScreenInfo* result } +#if defined(USE_AURA) && !defined(USE_OZONE) +namespace content { + +// content/common/font_list.h +scoped_ptr<base::ListValue> GetFontList_SlowBlocking() +{ + QT_NOT_USED + return scoped_ptr<base::ListValue>(new base::ListValue); +} + +#if defined(ENABLE_PLUGINS) +// content/browser/renderer_host/pepper/pepper_truetype_font_list.h +void GetFontFamilies_SlowBlocking(std::vector<std::string> *) +{ + QT_NOT_USED +} + +void GetFontsInFamily_SlowBlocking(const std::string &, std::vector<ppapi::proxy::SerializedTrueTypeFontDesc> *) +{ + QT_NOT_USED +} +#endif //defined(ENABLE_PLUGINS) + +} // namespace content + +namespace ui { + +OSExchangeData::Provider* OSExchangeData::CreateProvider() +{ + QT_NOT_USED + return 0; +} + +} + +namespace gfx { + +// Stubs for these unused functions that are stripped in case +// of a release aura build but a debug build needs the symbols. + +RenderText* RenderText::CreateInstance() +{ + QT_NOT_USED; + return 0; +} + +PlatformFont* PlatformFont::CreateDefault() +{ + QT_NOT_USED; + return 0; +} + +PlatformFont* PlatformFont::CreateFromNativeFont(NativeFont) +{ + QT_NOT_USED; + return 0; +} + +PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string&, int) +{ + QT_NOT_USED; + return 0; +} + +} // namespace gfx + +#endif // defined(USE_AURA) && !defined(USE_OZONE) + #if defined(OS_ANDROID) namespace ui { bool GrabViewSnapshot(gfx::NativeView /*view*/, std::vector<unsigned char>* /*png_representation*/, const gfx::Rect& /*snapshot_bounds*/) |