summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--src/core/api/core_api.pro32
-rw-r--r--src/core/api/dummy.cpp1
-rw-r--r--src/core/api/qtwebenginecoreglobal.h50
-rw-r--r--src/core/api/qtwebenginecoreglobal_p.h (renamed from src/core/qtwebenginecoreglobal.h)31
-rw-r--r--src/core/browser_accessibility_qt.cpp2
-rw-r--r--src/core/browser_context_qt.cpp4
-rw-r--r--src/core/chromium_overrides.cpp3
-rw-r--r--src/core/core.pro6
-rw-r--r--src/core/core_common.pri2
-rw-r--r--src/core/core_gyp_generator.pro2
-rw-r--r--src/core/core_module.pro20
-rw-r--r--src/core/gl_surface_qt.cpp2
-rw-r--r--src/core/render_widget_host_view_qt.cpp1
-rw-r--r--src/core/render_widget_host_view_qt.h1
-rw-r--r--src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp2
-rw-r--r--src/core/web_contents_view_qt.h3
-rw-r--r--src/webengine/plugin/experimental/experimental.pro2
-rw-r--r--src/webengine/plugin/plugin.pro2
-rw-r--r--src/webengine/webengine.pro6
-rw-r--r--src/webenginewidgets/webenginewidgets.pro6
-rw-r--r--sync.profile2
22 files changed, 147 insertions, 35 deletions
diff --git a/.gitignore b/.gitignore
index b66341f8f..67a9d4d04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,8 @@ src/3rdparty_upstream/ninja
src/3rdparty_upstream/chromium
src/core/Debug
src/core/Release
+src/core/api/Release
+src/core/api/Debug
src/core/core_generated.gyp
src/core/gypfiles
src/core/qmake_extras.gypi
diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro
new file mode 100644
index 000000000..829b59925
--- /dev/null
+++ b/src/core/api/core_api.pro
@@ -0,0 +1,32 @@
+TARGET = qtwebenginecoreapi
+DESTDIR = $$OUT_PWD/$$getConfigDir()
+
+TEMPLATE = lib
+
+CONFIG += staticlib c++11
+
+# Don't create .prl file for this intermediate library because
+# their contents get used when linking against them, breaking
+# "-Wl,-whole-archive -lqtwebenginecoreapi --Wl,-no-whole-archive"
+CONFIG -= create_prl
+
+# Copy this logic from qt_module.prf so that the intermediate library can be
+# created to the same rules as the final module linking in core_module.pro.
+!host_build:if(win32|mac):!macx-xcode {
+ contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
+ contains(QT_CONFIG, build_all):CONFIG += build_all
+}
+
+DEFINES += BUILDING_CHROMIUM
+
+CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir()
+INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core \
+ $$CHROMIUM_SRC_DIR
+
+linux-g++*: QMAKE_CXXFLAGS += -Wno-unused-parameter
+
+HEADERS = \
+ qtwebenginecoreglobal.h \
+ qtwebenginecoreglobal_p.h \
+
+SOURCES = dummy.cpp \
diff --git a/src/core/api/dummy.cpp b/src/core/api/dummy.cpp
new file mode 100644
index 000000000..3c2a8e265
--- /dev/null
+++ b/src/core/api/dummy.cpp
@@ -0,0 +1 @@
+// Used when we need to compile with no source code
diff --git a/src/core/api/qtwebenginecoreglobal.h b/src/core/api/qtwebenginecoreglobal.h
new file mode 100644
index 000000000..16daaab7d
--- /dev/null
+++ b/src/core/api/qtwebenginecoreglobal.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTWEBENGINECOREGLOBAL_H
+#define QTWEBENGINECOREGLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(BUILDING_CHROMIUM)
+# define QWEBENGINE_EXPORT Q_DECL_EXPORT
+#else
+# define QWEBENGINE_EXPORT Q_DECL_IMPORT
+#endif
+
+#define ASSERT_ENUMS_MATCH(A, B) Q_STATIC_ASSERT_X(static_cast<int>(A) == static_cast<int>(B), "The enum values must match");
+
+#endif // QTWEBENGINECOREGLOBAL_H
diff --git a/src/core/qtwebenginecoreglobal.h b/src/core/api/qtwebenginecoreglobal_p.h
index d09497ce8..e93ca9c2c 100644
--- a/src/core/qtwebenginecoreglobal.h
+++ b/src/core/api/qtwebenginecoreglobal_p.h
@@ -34,10 +34,21 @@
**
****************************************************************************/
-#ifndef QTWEBENGINECOREGLOBAL_H
-#define QTWEBENGINECOREGLOBAL_H
+#ifndef QTWEBENGINECOREGLOBAL_P_H
+#define QTWEBENGINECOREGLOBAL_P_H
-#include <QtCore/qglobal.h>
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qtwebenginecoreglobal.h"
#ifdef QT_WEBENGINE_LOGGING
#define QT_NOT_YET_IMPLEMENTED fprintf(stderr, "function %s not implemented! - %s:%d\n", __func__, __FILE__, __LINE__);
@@ -47,16 +58,6 @@
#define QT_NOT_USED Q_UNREACHABLE(); // This will assert in debug.
#endif
-#ifndef QT_STATIC
-# if defined(BUILDING_CHROMIUM)
-# define QWEBENGINE_EXPORT Q_DECL_EXPORT
-# else
-# define QWEBENGINE_EXPORT Q_DECL_IMPORT
-# endif
-#else
-# define QWEBENGINE_EXPORT
-#endif
-
-#define ASSERT_ENUMS_MATCH(A, B) Q_STATIC_ASSERT_X(static_cast<int>(A) == static_cast<int>(B), "The enum values must match");
+#define QWEBENGINE_PRIVATE_EXPORT QWEBENGINE_EXPORT
-#endif // QTWEBENGINECOREGLOBAL_H
+#endif // QTWEBENGINECOREGLOBAL_P_H
diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index 7cd5ac21f..5460cf65d 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -46,7 +46,7 @@
#include "ui/accessibility/ax_node_data.h"
#include "browser_accessibility_manager_qt.h"
-#include "qtwebenginecoreglobal.h"
+#include "qtwebenginecoreglobal_p.h"
#include "type_conversion.h"
using namespace blink;
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp
index 7f285b1e5..aa444ab7e 100644
--- a/src/core/browser_context_qt.cpp
+++ b/src/core/browser_context_qt.cpp
@@ -38,9 +38,9 @@
#include "browser_context_adapter.h"
#include "download_manager_delegate_qt.h"
-#include "type_conversion.h"
-#include "qtwebenginecoreglobal.h"
+#include "qtwebenginecoreglobal_p.h"
#include "resource_context_qt.h"
+#include "type_conversion.h"
#include "url_request_context_getter_qt.h"
#include "base/time/time.h"
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index 9340923df..ac8906bd1 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -37,8 +37,9 @@
#include "chromium_overrides.h"
#include "gl_context_qt.h"
-#include "qtwebenginecoreglobal.h"
+#include "qtwebenginecoreglobal_p.h"
#include "web_contents_view_qt.h"
+
#include "base/values.h"
#include "content/browser/renderer_host/pepper/pepper_truetype_font_list.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
diff --git a/src/core/core.pro b/src/core/core.pro
index cf00f39cb..7f19a48ce 100644
--- a/src/core/core.pro
+++ b/src/core/core.pro
@@ -8,12 +8,16 @@ core_gyp_generator.file = core_gyp_generator.pro
gyp_run.file = gyp_run.pro
gyp_run.depends = core_gyp_generator
+core_api.file = api/core_api.pro
+core_api.depends = gyp_run
+
# This will take the compile output of ninja, and link+deploy the final binary.
core_module.file = core_module.pro
-core_module.depends = gyp_run
+core_module.depends = core_api
SUBDIRS += core_gyp_generator \
gyp_run \
+ core_api \
core_module
!win32 {
diff --git a/src/core/core_common.pri b/src/core/core_common.pri
index cefde4302..1ea4e1862 100644
--- a/src/core/core_common.pri
+++ b/src/core/core_common.pri
@@ -6,7 +6,7 @@ QT += qml quick webchannel
QT_PRIVATE += quick-private gui-private core-private
# Make QtCreator happy.
-CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$${getChromiumSrcDir()}
+CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir()
INCLUDEPATH += $$CHROMIUM_SRC_DIR
qtHaveModule(positioning):QT += positioning
diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro
index c2eb9bff1..f9df7710b 100644
--- a/src/core/core_gyp_generator.pro
+++ b/src/core/core_gyp_generator.pro
@@ -25,7 +25,7 @@ else: DEFINES += QT_NO_EGL
RESOURCES += devtools.qrc
-INCLUDEPATH += $$PWD
+INCLUDEPATH += $$PWD $$PWD/api
SOURCES = \
access_token_store_qt.cpp \
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index df868949e..095ddc393 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -9,10 +9,26 @@ QMAKE_INFO_PLIST = Info_mac.plist
error("Could not find the linking information that gyp should have generated.")
}
-# We distribute the module binary but headers are only available in-tree.
-CONFIG += no_module_headers
load(qt_module)
+api_library_name = qtwebenginecoreapi
+api_library_path = $$OUT_PWD/api/$$getConfigDir()
+LIBS_PRIVATE += -L$$api_library_path
+CONFIG *= no_smart_library_merge
+osx {
+ LIBS_PRIVATE += -Wl,-force_load,$${api_library_path}$${QMAKE_DIR_SEP}lib$${api_library_name}.a
+} else:win32-msvc* {
+ LIBS_PRIVATE += /OPT:REF -l$$api_library_name
+} else {
+ LIBS_PRIVATE += -Wl,-whole-archive -l$$api_library_name -Wl,-no-whole-archive
+}
+
+win32-msvc* {
+ POST_TARGETDEPS += $${api_library_path}$${QMAKE_DIR_SEP}$${api_library_name}.lib
+} else {
+ POST_TARGETDEPS += $${api_library_path}$${QMAKE_DIR_SEP}lib$${api_library_name}.a
+}
+
# Using -Wl,-Bsymbolic-functions seems to confuse the dynamic linker
# and doesn't let Chromium get access to libc symbols through dlsym.
CONFIG -= bsymbolic_functions
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp
index 5a27aa98f..ca0e0350f 100644
--- a/src/core/gl_surface_qt.cpp
+++ b/src/core/gl_surface_qt.cpp
@@ -44,7 +44,7 @@
#include <QGuiApplication>
#include "gl_context_qt.h"
-#include "qtwebenginecoreglobal.h"
+#include "qtwebenginecoreglobal_p.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 572bc340c..766cd5a74 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -40,6 +40,7 @@
#include "browser_accessibility_qt.h"
#include "chromium_overrides.h"
#include "delegated_frame_node.h"
+#include "qtwebenginecoreglobal_p.h"
#include "render_widget_host_view_qt_delegate.h"
#include "type_conversion.h"
#include "web_contents_adapter.h"
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index 248c52f6e..6b44cead0 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -47,6 +47,7 @@
#include "content/common/gpu/gpu_messages.h"
#include "content/common/view_messages.h"
#include "ui/events/gesture_detection/filtered_gesture_provider.h"
+#include "qtwebenginecoreglobal_p.h"
#include <QMap>
#include <QPoint>
#include <QRect>
diff --git a/src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp b/src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp
index 1b515b156..625e89ae4 100644
--- a/src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp
+++ b/src/core/renderer/pepper/pepper_flash_browser_host_qt.cpp
@@ -52,7 +52,7 @@
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/resource_message_params.h"
#include "ppapi/shared_impl/time_conversion.h"
-#include "qtwebenginecoreglobal.h"
+#include "qtwebenginecoreglobal_p.h"
#include "url/gurl.h"
#if defined(OS_WIN)
diff --git a/src/core/web_contents_view_qt.h b/src/core/web_contents_view_qt.h
index 896955f7d..a19432fbe 100644
--- a/src/core/web_contents_view_qt.h
+++ b/src/core/web_contents_view_qt.h
@@ -43,8 +43,9 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
-#include "web_contents_adapter_client.h"
+#include "qtwebenginecoreglobal_p.h"
#include "render_widget_host_view_qt.h"
+#include "web_contents_adapter_client.h"
#include "web_contents_delegate_qt.h"
#include "web_engine_context.h"
diff --git a/src/webengine/plugin/experimental/experimental.pro b/src/webengine/plugin/experimental/experimental.pro
index 36162e359..d1b59326a 100644
--- a/src/webengine/plugin/experimental/experimental.pro
+++ b/src/webengine/plugin/experimental/experimental.pro
@@ -6,7 +6,7 @@ IMPORT_VERSION = 1.0
QT += webengine qml quick
QT_PRIVATE += webengine-private
-INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api
+INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/core/api $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api
SOURCES = plugin.cpp
diff --git a/src/webengine/plugin/plugin.pro b/src/webengine/plugin/plugin.pro
index e033b2db5..b6acc760f 100644
--- a/src/webengine/plugin/plugin.pro
+++ b/src/webengine/plugin/plugin.pro
@@ -6,7 +6,7 @@ IMPORT_VERSION = 1.2
QT += webengine qml quick
QT_PRIVATE += webengine-private
-INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api $$QTWEBENGINE_ROOT/include/QtWebEngine
+INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/core/api $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api $$QTWEBENGINE_ROOT/include/QtWebEngine
SOURCES = plugin.cpp
diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro
index 6cba9c5d9..8bb5a8e77 100644
--- a/src/webengine/webengine.pro
+++ b/src/webengine/webengine.pro
@@ -3,12 +3,12 @@ TARGET = QtWebEngine
# For our export macros
DEFINES += QT_BUILD_WEBENGINE_LIB
-QT += qml quick
-QT_PRIVATE += webenginecore quick-private gui-private core-private
+QT += qml quick webenginecore
+QT_PRIVATE += quick-private gui-private core-private
QMAKE_DOCS = $$PWD/doc/qtwebengine.qdocconf
-INCLUDEPATH += $$PWD api ../core
+INCLUDEPATH += $$PWD api ../core ../core/api
SOURCES = \
api/qquickwebenginecertificateerror.cpp \
diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro
index 1f7974bd2..0d92767c1 100644
--- a/src/webenginewidgets/webenginewidgets.pro
+++ b/src/webenginewidgets/webenginewidgets.pro
@@ -3,12 +3,12 @@ TARGET = QtWebEngineWidgets
# For our export macros
DEFINES += QT_BUILD_WEBENGINEWIDGETS_LIB
-QT += webengine widgets network quick
-QT_PRIVATE += webenginecore quick-private gui-private core-private
+QT += webengine webenginecore widgets network quick
+QT_PRIVATE += quick-private gui-private core-private
QMAKE_DOCS = $$PWD/doc/qtwebenginewidgets.qdocconf
-INCLUDEPATH += $$PWD api ../core ../webengine/api
+INCLUDEPATH += $$PWD api ../core ../core/api ../webengine/api
SOURCES = \
api/qtwebenginewidgetsglobal.cpp \
diff --git a/sync.profile b/sync.profile
index 774941d56..11d7b0548 100644
--- a/sync.profile
+++ b/sync.profile
@@ -1,10 +1,12 @@
%modules = ( # path to module name map
"QtWebEngine" => "$basedir/src/webengine",
"QtWebEngineWidgets" => "$basedir/src/webenginewidgets",
+ "QtWebEngineCore" => "$basedir/src/core",
);
%moduleheaders = ( # restrict the module headers to those found in relative path
"QtWebEngine" => "api",
"QtWebEngineWidgets" => "api",
+ "QtWebEngineCore" => "api",
);
%classnames = (
);