diff --git a/lib/browser_context_qt.h b/lib/browser_context_qt.h
index 88bba1e9e0a3c70d0042410092a215fb1da5bf0a..382b08ff356a8c622a7e32ce7dd3f112449b579d 100644
--- a/lib/browser_context_qt.h
+++ b/lib/browser_context_qt.h
@@ -46,8 +46,6 @@
 
 #include "base/files/scoped_temp_dir.h"
 
-#include "shared/shared_globals.h"
-
 #include "base/time/time.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/content_browser_client.h"
@@ -65,6 +63,7 @@
 #include <QStringBuilder>
 
 #include "download_manager_delegate_qt.h"
+#include "qtwebenginecoreglobal.h"
 #include "resource_context_qt.h"
 #include "type_conversion.h"
 #include "url_request_context_getter_qt.h"
diff --git a/shared/shared_globals.cpp b/lib/chromium_overrides.cpp
similarity index 99%
rename from shared/shared_globals.cpp
rename to lib/chromium_overrides.cpp
index 3d20ad45d6b40c21528b298babddec3eedff77a0..383fc65875ae2bd60cfa4f15740da75cff080acf 100644
--- a/shared/shared_globals.cpp
+++ b/lib/chromium_overrides.cpp
@@ -39,7 +39,7 @@
 **
 ****************************************************************************/
 
-#include "shared_globals.h"
+#include "chromium_overrides.h"
 
 #include "base/message_loop/message_pump_gtk.h"
 #include "content/browser/renderer_host/render_widget_host_view_base.h"
diff --git a/shared/shared_globals.h b/lib/chromium_overrides.h
similarity index 82%
rename from shared/shared_globals.h
rename to lib/chromium_overrides.h
index 6ad97e181feba0051287de2182b597df4e6c178d..cda4d7e66764a38097ffd34ada5dbce92447bdb3 100644
--- a/shared/shared_globals.h
+++ b/lib/chromium_overrides.h
@@ -39,20 +39,12 @@
 **
 ****************************************************************************/
 
-#ifndef SHARED_GLOBALS_H
-#define SHARED_GLOBALS_H
+#ifndef CHROMIUM_OVERRIDES_H
+#define CHROMIUM_OVERRIDES_H
 
 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
 #include <QtGlobal>
 
-#ifdef QT_WEBENGINE_LOGGING
-#define QT_NOT_YET_IMPLEMENTED fprintf(stderr, "function %s not implemented! - %s:%d\n", __func__, __FILE__, __LINE__);
-#define QT_NOT_USED fprintf(stderr, "# function %s should not be used! - %s:%d\n", __func__, __FILE__, __LINE__); Q_UNREACHABLE();
-#else
-#define QT_NOT_YET_IMPLEMENTED qt_noop();
-#define QT_NOT_USED Q_UNREACHABLE(); // This will assert in debug.
-#endif
-
 QT_BEGIN_NAMESPACE
 class QWindow;
 QT_END_NAMESPACE
diff --git a/lib/download_manager_delegate_qt.cpp b/lib/download_manager_delegate_qt.cpp
index 633d203aecff96edd79b680bf7cc35de421b4fef..27b61b1c9f9b64df67d4ef86eec379df841ca4b3 100644
--- a/lib/download_manager_delegate_qt.cpp
+++ b/lib/download_manager_delegate_qt.cpp
@@ -44,7 +44,6 @@
 #include "content/public/browser/download_item.h"
 #include "content/public/browser/save_page_type.h"
 #include "content/public/browser/web_contents.h"
-#include "shared/shared_globals.h"
 
 #include <QDir>
 #include <QFile>
@@ -53,6 +52,7 @@
 #include <QStandardPaths>
 
 #include "type_conversion.h"
+#include "qtwebenginecoreglobal.h"
 
 // Helper class to track currently ongoing downloads to prevent file name
 // clashes / overwriting of files.
