diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:20:33 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:28:57 +0000 |
commit | d17ea114e5ef69ad5d5d7413280a13e6428098aa (patch) | |
tree | 2c01a75df69f30d27b1432467cfe7c1467a498da /chromium/chrome/services | |
parent | 8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (diff) | |
download | qtwebengine-chromium-d17ea114e5ef69ad5d5d7413280a13e6428098aa.tar.gz |
BASELINE: Update Chromium to 67.0.3396.47
Change-Id: Idcb1341782e417561a2473eeecc82642dafda5b7
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/chrome/services')
15 files changed, 106 insertions, 41 deletions
diff --git a/chromium/chrome/services/file_util/BUILD.gn b/chromium/chrome/services/file_util/BUILD.gn index bced96ab8d2..839ec962005 100644 --- a/chromium/chrome/services/file_util/BUILD.gn +++ b/chromium/chrome/services/file_util/BUILD.gn @@ -19,6 +19,7 @@ source_set("lib") { public_deps = [ "//chrome/services/file_util/public/mojom", + "//mojo/public/mojom/base", "//services/service_manager/public/cpp", ] @@ -28,7 +29,7 @@ source_set("lib") { "zip_file_creator.h", ] - deps += [ "//components/filesystem/public/interfaces" ] + deps += [ "//components/services/filesystem/public/interfaces" ] } if (safe_browsing_mode == 1) { diff --git a/chromium/chrome/services/file_util/public/mojom/BUILD.gn b/chromium/chrome/services/file_util/public/mojom/BUILD.gn index dcc4a010ade..7bf18de2abc 100644 --- a/chromium/chrome/services/file_util/public/mojom/BUILD.gn +++ b/chromium/chrome/services/file_util/public/mojom/BUILD.gn @@ -10,15 +10,16 @@ mojom("mojom") { "constants.mojom", ] - if (is_chromeos) { - sources += [ "zip_file_creator.mojom" ] - } - if (safe_browsing_mode == 1) { sources += [ "safe_archive_analyzer.mojom" ] } public_deps = [ - "//mojo/common:common_custom_types", + "//mojo/public/mojom/base", ] + + if (is_chromeos) { + sources += [ "zip_file_creator.mojom" ] + public_deps += [ "//components/services/filesystem/public/interfaces" ] + } } diff --git a/chromium/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom b/chromium/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom index ae20a340ba4..378ee92b2e4 100644 --- a/chromium/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom +++ b/chromium/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom @@ -8,25 +8,25 @@ module chrome.mojom; -import "mojo/common/file.mojom"; -import "mojo/common/file_path.mojom"; +import "mojo/public/mojom/base/file.mojom"; +import "mojo/public/mojom/base/file_path.mojom"; interface SafeArchiveAnalyzer { // Build flag FULL_SAFE_BROWSING: Analyze the |zip_file| for malicious // download protection, given a |temporary_file| used to extract files // from the |zip_file| archive. - AnalyzeZipFile(mojo.common.mojom.File zip_file, - mojo.common.mojom.File temporary_file) + AnalyzeZipFile(mojo_base.mojom.File zip_file, + mojo_base.mojom.File temporary_file) => (SafeArchiveAnalyzerResults results); // Build flag FULL_SAFE_BROWSING, on OS_MACOSX: Analyze the |dmg_file| // for malicious download protection. - AnalyzeDmgFile(mojo.common.mojom.File dmg_file) + AnalyzeDmgFile(mojo_base.mojom.File dmg_file) => (SafeArchiveAnalyzerResults results); // Build flag FULL_SAFE_BROWSING: Analyze the |rar_file| for malicious // download protection. - AnalyzeRarFile(mojo.common.mojom.FilePath rar_file) + AnalyzeRarFile(mojo_base.mojom.FilePath rar_file) => (SafeArchiveAnalyzerResults results); }; diff --git a/chromium/chrome/services/file_util/public/mojom/zip_file_creator.mojom b/chromium/chrome/services/file_util/public/mojom/zip_file_creator.mojom index 0bf85f9d755..76aa480aff8 100644 --- a/chromium/chrome/services/file_util/public/mojom/zip_file_creator.mojom +++ b/chromium/chrome/services/file_util/public/mojom/zip_file_creator.mojom @@ -7,15 +7,15 @@ module chrome.mojom; -import "components/filesystem/public/interfaces/directory.mojom"; -import "mojo/common/file.mojom"; -import "mojo/common/file_path.mojom"; +import "components/services/filesystem/public/interfaces/directory.mojom"; +import "mojo/public/mojom/base/file.mojom"; +import "mojo/public/mojom/base/file_path.mojom"; interface ZipFileCreator { // OS_CHROMEOS: Create a |zip_file| from a list of source files. CreateZipFile(filesystem.mojom.Directory source_dir_mojo, - mojo.common.mojom.FilePath source_dir, - array<mojo.common.mojom.FilePath> source_relative_paths, - mojo.common.mojom.File zip_file) + mojo_base.mojom.FilePath source_dir, + array<mojo_base.mojom.FilePath> source_relative_paths, + mojo_base.mojom.File zip_file) => (bool success); }; diff --git a/chromium/chrome/services/media_gallery_util/BUILD.gn b/chromium/chrome/services/media_gallery_util/BUILD.gn index b0dc480b1c3..6de5b4b22a8 100644 --- a/chromium/chrome/services/media_gallery_util/BUILD.gn +++ b/chromium/chrome/services/media_gallery_util/BUILD.gn @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//media/media_options.gni") import("//services/service_manager/public/cpp/service.gni") import("//services/service_manager/public/service_manifest.gni") @@ -15,6 +16,8 @@ source_set("lib") { "media_metadata_parser.h", "media_parser.cc", "media_parser.h", + "media_parser_factory.cc", + "media_parser_factory.h", ] deps = [ @@ -27,6 +30,13 @@ source_set("lib") { "//chrome/services/media_gallery_util/public/mojom", "//services/service_manager/public/cpp", ] + + if (media_use_ffmpeg) { + deps += [ + "//third_party/ffmpeg", + "//third_party/ffmpeg:ffmpeg_features", + ] + } } service_manifest("manifest") { diff --git a/chromium/chrome/services/media_gallery_util/manifest.json b/chromium/chrome/services/media_gallery_util/manifest.json index c23b44ff79f..4d1bd24661d 100644 --- a/chromium/chrome/services/media_gallery_util/manifest.json +++ b/chromium/chrome/services/media_gallery_util/manifest.json @@ -5,7 +5,7 @@ "interface_provider_specs": { "service_manager:connector": { "provides": { - "parse_media": [ "chrome::mojom::MediaParser" ] + "parse_media": [ "chrome::mojom::MediaParserFactory" ] }, "requires": { "service_manager": [ "service_manager:all_users" ] diff --git a/chromium/chrome/services/media_gallery_util/public/cpp/BUILD.gn b/chromium/chrome/services/media_gallery_util/public/cpp/BUILD.gn index 55a2302132e..fcdc1906851 100644 --- a/chromium/chrome/services/media_gallery_util/public/cpp/BUILD.gn +++ b/chromium/chrome/services/media_gallery_util/public/cpp/BUILD.gn @@ -2,8 +2,12 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//media/media_options.gni") + source_set("cpp") { sources = [ + "media_parser_provider.cc", + "media_parser_provider.h", "safe_audio_video_checker.cc", "safe_audio_video_checker.h", "safe_media_metadata_parser.cc", @@ -13,9 +17,39 @@ source_set("cpp") { deps = [ "//services/service_manager/public/cpp", "//third_party/boringssl", + "//third_party/libyuv", ] public_deps = [ "//chrome/services/media_gallery_util/public/mojom", ] + + if (media_use_ffmpeg) { + deps += [ + "//third_party/ffmpeg", + "//third_party/ffmpeg:ffmpeg_features", + ] + } +} + +source_set("browser_tests") { + testonly = true + + sources = [ + "media_gallery_util_browsertest.cc", + ] + defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] + + deps = [ + "//base", + "//chrome/test:test_support", + "//testing/gtest", + ] + + if (media_use_ffmpeg) { + deps += [ + "//third_party/ffmpeg", + "//third_party/ffmpeg:ffmpeg_features", + ] + } } diff --git a/chromium/chrome/services/media_gallery_util/public/mojom/BUILD.gn b/chromium/chrome/services/media_gallery_util/public/mojom/BUILD.gn index af6fcf39af3..2bc6cbc85f1 100644 --- a/chromium/chrome/services/media_gallery_util/public/mojom/BUILD.gn +++ b/chromium/chrome/services/media_gallery_util/public/mojom/BUILD.gn @@ -12,5 +12,6 @@ mojom("mojom") { public_deps = [ "//mojo/common:common_custom_types", + "//mojo/public/mojom/base", ] } diff --git a/chromium/chrome/services/media_gallery_util/public/mojom/media_parser.mojom b/chromium/chrome/services/media_gallery_util/public/mojom/media_parser.mojom index 14a345541ec..05383514375 100644 --- a/chromium/chrome/services/media_gallery_util/public/mojom/media_parser.mojom +++ b/chromium/chrome/services/media_gallery_util/public/mojom/media_parser.mojom @@ -4,9 +4,9 @@ module chrome.mojom; -import "mojo/common/file.mojom"; -import "mojo/common/time.mojom"; import "mojo/common/values.mojom"; +import "mojo/public/mojom/base/file.mojom"; +import "mojo/public/mojom/base/time.mojom"; interface MediaParser { // Extracts metadata from a |mime_type| blob of data of |total_size| and @@ -26,9 +26,24 @@ interface MediaParser { // |file| appears to be a well-formed media file, false otherwise. // Note: it is still not safe to decode the file in the calling process after // this check. - CheckMediaFile(mojo.common.mojom.TimeDelta decode_time, - mojo.common.mojom.File file) + CheckMediaFile(mojo_base.mojom.TimeDelta decode_time, + mojo_base.mojom.File file) => (bool success); + + // Used by tests to validate the right CPU information is set on third-party + // libraries. + GetCpuInfo() => (int64 libyuv_cpu_flags, int64 ffmpeg_cpu_flags); +}; + +interface MediaParserFactory { + // Creates a MediaParser. |libyuv_cpuf_lags| are the flags returned by + // libyuv::InitCpuFlags() from third-party/libyuv and |libavutil_cpu_flags| + // the flags returned by av_get_cpu_flags() from FFmpeg. These flags have to + // be passed in as retrieving them may require file access (to /proc/cpuinfo + // for instance) and the media parser may be run in a sandboxed process with + // no such access. + CreateMediaParser(int64 libyuv_cpu_flags, int64 libavutil_cpu_flags) + => (MediaParser media_parser); }; interface MediaDataSource { diff --git a/chromium/chrome/services/printing/public/mojom/BUILD.gn b/chromium/chrome/services/printing/public/mojom/BUILD.gn index 024fb418bd4..7b3f10545d6 100644 --- a/chromium/chrome/services/printing/public/mojom/BUILD.gn +++ b/chromium/chrome/services/printing/public/mojom/BUILD.gn @@ -11,12 +11,13 @@ mojom("mojom") { "pdf_to_pwg_raster_converter.mojom", ] - if (is_win) { - sources += [ "pdf_to_emf_converter.mojom" ] - } - deps = [ "//mojo/common:common_custom_types", "//ui/gfx/geometry/mojo", ] + + if (is_win) { + sources += [ "pdf_to_emf_converter.mojom" ] + deps += [ "//mojo/public/mojom/base" ] + } } diff --git a/chromium/chrome/services/printing/public/mojom/pdf_render_settings.mojom b/chromium/chrome/services/printing/public/mojom/pdf_render_settings.mojom index 4ffc7b69ad4..b74b5bb7b4b 100644 --- a/chromium/chrome/services/printing/public/mojom/pdf_render_settings.mojom +++ b/chromium/chrome/services/printing/public/mojom/pdf_render_settings.mojom @@ -24,5 +24,6 @@ struct PdfRenderSettings { gfx.mojom.Point offsets; gfx.mojom.Size dpi; bool autorotate; + bool use_color; Mode mode; }; diff --git a/chromium/chrome/services/removable_storage_writer/public/mojom/BUILD.gn b/chromium/chrome/services/removable_storage_writer/public/mojom/BUILD.gn index 37876d75780..15c70475a4f 100644 --- a/chromium/chrome/services/removable_storage_writer/public/mojom/BUILD.gn +++ b/chromium/chrome/services/removable_storage_writer/public/mojom/BUILD.gn @@ -11,6 +11,6 @@ mojom("mojom") { ] public_deps = [ - "//mojo/common:common_custom_types", + "//mojo/public/mojom/base", ] } diff --git a/chromium/chrome/services/removable_storage_writer/public/mojom/removable_storage_writer.mojom b/chromium/chrome/services/removable_storage_writer/public/mojom/removable_storage_writer.mojom index 275fa3ae078..a031d274756 100644 --- a/chromium/chrome/services/removable_storage_writer/public/mojom/removable_storage_writer.mojom +++ b/chromium/chrome/services/removable_storage_writer/public/mojom/removable_storage_writer.mojom @@ -4,22 +4,22 @@ module chrome.mojom; -import "mojo/common/file_path.mojom"; +import "mojo/public/mojom/base/file_path.mojom"; interface RemovableStorageWriter { const string kTestDevice = "chrome://test-removable-storage-writer"; // Writes the content of the source file to the target. The target file is // restricted to removable drives by the utility process. - Write(mojo.common.mojom.FilePath source, - mojo.common.mojom.FilePath target, + Write(mojo_base.mojom.FilePath source, + mojo_base.mojom.FilePath target, RemovableStorageWriterClient client); // Verifies that the contents of the source file was written to the target // file. Again, the target is restricted to removable drives by the utility // process. - Verify(mojo.common.mojom.FilePath source, - mojo.common.mojom.FilePath target, + Verify(mojo_base.mojom.FilePath source, + mojo_base.mojom.FilePath target, RemovableStorageWriterClient client); }; diff --git a/chromium/chrome/services/util_win/public/mojom/BUILD.gn b/chromium/chrome/services/util_win/public/mojom/BUILD.gn index c8f6b396aa1..e6fdab9888c 100644 --- a/chromium/chrome/services/util_win/public/mojom/BUILD.gn +++ b/chromium/chrome/services/util_win/public/mojom/BUILD.gn @@ -12,6 +12,7 @@ mojom("mojom") { public_deps = [ ":constants", "//mojo/common:common_custom_types", + "//mojo/public/mojom/base", ] } diff --git a/chromium/chrome/services/util_win/public/mojom/shell_util_win.mojom b/chromium/chrome/services/util_win/public/mojom/shell_util_win.mojom index 890bb9918fc..f402e64097a 100644 --- a/chromium/chrome/services/util_win/public/mojom/shell_util_win.mojom +++ b/chromium/chrome/services/util_win/public/mojom/shell_util_win.mojom @@ -7,7 +7,7 @@ module chrome.mojom; -import "mojo/common/file_path.mojom"; +import "mojo/public/mojom/base/file_path.mojom"; import "mojo/public/mojom/base/string16.mojom"; interface ShellUtilWin { @@ -27,10 +27,10 @@ interface ShellUtilWin { CallGetOpenFileName(uint32 owner, uint32 flags, FileExtensionFilters filters, - mojo.common.mojom.FilePath initial_directory, - mojo.common.mojom.FilePath initial_filename) => - (mojo.common.mojom.FilePath directory, - array<mojo.common.mojom.FilePath> files); + mojo_base.mojom.FilePath initial_directory, + mojo_base.mojom.FilePath initial_filename) => + (mojo_base.mojom.FilePath directory, + array<mojo_base.mojom.FilePath> files); // Calls OS_WIN ::GetSaveFileName() with parameters: // |owner| HWND to use as the parent of the modal dialog. @@ -49,10 +49,10 @@ interface ShellUtilWin { uint32 flags, FileExtensionFilters filters, uint32 one_based_filter_index, - mojo.common.mojom.FilePath initial_directory, - mojo.common.mojom.FilePath suggested_filename, + mojo_base.mojom.FilePath initial_directory, + mojo_base.mojom.FilePath suggested_filename, mojo_base.mojom.String16 default_extension) => - (mojo.common.mojom.FilePath path, + (mojo_base.mojom.FilePath path, uint32 filter_index); }; |