summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/chromium_overrides.cpp23
-rw-r--r--src/core/content_browser_client_qt.cpp6
-rw-r--r--src/core/gyp_run.pro6
-rw-r--r--src/core/qtwebengine.gypi28
-rw-r--r--src/core/qtwebengine_extras.gypi1
5 files changed, 59 insertions, 5 deletions
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index 383fc6587..be97bc089 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -41,7 +41,6 @@
#include "chromium_overrides.h"
-#include "base/message_loop/message_pump_gtk.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include <QGuiApplication>
@@ -49,7 +48,12 @@
#include <QWindow>
#include <qpa/qplatformnativeinterface.h>
+#if defined(OS_ANDROID)
+#include "media/video/capture/fake_video_capture_device.h"
+#endif
+
#if defined(USE_X11)
+#include "base/message_loop/message_pump_gtk.h"
#include <X11/Xlib.h>
#endif
@@ -113,3 +117,20 @@ void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebKit::WebScreenInfo* resul
}
}
+
+#if defined(OS_ANDROID)
+namespace ui {
+bool GrabViewSnapshot(gfx::NativeView /*view*/, std::vector<unsigned char>* /*png_representation*/, const gfx::Rect& /*snapshot_bounds*/)
+{
+ NOTIMPLEMENTED();
+ return false;
+}
+}
+
+namespace media {
+const std::string FakeVideoCaptureDevice::Name::GetModel() const
+{
+ return "";
+}
+}
+#endif
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 24b478268..8adad10f0 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -213,9 +213,13 @@ public:
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("cglcontextobj"), qtContext);
else if (platform == QStringLiteral("qnx"))
m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext);
- else
+ else if (platform == QStringLiteral("eglfs"))
+ m_handle = pni->nativeResourceForContext(QByteArrayLiteral("eglcontext"), qtContext);
+ else {
+ qFatal("%s platform not yet supported", platform.toLatin1().constData());
// Add missing platforms once they work.
Q_UNREACHABLE();
+ }
}
virtual void* GetHandle() Q_DECL_OVERRIDE { return m_handle; }
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 44e353e8b..2cc13b7ea 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -9,13 +9,13 @@ cross_compile {
GYP_ARGS = "-D qt_cross_compile=1 -D os_posix=1"
TOOLCHAIN_SYSROOT = $$[QT_SYSROOT]
- linux-android {
+ android {
CC = $$which($$QMAKE_CC)
ANDROID_TOOLCHAIN = $$dirname(CC)
TOOLCHAIN_SYSROOT = $$ANDROID_BUILD_TOP
- GYP_ARGS += "-D android_src=\"$${ANDROID_BUILD_TOP}\" -D android_toolchain=\"$${ANDROID_TOOLCHAIN}\"" \
- "-D android_ndk_root=\"$${ANDROID_BUILD_TOP}\" -D android_product_out=\"$${ANDROID_PRODUCT_OUT}\""
+ GYP_ARGS += "-D qt_os=\"android\" -D android_src=\"$${TOOLCHAIN_SYSROOT}\" -D android_toolchain=\"$${ANDROID_TOOLCHAIN}\"" \
+ "-D android_ndk_root=\"$${TOOLCHAIN_SYSROOT}\" -D android_product_out=\"$${ANDROID_PRODUCT_OUT}\""
}
!isEmpty(TOOLCHAIN_SYSROOT): GYP_ARGS += "-D sysroot=\"$${TOOLCHAIN_SYSROOT}\""
diff --git a/src/core/qtwebengine.gypi b/src/core/qtwebengine.gypi
index 394f087fc..d1415f3f6 100644
--- a/src/core/qtwebengine.gypi
+++ b/src/core/qtwebengine.gypi
@@ -55,6 +55,34 @@
'<(chromium_src_dir)/base/allocator/allocator.gyp:allocator',
],
}],
+ ['_toolset=="target" and qt_os=="android"', {
+ 'configurations': {
+ 'Debug_Base': {
+ # Reduce the binary size.
+ 'variables': {
+ 'debug_optimize%': 's',
+ },
+ 'ldflags': [
+ # Only link with needed input sections.
+ '-Wl,--gc-sections',
+ # Warn in case of text relocations.
+ '-Wl,--warn-shared-textrel',
+ '-Wl,-O1',
+ '-Wl,--as-needed',
+ ],
+ 'cflags': [
+ '-fomit-frame-pointer',
+ '-fdata-sections',
+ '-ffunction-sections',
+ ],
+ },
+ },
+ 'dependencies': [
+ '<(chromium_src_dir)/third_party/ashmem/ashmem.gyp:ashmem',
+ '<(chromium_src_dir)/third_party/freetype/freetype.gyp:ft2',
+ '<(chromium_src_dir)/third_party/android_tools/ndk/android_tools_ndk.gyp:cpu_features',
+ ],
+ }],
['OS=="win"', {
'resource_include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/webkit',
diff --git a/src/core/qtwebengine_extras.gypi b/src/core/qtwebengine_extras.gypi
index f4d3e38b7..7eefe2062 100644
--- a/src/core/qtwebengine_extras.gypi
+++ b/src/core/qtwebengine_extras.gypi
@@ -1,6 +1,7 @@
{
'variables': {
'werror%': '',
+ 'qt_os%': '',
},
'target_defaults': {
# patterns used to exclude chromium files from the build when we have a drop-in replacement