diff --git a/lib/lib.pro b/lib/lib.pro
index 9e51b3c587ac5586646ce415d85b671275212352..c1266626b7178bfc95a911b3974d69c92f71d4d9 100644
--- a/lib/lib.pro
+++ b/lib/lib.pro
@@ -2,7 +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:qtwebengine_shared <(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources
+GYPDEPENDENCIES += <(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources
 GYPINCLUDES += ../qtwebengine.gypi
 
 TEMPLATE = lib
@@ -40,6 +40,7 @@ INCLUDEPATH += $$[QT_INSTALL_HEADERS]
 
 SOURCES = \
         backing_store_qt.cpp \
+        chromium_overrides.cpp \
         content_client_qt.cpp \
         content_browser_client_qt.cpp \
         delegated_frame_node.cpp \
@@ -49,6 +50,7 @@ SOURCES = \
         javascript_dialog_manager_qt.cpp \
         process_main.cpp \
         render_widget_host_view_qt.cpp \
+        resource_bundle_qt.cpp \
         resource_context_qt.cpp \
         url_request_context_getter_qt.cpp \
         web_contents_adapter.cpp \
@@ -61,6 +63,7 @@ SOURCES = \
 HEADERS = \
         backing_store_qt.h \
         browser_context_qt.h \
+        chromium_overrides.h \
         content_client_qt.h \
         content_browser_client_qt.h \
         delegated_frame_node.h \
diff --git a/lib/qtwebenginecoreglobal.h b/lib/qtwebenginecoreglobal.h
index 3ad62b4b953fad9785eff3a4f4cf811f9517c584..b84c321d0f1516a8525ef78e0269091a3d4edea4 100644
--- a/lib/qtwebenginecoreglobal.h
+++ b/lib/qtwebenginecoreglobal.h
@@ -43,6 +43,14 @@
 
 #include <QtCore/qglobal.h>
 
+#ifdef QT_WEBENGINE_LOGGING
+#define QT_NOT_YET_IMPLEMENTED fprintf(stderr, "function %s not implemented! - %s:%d\n", __func__, __FILE__, __LINE__);
+#define QT_NOT_USED fprintf(stderr, "# function %s should not be used! - %s:%d\n", __func__, __FILE__, __LINE__); Q_UNREACHABLE();
+#else
+#define QT_NOT_YET_IMPLEMENTED qt_noop();
+#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
diff --git a/lib/render_widget_host_view_qt.cpp b/lib/render_widget_host_view_qt.cpp
index 84192bef069f5c97ad5a62052d42997754372462..91e9ab58563bc2a445a384549ab818d9b5646f39 100644
--- a/lib/render_widget_host_view_qt.cpp
+++ b/lib/render_widget_host_view_qt.cpp
@@ -42,13 +42,12 @@
 #include "render_widget_host_view_qt.h"
 
 #include "backing_store_qt.h"
+#include "chromium_overrides.h"
 #include "delegated_frame_node.h"
 #include "render_widget_host_view_qt_delegate.h"
 #include "type_conversion.h"
 #include "web_event_factory.h"
 
-#include "shared/shared_globals.h"
-
 #include "cc/output/compositor_frame_ack.h"
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/renderer_host/ui_events_helper.h"
diff --git a/lib/render_widget_host_view_qt.h b/lib/render_widget_host_view_qt.h
index bf29938c6dd7f62f1d003da8c300da064e55c3d7..c6ca936578453ec2778f6062e92bd78154aff9ac 100644
--- a/lib/render_widget_host_view_qt.h
+++ b/lib/render_widget_host_view_qt.h
@@ -43,7 +43,6 @@
 #define RENDER_WIDGET_HOST_VIEW_QT_H
 
 #include "render_widget_host_view_qt_delegate.h"
-#include "shared/shared_globals.h"
 
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
diff --git a/shared/resource_bundle_qt.cpp b/lib/resource_bundle_qt.cpp
similarity index 100%
rename from shared/resource_bundle_qt.cpp
rename to lib/resource_bundle_qt.cpp
diff --git a/lib/web_engine_context.cpp b/lib/web_engine_context.cpp
index fe557b86c9b3a61d9efc6792bfaf59aa71379b6a..e260272079d348bf51ce67e758230e3f0cf403f3 100644
--- a/lib/web_engine_context.cpp
+++ b/lib/web_engine_context.cpp
@@ -41,7 +41,6 @@
 
 #include "web_engine_context.h"
 
-#include "shared/shared_globals.h"
 #include <math.h>
 
 #include "base/command_line.h"
diff --git a/qtwebengine.gyp b/qtwebengine.gyp
index f7cabf26a38dd790892b26c5c36a51d9131ee9f0..0ddf816daf5eb1230fb48dd980c9b111c73d9298 100644
--- a/qtwebengine.gyp
+++ b/qtwebengine.gyp
@@ -4,7 +4,6 @@
     'target_name': 'qtwebengine',
     'type': 'none',
     'dependencies': [
-      'shared/shared.gyp:*',
       'lib/lib.gyp:*',
     ],
   }
diff --git a/qtwebengine.pro b/qtwebengine.pro
index 8604551a0d3a8f7534f7f8a04ea299da0b6a4a0b..bc01515369ce9981c9ea58ce629314c05896adbc 100644
--- a/qtwebengine.pro
+++ b/qtwebengine.pro
@@ -7,7 +7,6 @@ TEMPLATE = subdirs
 qmake_extras.subdir = build/qmake_extras
 
 # Phony pro files that generate gyp files. Will be built by ninja.
-shared.depends = qmake_extras
 lib.depends = qmake_extras
 
 # API libraries
@@ -29,11 +28,10 @@ sub_examples.depends = quick_plugin_lib quick_experimental_plugin_lib
 sub_tests.depends = quick_plugin_lib quick_experimental_plugin_lib
 
 # This is where we use the generated gypi files and run gyp_qtwebengine
-build.depends = resources shared lib
+build.depends = resources lib
 
 SUBDIRS += qmake_extras \
           resources \
-          shared \
           lib \
           process \
           build \
diff --git a/shared/shared.pro b/shared/shared.pro
deleted file mode 100644
index 6c35063a8a516fcc8ab6c8dba673a76baf91f10a..0000000000000000000000000000000000000000
--- a/shared/shared.pro
+++ /dev/null
@@ -1,33 +0,0 @@
-# This is a dummy .pro file used to extract some aspects of the used configuration and feed them to gyp
-# 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
-GYPINCLUDES += ../qtwebengine.gypi
-
-TEMPLATE = lib
-CONFIG += static
-
-TARGET = qtwebengine_shared
-
-# Defining keywords such as 'signal' clashes with the chromium code base.
-DEFINES += QT_NO_KEYWORDS \
-           Q_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS
-
-# something fishy with qmake in 5.2 ?
-INCLUDEPATH += $$[QT_INSTALL_HEADERS]
-
-# We need a way to tap into gyp´s Debug vs. Release configuration
-PER_CONFIG_DEFINES = QTWEBENGINEPROCESS_PATH=\\\"$$getOutDir()/%config/$$QTWEBENGINEPROCESS_NAME\\\"
-
-# Keep Skia happy
-CONFIG(release, debug|release): DEFINES += NDEBUG
-
-QT += gui
-QT_PRIVATE += gui-private
-
-SOURCES = \
-        resource_bundle_qt.cpp \
-        shared_globals.cpp
-
-HEADERS = \
-        shared_globals.h