Commit c373b6ca authored by Jocelyn Turcotte's avatar Jocelyn Turcotte
Browse files

Fix undefined symbols in debug builds.

process uses the same code as lib and decides at runtime which
code to run. Fix the debug build by making sure that all infrastructure
code is available in both process and lib by building common code
not shared directly through chromium sources in a separate static lib.
Showing with 24 additions and 22 deletions
......@@ -4,6 +4,7 @@
'target_name': 'blinq',
'type': 'none',
'dependencies': [
'shared/shared.gyp:*',
'process/process.gyp:*',
'lib/lib.gyp:*',
],
......
......@@ -32,6 +32,7 @@
'<(chromium_src_dir)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit_test_support',
],
'include_dirs': [
'<(qtwebengine_src_dir)',
'<(chromium_src_dir)',
],
'msvs_settings': {
......
......@@ -2,9 +2,10 @@ TEMPLATE = subdirs
CONFIG += ordered
# The first two subdirs contain dummy .pro files that are used by qmake
# The first three subdirs contain dummy .pro files that are used by qmake
# to generate a corresponding .gyp file
SUBDIRS = lib \
SUBDIRS = shared \
lib \
process \
build \ # This is where we use the generated qt_generated.gypi and run gyp
example \
......
......@@ -2,6 +2,7 @@
'target_defaults': {
# patterns used to exclude chromium files from the build when we have a drop-in replacement
'sources/': [
['exclude', 'browser/renderer_host/gtk_im_context_wrapper\\.cc$'],
['exclude', 'browser/renderer_host/render_widget_host_view_gtk\\.(cc|h)$'],
['exclude', 'browser/renderer_host/render_widget_host_view_mac.*\\.(mm|h)$'],
['exclude', 'browser/renderer_host/render_widget_host_view_win.*\\.(cc|h)$'],
......
......@@ -5,6 +5,7 @@ import os
import subprocess
import sys
qtwebengine_src = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
chrome_src = os.path.abspath(os.environ.get('CHROMIUM_SRC_DIR')) # null-checked in build.pro
script_dir = os.path.abspath(os.path.join(chrome_src, 'build'))
if not os.path.isdir(script_dir):
......@@ -104,6 +105,7 @@ if __name__ == '__main__':
args.extend(["--toplevel-dir=" + toplevel])
# Chromium specific Hack: for Chromium to build, the depth has to be set to the chromium src dir.
args.extend(["--depth=" + chrome_src])
args.extend(['-D', 'qtwebengine_src_dir=' + qtwebengine_src])
args.extend(['-D', 'chromium_src_dir=' + chrome_src])
# Tweak the output location and format (hardcode ninja for now)
args.extend(['--generator-output', os.path.abspath(get_output_dir())])
......
......@@ -50,6 +50,11 @@ for (lib, LIBS): GYPI_CONTENTS += " '$$lib',"
GYPI_CONTENTS += " ],"
!isEmpty(GYPDEPENDENCIES) {
GYPI_CONTENTS += " 'dependencies': ["
for (dep, GYPDEPENDENCIES): GYPI_CONTENTS += " '$$dep',"
GYPI_CONTENTS += " ],"
}
!isEmpty(DEFINES) {
GYPI_CONTENTS += " 'defines': ["
for (define, DEFINES): GYPI_CONTENTS += " '$$define',"
......
......@@ -57,7 +57,6 @@
#include "webkit/common/user_agent/user_agent_util.h"
#include "content_browser_client_qt.h"
#include "web_contents_view_qt.h"
#include "qquickwebcontentsview.h"
namespace {
......
......@@ -14,7 +14,6 @@
#include "net/base/net_util.h"
#include "browser_context_qt.h"
#include "web_contents_view_qt.h"
#include "web_contents_delegate_qt.h"
static GURL GetStartupURL() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
......
......@@ -27,14 +27,13 @@ public:
virtual content::WebContentsViewPort* OverrideCreateWebContentsView(content::WebContents* , content::RenderViewHostDelegateView**) /*Q_DECL_OVERRIDE*/;
virtual content::BrowserMainParts* CreateBrowserMainParts(const content::MainFunctionParams& parameters) /*Q_DECL_OVERRIDE*/;
content::ShellBrowserContext *browser_context();
net::URLRequestContextGetter *CreateRequestContext(content::BrowserContext *content_browser_context, content::ProtocolHandlerMap *protocol_handlers);
private:
BrowserContextQt* m_browser_context;
BrowserMainPartsQt* m_browserMainParts;
BrowserMainPartsQt* m_browserMainParts;
};
#endif // CONTENT_BROWSER_CLIENT_QT
......@@ -2,6 +2,7 @@
# We want the gyp generation step to happen after all the other config steps. For that we need to prepend
# our gyp_generator.prf feature to the CONFIG variable since it is processed backwards
CONFIG = gyp_generator $$CONFIG
GYPDEPENDENCIES += ../shared/shared.gyp:blinq_shared
TEMPLATE = lib
......@@ -16,31 +17,21 @@ PER_CONFIG_DEFINES = BLINQ_PROCESS_PATH=\\\"$$getOutDir()/%config/$$BLINQ_PROCES
# Keep Skia happy
CONFIG(release, debug|release): DEFINES += NDEBUG
QT += gui-private widgets qml quick
QT += widgets quick
SOURCES = \
backing_store_qt.cpp \
blinqapplication.cpp \
content_browser_client_qt.cpp \
qquickwebcontentsview.cpp \
qwebcontentsview.cpp \
render_widget_host_view_qt.cpp \
resource_context_qt.cpp \
web_event_factory.cpp \
native_view_qt.cpp \
web_contents_delegate_qt.cpp
HEADERS = \
backing_store_qt.h \
blinqapplication.h \
browser_context_qt.h \
content_browser_client_qt.h \
native_view_container_qt.h \
native_view_qt.h \
qquickwebcontentsview.h \
qwebcontentsview.h \
render_widget_host_view_qt.h \
resource_context_qt.h \
web_event_factory.h \
web_contents_delegate_qt.h
......@@ -2,6 +2,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/navigation_controller.h"
#include "web_contents_view_qt.h"
#include "qwebcontentsview.h"
#include "qquickwebcontentsview.h"
......
......@@ -47,8 +47,9 @@
#include "content/public/browser/render_widget_host.h"
#include "content/port/browser/render_view_host_delegate_view.h"
#include "content/port/browser/web_contents_view_port.h"
#include "render_widget_host_view_qt.h"
#include "native_view_container_qt.h"
#include "shared/render_widget_host_view_qt.h"
#include "shared/native_view_container_qt.h"
class WebContentsViewQt
: public content::WebContentsViewPort
......@@ -66,7 +67,7 @@ public:
return view;
}
virtual void CreateView(const gfx::Size& initial_size, gfx::NativeView context) { QT_NOT_YET_IMPLEMENTED }
virtual content::RenderWidgetHostView* CreateViewForPopupWidget(content::RenderWidgetHost* render_widget_host) { return 0; }
......
......@@ -2,10 +2,11 @@
# We want the gyp generation step to happen after all the other config steps. For that we need to prepend
# our gyp_generator.prf feature to the CONFIG variable since it is processed backwards
CONFIG = gyp_generator $$CONFIG
GYPDEPENDENCIES += ../shared/shared.gyp:blinq_shared
TARGET = $$BLINQ_PROCESS_NAME
TEMPLATE = app
QT -= gui core
QT += widgets quick
SOURCES = main.cpp
File moved
File moved
File moved
File moved
File moved
File moved
File moved
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment