summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2019-01-22 18:03:00 +0100
committerMichael BrĂ¼ning <michael.bruning@qt.io>2019-02-01 10:26:00 +0000
commite3968360b4f1b7b0603b97d50244b18c92207f21 (patch)
treed326be003ca43991bacc8685a07a051f4e46c898 /tools
parent3bff0bae7e0c660fc25c5c46dedaf9cb89563a58 (diff)
Add extension system and PDF viewer to Qt WebEngine
Adds the Chromium extensiuon system to Qt WebEngine. Currently, it only exposes internal APIs to the internal PDF viewer extension. To load a PDF, simply navigate to it. This feature can be configured via the webengine-extensions flag and is turned on by default. Needs patch in Chromium 71-based to build. Adaptations to 71-based from 69-based include: * Flag out update installation, add crx file dependency * Move PostTask over to 71-based implementation * Move extensions API providers to 71-based implementaion * Don't use custom guest view and mime handler view delegates * Adapt the URLRequestResourceBundleJob to match new interface * Move extension system initialization to end of profile constructor Change-Id: I4fa5149057291bb5847f048534c11820cd7ff58c Fixes: QTBUG-50556 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildscripts/repack_locales.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/buildscripts/repack_locales.py b/tools/buildscripts/repack_locales.py
index 103fdaf69..8f1ae190b 100755
--- a/tools/buildscripts/repack_locales.py
+++ b/tools/buildscripts/repack_locales.py
@@ -56,6 +56,8 @@ INT_DIR = None
# The target platform. If it is not defined, sys.platform will be used.
OS = None
+ENABLE_EXTENSIONS = False
+
# Extra input files.
EXTRA_INPUT_FILES = []
@@ -109,6 +111,14 @@ def calc_inputs(locale):
inputs.append(os.path.join(SHARE_INT_DIR, 'chrome',
'chromium_strings_%s.pak' % locale))
+ if ENABLE_EXTENSIONS:
+ # For example:
+ # '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_da.pak
+ # TODO(jamescook): When Android stops building extensions code move this
+ # to the OS != 'ios' and OS != 'android' section below.
+ inputs.append(os.path.join(SHARE_INT_DIR, 'extensions', 'strings',
+ 'extensions_strings_%s.pak' % locale))
+
# Add any extra input files.
for extra_file in EXTRA_INPUT_FILES:
inputs.append('%s_%s.pak' % (extra_file, locale))
@@ -158,6 +168,7 @@ def DoMain(argv):
global INT_DIR
global OS
global EXTRA_INPUT_FILES
+ global ENABLE_EXTENSIONS
parser = optparse.OptionParser("usage: %prog [options] locales")
parser.add_option("-i", action="store_true", dest="inputs", default=False,
@@ -177,6 +188,9 @@ def DoMain(argv):
locale suffix and \".pak\" extension.")
parser.add_option("-p", action="store", dest="os",
help="The target OS. (e.g. mac, linux, win, etc.)")
+ parser.add_option("--enable-extensions", action="store",
+ dest="enable_extensions",
+ help="Whether to include strings for extensions")
options, locales = parser.parse_args(argv)
if not locales:
@@ -188,6 +202,7 @@ def DoMain(argv):
SHARE_INT_DIR = options.share_int_dir
EXTRA_INPUT_FILES = options.extra_input
OS = options.os
+ ENABLE_EXTENSIONS = options.enable_extensions == '1'
if not OS:
if sys.platform == 'darwin':