summaryrefslogtreecommitdiff
path: root/chromium/content/public/common
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/public/common')
-rw-r--r--chromium/content/public/common/BUILD.gn53
-rw-r--r--chromium/content/public/common/browser_side_navigation_policy.cc15
-rw-r--r--chromium/content/public/common/browser_side_navigation_policy.h2
-rw-r--r--chromium/content/public/common/cdm_info.h30
-rw-r--r--chromium/content/public/common/common_param_traits_macros.h6
-rw-r--r--chromium/content/public/common/common_sandbox_support_linux.h16
-rw-r--r--chromium/content/public/common/content_client.cc2
-rw-r--r--chromium/content/public/common/content_client.h12
-rw-r--r--chromium/content/public/common/content_descriptors.h9
-rw-r--r--chromium/content/public/common/content_features.cc155
-rw-r--r--chromium/content/public/common/content_features.h35
-rw-r--r--chromium/content/public/common/content_switches.cc32
-rw-r--r--chromium/content/public/common/content_switches.h14
-rw-r--r--chromium/content/public/common/load_timing_info.mojom33
-rw-r--r--chromium/content/public/common/load_timing_info.typemap14
-rw-r--r--chromium/content/public/common/load_timing_info_struct_traits.cc40
-rw-r--r--chromium/content/public/common/load_timing_info_struct_traits.h109
-rw-r--r--chromium/content/public/common/manifest.cc60
-rw-r--r--chromium/content/public/common/manifest.h177
-rw-r--r--chromium/content/public/common/manifest.typemap27
-rw-r--r--chromium/content/public/common/manifest_share_target_util.cc127
-rw-r--r--chromium/content/public/common/manifest_share_target_util.h37
-rw-r--r--chromium/content/public/common/manifest_struct_traits.cc153
-rw-r--r--chromium/content/public/common/manifest_struct_traits.h16
-rw-r--r--chromium/content/public/common/manifest_util.h4
-rw-r--r--chromium/content/public/common/media_stream_request.cc32
-rw-r--r--chromium/content/public/common/media_stream_request.h13
-rw-r--r--chromium/content/public/common/mojo_channel_switches.cc13
-rw-r--r--chromium/content/public/common/mojo_channel_switches.h16
-rw-r--r--chromium/content/public/common/origin_trial_policy.cc22
-rw-r--r--chromium/content/public/common/origin_trial_policy.h25
-rw-r--r--chromium/content/public/common/page_state.h14
-rw-r--r--chromium/content/public/common/platform_notification_data.h4
-rw-r--r--chromium/content/public/common/presentation_info.cc24
-rw-r--r--chromium/content/public/common/presentation_info.h69
-rw-r--r--chromium/content/public/common/resource_load_info.mojom50
-rw-r--r--chromium/content/public/common/result_codes.h7
-rw-r--r--chromium/content/public/common/sandboxed_process_launcher_delegate.cc8
-rw-r--r--chromium/content/public/common/sandboxed_process_launcher_delegate.h6
-rw-r--r--chromium/content/public/common/send_zygote_child_ping_linux.h18
-rw-r--r--chromium/content/public/common/speech_recognition_error.h2
-rw-r--r--chromium/content/public/common/speech_recognition_error.mojom34
-rw-r--r--chromium/content/public/common/speech_recognition_error.typemap14
-rw-r--r--chromium/content/public/common/speech_recognition_error_struct_traits.cc22
-rw-r--r--chromium/content/public/common/speech_recognition_error_struct_traits.h152
-rw-r--r--chromium/content/public/common/speech_recognition_grammar.h35
-rw-r--r--chromium/content/public/common/speech_recognition_grammar.mojom12
-rw-r--r--chromium/content/public/common/speech_recognition_result.mojom29
-rw-r--r--chromium/content/public/common/speech_recognition_result.typemap16
-rw-r--r--chromium/content/public/common/speech_recognition_result_struct_traits.cc29
-rw-r--r--chromium/content/public/common/speech_recognition_result_struct_traits.h47
-rw-r--r--chromium/content/public/common/stop_find_action.h15
-rw-r--r--chromium/content/public/common/typemaps.gni4
-rw-r--r--chromium/content/public/common/url_constants.cc2
-rw-r--r--chromium/content/public/common/url_constants.h2
-rw-r--r--chromium/content/public/common/weak_wrapper_shared_url_loader_factory.cc47
-rw-r--r--chromium/content/public/common/weak_wrapper_shared_url_loader_factory.h47
-rw-r--r--chromium/content/public/common/web_preferences.cc2
-rw-r--r--chromium/content/public/common/web_preferences.h8
-rw-r--r--chromium/content/public/common/zygote_features.gni5
-rw-r--r--chromium/content/public/common/zygote_fork_delegate_linux.h87
-rw-r--r--chromium/content/public/common/zygote_handle.h45
62 files changed, 852 insertions, 1303 deletions
diff --git a/chromium/content/public/common/BUILD.gn b/chromium/content/public/common/BUILD.gn
index 67588799001..f134458dd61 100644
--- a/chromium/content/public/common/BUILD.gn
+++ b/chromium/content/public/common/BUILD.gn
@@ -7,7 +7,6 @@ import("//build/config/chromecast_build.gni")
import("//build/config/features.gni")
import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
-import("//content/public/common/zygote_features.gni")
import("//media/media_options.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//ppapi/buildflags/buildflags.gni")
@@ -32,6 +31,10 @@ source_set("result_codes") {
sources = [
"result_codes.h",
]
+
+ deps = [
+ "//services/service_manager/embedder:embedder_result_codes",
+ ]
}
# This target allows other targets to depend on content_descriptors.h which is
@@ -70,12 +73,10 @@ config("static_switches_defines") {
source_set("static_switches") {
public = [
"content_switches.h",
- "mojo_channel_switches.h",
]
sources = [
"//content/common/content_export.h",
"content_switches.cc",
- "mojo_channel_switches.cc",
]
public_configs = [ ":static_switches_defines" ]
@@ -156,10 +157,6 @@ jumbo_source_set("common_sources") {
"isolated_world_ids.h",
"javascript_dialog_type.h",
"main_function_params.h",
- "manifest.cc",
- "manifest.h",
- "manifest_share_target_util.cc",
- "manifest_share_target_util.h",
"manifest_util.cc",
"manifest_util.h",
"media_metadata.cc",
@@ -170,14 +167,10 @@ jumbo_source_set("common_sources") {
"menu_item.h",
"mhtml_generation_params.cc",
"mhtml_generation_params.h",
- "mojo_channel_switches.cc",
- "mojo_channel_switches.h",
"network_connection_tracker.cc",
"network_connection_tracker.h",
"notification_resources.cc",
"notification_resources.h",
- "origin_trial_policy.cc",
- "origin_trial_policy.h",
"origin_util.h",
"page_importance_signals.h",
"page_state.cc",
@@ -191,8 +184,6 @@ jumbo_source_set("common_sources") {
"platform_notification_data.h",
"presentation_connection_message.cc",
"presentation_connection_message.h",
- "presentation_info.cc",
- "presentation_info.h",
"previews_state.h",
"process_type.h",
"push_event_payload.h",
@@ -215,13 +206,11 @@ jumbo_source_set("common_sources") {
"screen_info.cc",
"screen_info.h",
"screen_orientation_values.h",
- "send_zygote_child_ping_linux.h",
"service_manager_connection.h",
"simple_connection_filter.cc",
"simple_connection_filter.h",
"socket_permission_request.h",
"speech_recognition_error.h",
- "speech_recognition_grammar.h",
"speech_recognition_result.cc",
"speech_recognition_result.h",
"stop_find_action.h",
@@ -237,14 +226,13 @@ jumbo_source_set("common_sources") {
"use_zoom_for_dsf_policy.cc",
"use_zoom_for_dsf_policy.h",
"user_agent.h",
- "weak_wrapper_shared_url_loader_factory.cc",
- "weak_wrapper_shared_url_loader_factory.h",
"web_preferences.cc",
"web_preferences.h",
"webplugininfo.cc",
"webplugininfo.h",
"webplugininfo_param_traits.h",
- "zygote_fork_delegate_linux.h",
+ "webrtc_ip_handling_policy.cc",
+ "webrtc_ip_handling_policy.h",
]
configs += [
@@ -257,7 +245,6 @@ jumbo_source_set("common_sources") {
public_deps = [
":interfaces",
":service_names",
- ":zygote_buildflags",
"//content/common",
"//ipc",
"//media/capture:capture_base",
@@ -282,11 +269,12 @@ jumbo_source_set("common_sources") {
# needed because of allow_circular_includes_from.
"//content/common:mojo_bindings",
"//media",
- "//mojo/common",
"//ppapi/buildflags",
"//ppapi/c",
"//services/network/public/cpp",
+ "//services/service_manager/embedder:embedder_result_codes",
"//services/service_manager/public/cpp",
+ "//services/service_manager/zygote:zygote_buildflags",
"//skia",
"//storage/common",
"//third_party/blink/public/common",
@@ -308,6 +296,10 @@ jumbo_source_set("common_sources") {
deps += [ "//content/public/android:jni" ]
}
+ if (is_linux) {
+ deps += [ "//services/service_manager/zygote" ]
+ }
+
# //content/common needs to include public headers.
allow_circular_includes_from = [
":interfaces",
@@ -321,17 +313,6 @@ jumbo_source_set("common_sources") {
"pepper_plugin_info.h",
]
}
-
- if (enable_webrtc) {
- sources += [
- "webrtc_ip_handling_policy.cc",
- "webrtc_ip_handling_policy.h",
- ]
- }
-
- if (use_zygote_handle) {
- sources += [ "zygote_handle.h" ]
- }
}
buildflag_header("buildflags") {
@@ -351,11 +332,6 @@ source_set("feature_h264_with_openh264_ffmpeg") {
]
}
-buildflag_header("zygote_buildflags") {
- header = "zygote_buildflags.h"
- flags = [ "USE_ZYGOTE_HANDLE=$use_zygote_handle" ]
-}
-
mojom("interfaces") {
# Must depend on //content/public/common/ instead, for component build.
visibility = [
@@ -375,9 +351,13 @@ mojom("interfaces") {
sources = [
"appcache_info.mojom",
"fullscreen_video_element.mojom",
+ "load_timing_info.mojom",
"push_messaging_status.mojom",
"resource_load_info.mojom",
"resource_usage_reporter.mojom",
+ "speech_recognition_error.mojom",
+ "speech_recognition_grammar.mojom",
+ "speech_recognition_result.mojom",
"transferrable_url_loader.mojom",
"webplugininfo.mojom",
"window_container_type.mojom",
@@ -389,7 +369,6 @@ mojom("interfaces") {
public_deps = [
":resource_type_bindings",
- "//mojo/common:common_custom_types",
"//services/network/public/mojom",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
diff --git a/chromium/content/public/common/browser_side_navigation_policy.cc b/chromium/content/public/common/browser_side_navigation_policy.cc
index c71206145eb..726289ea83e 100644
--- a/chromium/content/public/common/browser_side_navigation_policy.cc
+++ b/chromium/content/public/common/browser_side_navigation_policy.cc
@@ -15,19 +15,8 @@ bool IsBrowserSideNavigationEnabled() {
return true;
}
-// Browser side navigation (aka PlzNavigate) is using blob URLs to deliver
-// the body of the main resource to the renderer process. When enabled, the
-// NavigationMojoResponse feature replaces this mechanism by a Mojo DataPipe.
-// Design doc: https://goo.gl/Rrrc7n.
-bool IsNavigationMojoResponseEnabled() {
- if (!IsBrowserSideNavigationEnabled())
- return false;
-
- return base::FeatureList::IsEnabled(features::kNavigationMojoResponse) ||
- base::FeatureList::IsEnabled(
- features::kServiceWorkerServicification) ||
- base::FeatureList::IsEnabled(features::kSignedHTTPExchange) ||
- base::FeatureList::IsEnabled(network::features::kNetworkService);
+bool IsPerNavigationMojoInterfaceEnabled() {
+ return base::FeatureList::IsEnabled(features::kPerNavigationMojoInterface);
}
} // namespace content
diff --git a/chromium/content/public/common/browser_side_navigation_policy.h b/chromium/content/public/common/browser_side_navigation_policy.h
index 8a2524a284e..d5887a160cd 100644
--- a/chromium/content/public/common/browser_side_navigation_policy.h
+++ b/chromium/content/public/common/browser_side_navigation_policy.h
@@ -13,7 +13,7 @@
namespace content {
CONTENT_EXPORT bool IsBrowserSideNavigationEnabled();
-CONTENT_EXPORT bool IsNavigationMojoResponseEnabled();
+CONTENT_EXPORT bool IsPerNavigationMojoInterfaceEnabled();
} // namespace content
diff --git a/chromium/content/public/common/cdm_info.h b/chromium/content/public/common/cdm_info.h
index e6305bfd8a9..c3c2898a714 100644
--- a/chromium/content/public/common/cdm_info.h
+++ b/chromium/content/public/common/cdm_info.h
@@ -8,24 +8,30 @@
#include <string>
#include <vector>
+#include "base/containers/flat_set.h"
#include "base/files/file_path.h"
#include "base/version.h"
#include "content/common/content_export.h"
+// TODO(crbug.com/825041): Move EncryptionMode out of decrypt_config and
+// rename it to EncryptionScheme.
+#include "media/base/decrypt_config.h"
#include "media/base/video_codecs.h"
namespace content {
// Represents a Content Decryption Module implementation and its capabilities.
struct CONTENT_EXPORT CdmInfo {
- CdmInfo(const std::string& name,
- const std::string& guid,
- const base::Version& version,
- const base::FilePath& path,
- const std::string& file_system_id,
- const std::vector<media::VideoCodec>& supported_video_codecs,
- bool supports_persistent_license,
- const std::string& supported_key_system,
- bool supports_sub_key_systems);
+ CdmInfo(
+ const std::string& name,
+ const std::string& guid,
+ const base::Version& version,
+ const base::FilePath& path,
+ const std::string& file_system_id,
+ const std::vector<media::VideoCodec>& supported_video_codecs,
+ bool supports_persistent_license,
+ const base::flat_set<media::EncryptionMode>& supported_encryption_schemes,
+ const std::string& supported_key_system,
+ bool supports_sub_key_systems);
CdmInfo(const CdmInfo& other);
~CdmInfo();
@@ -57,6 +63,10 @@ struct CONTENT_EXPORT CdmInfo {
// Whether this CDM supports persistent licenses.
bool supports_persistent_license;
+ // List of encryption schemes supported by the CDM (e.g. cenc). This is the
+ // set of encryption schemes that the CDM supports.
+ base::flat_set<media::EncryptionMode> supported_encryption_schemes;
+
// The key system supported by this CDM.
std::string supported_key_system;
@@ -64,7 +74,7 @@ struct CONTENT_EXPORT CdmInfo {
// A sub key system to a key system is like a sub domain to a domain.
// For example, com.example.somekeysystem.a and com.example.somekeysystem.b
// are both sub key systems of com.example.somekeysystem.
- bool supports_sub_key_systems = false;
+ bool supports_sub_key_systems;
};
} // namespace content
diff --git a/chromium/content/public/common/common_param_traits_macros.h b/chromium/content/public/common/common_param_traits_macros.h
index 3b72878d946..e3c46fdf48c 100644
--- a/chromium/content/public/common/common_param_traits_macros.h
+++ b/chromium/content/public/common/common_param_traits_macros.h
@@ -9,13 +9,14 @@
#define CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_
#include "build/build_config.h"
+#include "cc/input/touch_action.h"
#include "content/public/common/console_message_level.h"
#include "content/public/common/referrer.h"
#include "content/public/common/web_preferences.h"
#include "content/public/common/webplugininfo_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "net/base/network_change_notifier.h"
-#include "services/network/public/cpp/network_param_ipc_traits.h"
+#include "services/network/public/cpp/network_ipc_param_traits.h"
#include "third_party/blink/public/platform/modules/permissions/permission_status.mojom.h"
#include "third_party/blink/public/platform/web_history_scroll_restoration_type.h"
#include "third_party/blink/public/platform/web_point.h"
@@ -55,6 +56,7 @@ IPC_ENUM_TRAITS_MAX_VALUE(blink::WebHistoryScrollRestorationType,
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebSecurityStyle, blink::kWebSecurityStyleLast)
IPC_ENUM_TRAITS_MAX_VALUE(blink::mojom::PermissionStatus,
blink::mojom::PermissionStatus::LAST)
+IPC_ENUM_TRAITS_MAX_VALUE(cc::TouchAction, cc::kTouchActionMax)
IPC_ENUM_TRAITS_MAX_VALUE(content::EditingBehavior,
content::EDITING_BEHAVIOR_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(WindowOpenDisposition,
@@ -125,6 +127,8 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(xss_auditor_enabled)
IPC_STRUCT_TRAITS_MEMBER(dns_prefetching_enabled)
IPC_STRUCT_TRAITS_MEMBER(data_saver_enabled)
+ IPC_STRUCT_TRAITS_MEMBER(data_saver_holdback_web_api_enabled)
+ IPC_STRUCT_TRAITS_MEMBER(data_saver_holdback_media_api_enabled)
IPC_STRUCT_TRAITS_MEMBER(local_storage_enabled)
IPC_STRUCT_TRAITS_MEMBER(databases_enabled)
IPC_STRUCT_TRAITS_MEMBER(application_cache_enabled)
diff --git a/chromium/content/public/common/common_sandbox_support_linux.h b/chromium/content/public/common/common_sandbox_support_linux.h
index dc63dd29deb..e9e8b5e1df5 100644
--- a/chromium/content/public/common/common_sandbox_support_linux.h
+++ b/chromium/content/public/common/common_sandbox_support_linux.h
@@ -29,20 +29,6 @@ CONTENT_EXPORT bool GetFontTable(int fd,
uint8_t* output,
size_t* output_length);
-// Returns a file descriptor for a shared memory segment. The
-// executable flag indicates that the caller intends to use mprotect
-// with PROT_EXEC after making a mapping, but not that it intends to
-// mmap with PROT_EXEC in the first place. (Some systems, such as
-// ChromeOS, disallow PROT_EXEC in mmap on /dev/shm files but do allow
-// PROT_EXEC in mprotect on mappings from such files. This function
-// can yield an object that has that constraint.)
-CONTENT_EXPORT int MakeSharedMemorySegmentViaIPC(size_t length,
- bool executable);
-
-// Gets the well-known file descriptor on which we expect to find the
-// sandbox IPC channel.
-CONTENT_EXPORT int GetSandboxFD();
-
-}; // namespace content
+} // namespace content
#endif // CONTENT_PUBLIC_COMMON_COMMON_SANDBOX_SUPPORT_LINUX_H_
diff --git a/chromium/content/public/common/content_client.cc b/chromium/content/public/common/content_client.cc
index a2a5a3318c7..24932438c9f 100644
--- a/chromium/content/public/common/content_client.cc
+++ b/chromium/content/public/common/content_client.cc
@@ -102,7 +102,7 @@ std::string ContentClient::GetProcessTypeNameInEnglish(int type) {
return std::string();
}
-OriginTrialPolicy* ContentClient::GetOriginTrialPolicy() {
+blink::OriginTrialPolicy* ContentClient::GetOriginTrialPolicy() {
return nullptr;
}
diff --git a/chromium/content/public/common/content_client.h b/chromium/content/public/common/content_client.h
index ea3c1ef6bb6..528fd6abf6a 100644
--- a/chromium/content/public/common/content_client.h
+++ b/chromium/content/public/common/content_client.h
@@ -22,6 +22,10 @@ namespace base {
class RefCountedMemory;
}
+namespace blink {
+class OriginTrialPolicy;
+}
+
namespace IPC {
class Message;
}
@@ -46,7 +50,6 @@ class ContentClient;
class ContentGpuClient;
class ContentRendererClient;
class ContentUtilityClient;
-class OriginTrialPolicy;
class ServiceManagerConnection;
struct CdmInfo;
struct PepperPluginInfo;
@@ -129,7 +132,9 @@ class CONTENT_EXPORT ContentClient {
std::vector<std::string> csp_bypassing_schemes;
// See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy.
std::vector<std::string> secure_schemes;
- std::vector<url::Origin> secure_origins;
+ // Registers a serialized origin or a hostname pattern that should be
+ // considered trustworthy.
+ std::vector<std::string> secure_origins;
// Registers a URL scheme as strictly empty documents, allowing them to
// commit synchronously.
std::vector<std::string> empty_document_schemes;
@@ -146,6 +151,7 @@ class CONTENT_EXPORT ContentClient {
virtual std::string GetProduct() const;
// Returns the user agent. Content may cache this value.
+ // TODO(yhirano): Move this to ContentBrowserClient.
virtual std::string GetUserAgent() const;
// Returns a string resource given its id.
@@ -173,7 +179,7 @@ class CONTENT_EXPORT ContentClient {
// Returns the origin trial policy, or nullptr if origin trials are not
// supported by the embedder.
- virtual OriginTrialPolicy* GetOriginTrialPolicy();
+ virtual blink::OriginTrialPolicy* GetOriginTrialPolicy();
#if defined(OS_ANDROID)
// Returns true for clients like Android WebView that uses synchronous
diff --git a/chromium/content/public/common/content_descriptors.h b/chromium/content/public/common/content_descriptors.h
index 35bf7abd24a..bccbe890411 100644
--- a/chromium/content/public/common/content_descriptors.h
+++ b/chromium/content/public/common/content_descriptors.h
@@ -7,16 +7,13 @@
#include "build/build_config.h"
+#include "services/service_manager/embedder/descriptors.h"
+
// This is a list of global descriptor keys to be used with the
// base::GlobalDescriptors object (see base/posix/global_descriptors.h)
enum {
- kCrashDumpSignal = 0,
- kSandboxIPCChannel, // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md
- kMojoIPCChannel,
- kFieldTrialDescriptor,
-
#if defined(OS_ANDROID)
- kAndroidPropertyDescriptor,
+ kAndroidPropertyDescriptor = service_manager::kFirstEmbedderDescriptor,
kAndroidICUDataDescriptor,
#endif
diff --git a/chromium/content/public/common/content_features.cc b/chromium/content/public/common/content_features.cc
index 50c3617648a..10d9366af33 100644
--- a/chromium/content/public/common/content_features.cc
+++ b/chromium/content/public/common/content_features.cc
@@ -21,10 +21,6 @@ const base::Feature kAllowContentInitiatedDataUrlNavigations{
"AllowContentInitiatedDataUrlNavigations",
base::FEATURE_DISABLED_BY_DEFAULT};
-// Enables Array.prototype.values method
-const base::Feature kArrayPrototypeValues{"ArrayPrototypeValues",
- base::FEATURE_ENABLED_BY_DEFAULT};
-
// Enables asm.js to WebAssembly V8 backend.
// http://asmjs.org/spec/latest/
const base::Feature kAsmJsToWebAssembly{"AsmJsToWebAssembly",
@@ -36,6 +32,18 @@ const base::Feature kAsmJsToWebAssembly{"AsmJsToWebAssembly",
const base::Feature kAsyncWheelEvents{"AsyncWheelEvents",
base::FEATURE_ENABLED_BY_DEFAULT};
+// Creates audio output and input streams using the audio service.
+const base::Feature kAudioServiceAudioStreams{
+ "AudioServiceAudioStreams", base::FEATURE_DISABLED_BY_DEFAULT};
+
+// Launches the audio service on the browser startup.
+const base::Feature kAudioServiceLaunchOnStartup{
+ "AudioServiceLaunchOnStartup", base::FEATURE_DISABLED_BY_DEFAULT};
+
+// Runs the audio service in a separate process.
+const base::Feature kAudioServiceOutOfProcess{
+ "AudioServiceOutOfProcess", base::FEATURE_DISABLED_BY_DEFAULT};
+
// Allows swipe left/right from touchpad change browser navigation. Currently
// only enabled by default on CrOS.
const base::Feature kTouchpadOverscrollHistoryNavigation {
@@ -72,15 +80,6 @@ const base::Feature kCanvas2DImageChromium {
#endif
};
-// Enabled decoding images asynchronously from raster in the renderer
-// compositor.
-const base::Feature kCheckerImaging{"CheckerImaging",
- base::FEATURE_DISABLED_BY_DEFAULT};
-
-// Enables code caching after executing the script.
-const base::Feature kCodeCacheAfterExecute{"CodeCacheAfterExecute",
- base::FEATURE_ENABLED_BY_DEFAULT};
-
// Enables the compositing of fixed position content that is opaque and can
// preserve LCD text.
const base::Feature kCompositeOpaqueFixedPosition{
@@ -99,7 +98,7 @@ const base::Feature kCompositorTouchAction{"CompositorTouchAction",
// Enables blocking cross-site document responses (not paying attention to
// whether a site isolation mode is also enabled).
const base::Feature kCrossSiteDocumentBlockingAlways{
- "CrossSiteDocumentBlockingAlways", base::FEATURE_DISABLED_BY_DEFAULT};
+ "CrossSiteDocumentBlockingAlways", base::FEATURE_ENABLED_BY_DEFAULT};
// Enables blocking cross-site document responses if one of site isolation modes
// is (e.g. site-per-process or isolate-origins) is enabled.
@@ -130,11 +129,16 @@ const base::Feature kFontCacheScaling{"FontCacheScaling",
// same-origin to the top frame, or if a user gesture is being processed.
const base::Feature kFramebustingNeedsSameOriginOrUserGesture{
"FramebustingNeedsSameOriginOrUserGesture",
- base::FEATURE_DISABLED_BY_DEFAULT};
+ base::FEATURE_ENABLED_BY_DEFAULT};
// Enables extended Gamepad API features like motion tracking and haptics.
const base::Feature kGamepadExtensions{"GamepadExtensions",
base::FEATURE_DISABLED_BY_DEFAULT};
+
+// Enables haptic vibration effects on supported gamepads.
+const base::Feature kGamepadVibration{"GamepadVibration",
+ base::FEATURE_ENABLED_BY_DEFAULT};
+
// When WebXR Device API is enabled, exposes VR controllers as Gamepads and
// enables additional Gamepad attributes for use with WebXR Device API. Each
// XRInputSource will have a corresponding Gamepad instance.
@@ -154,6 +158,10 @@ const base::Feature kHeapCompaction{"HeapCompaction",
const base::Feature kImageCaptureAPI{"ImageCaptureAPI",
base::FEATURE_ENABLED_BY_DEFAULT};
+// Whether to use GeometryMapper to optimize IntersectionObserver.
+const base::Feature kIntersectionObserverGeometryMapper{
+ "IntersectionObserverGeometryMapper", base::FEATURE_DISABLED_BY_DEFAULT};
+
// Alternative to switches::kIsolateOrigins, for turning on origin isolation.
// List of origins to isolate has to be specified via
// kIsolateOriginsFieldTrialParamName.
@@ -164,7 +172,10 @@ const char kIsolateOriginsFieldTrialParamName[] = "OriginsList";
// Enables an API which allows websites to capture reserved keys in fullscreen.
// Defined by w3c here: https://w3c.github.io/keyboard-lock/
const base::Feature kKeyboardLockAPI{"KeyboardLockAPI",
- base::FEATURE_DISABLED_BY_DEFAULT};
+ base::FEATURE_ENABLED_BY_DEFAULT};
+
+const base::Feature kLayeredAPI{"LayeredAPI",
+ base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kLazyFrameLoading{"LazyFrameLoading",
base::FEATURE_DISABLED_BY_DEFAULT};
@@ -181,11 +192,6 @@ const base::Feature kLazyParseCSS{"LazyParseCSS",
const base::Feature kLowPriorityIframes{"LowPriorityIframes",
base::FEATURE_DISABLED_BY_DEFAULT};
-// An experiment forcing events to be non-blocking when the main thread is
-// deemed unresponsive. See https://crbug.com/599609.
-const base::Feature kMainThreadBusyScrollIntervention{
- "MainThreadBusyScrollIntervention", base::FEATURE_DISABLED_BY_DEFAULT};
-
// If this feature is enabled, media-device enumerations use a cache that is
// invalidated upon notifications sent by base::SystemMonitor. If disabled, the
// cache is considered invalid on every enumeration request.
@@ -213,10 +219,6 @@ const base::Feature kModuleScriptsDynamicImport{
const base::Feature kModuleScriptsImportMetaUrl{
"ModuleScriptsImportMetaUrl", base::FEATURE_ENABLED_BY_DEFAULT};
-// Mojo-based Input Event routing.
-const base::Feature kMojoInputMessages{"MojoInputMessages",
- base::FEATURE_ENABLED_BY_DEFAULT};
-
// Mojo-based Session Storage.
const base::Feature kMojoSessionStorage{"MojoSessionStorage",
base::FEATURE_DISABLED_BY_DEFAULT};
@@ -231,13 +233,6 @@ const base::Feature kMojoVideoCapture {
#endif
};
-// Browser side navigation (aka PlzNavigate) is using blob URLs to deliver
-// the body of the main resource to the renderer process. When enabled, the
-// NavigationMojoResponse feature replaces this mechanism by a Mojo DataPipe.
-// Design doc: https://goo.gl/Rrrc7n.
-const base::Feature kNavigationMojoResponse{"NavigationMojoResponse",
- base::FEATURE_ENABLED_BY_DEFAULT};
-
// If the network service is enabled, runs it in process.
const base::Feature kNetworkServiceInProcess{"NetworkServiceInProcess",
base::FEATURE_DISABLED_BY_DEFAULT};
@@ -246,13 +241,9 @@ const base::Feature kNetworkServiceInProcess{"NetworkServiceInProcess",
const base::Feature kNotificationContentImage{"NotificationContentImage",
base::FEATURE_ENABLED_BY_DEFAULT};
-// Use Mojo IPC for notifications.
-const base::Feature kNotificationsWithMojo{"NotificationsWithMojo",
- base::FEATURE_DISABLED_BY_DEFAULT};
-
// Off-main-thread WebSocket. See https://crbug.com/825740
const base::Feature kOffMainThreadWebSocket{"OffMainThreadWebSocket",
- base::FEATURE_DISABLED_BY_DEFAULT};
+ base::FEATURE_ENABLED_BY_DEFAULT};
// Origin Manifest. See crbug.com/751996
const base::Feature kOriginManifest{"OriginManifest",
@@ -275,6 +266,10 @@ const base::Feature kPassiveEventListenersDueToFling{
const base::Feature kPdfIsolation = {"PdfIsolation",
base::FEATURE_DISABLED_BY_DEFAULT};
+// Whether we should use the navigation_client mojo interface for navigations.
+const base::Feature kPerNavigationMojoInterface = {
+ "PerNavigationMojoInterface", base::FEATURE_DISABLED_BY_DEFAULT};
+
// If Pepper 3D Image Chromium is allowed, this feature controls whether it is
// enabled.
const base::Feature kPepper3DImageChromium {
@@ -316,24 +311,20 @@ const base::Feature kRenderingPipelineThrottling{
const base::Feature kRequireCSSExtensionForFile{
"RequireCSSExtensionForFile", base::FEATURE_ENABLED_BY_DEFAULT};
+// Enables resampling input events on main thread.
+const base::Feature kResamplingInputEvents{"ResamplingInputEvents",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// Loading Dispatcher v0 support with ResourceLoadScheduler (crbug.com/729954).
const base::Feature kResourceLoadScheduler{"ResourceLoadScheduler",
base::FEATURE_DISABLED_BY_DEFAULT};
-// Use common overflow scroll mechanism for frames. See http://crbug.com/417782.
-const base::Feature kRootLayerScrolling{"RootLayerScrolling",
- base::FEATURE_ENABLED_BY_DEFAULT};
-
// Run video capture service in the Browser process as opposed to a dedicated
// utility process
const base::Feature kRunVideoCaptureServiceInBrowserProcess{
"RunVideoCaptureServiceInBrowserProcess",
base::FEATURE_DISABLED_BY_DEFAULT};
-// Scrolls to compensate for layout movements (bit.ly/scroll-anchoring).
-const base::Feature kScrollAnchoring{"ScrollAnchoring",
- base::FEATURE_ENABLED_BY_DEFAULT};
-
// Save the scroll anchor and use it to restore scroll position.
const base::Feature kScrollAnchorSerialization{
"ScrollAnchorSerialization", base::FEATURE_DISABLED_BY_DEFAULT};
@@ -343,6 +334,9 @@ const base::Feature kSendBeaconThrowForBlobWithNonSimpleType{
"SendBeaconThrowForBlobWithNonSimpleType",
base::FEATURE_DISABLED_BY_DEFAULT};
+const base::Feature kSecMetadata{"SecMetadata",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// Service worker based payment apps as defined by w3c here:
// https://w3c.github.io/webpayments-payment-apps-api/
const base::Feature kServiceWorkerPaymentApps{
@@ -365,6 +359,10 @@ const base::Feature kSharedArrayBuffer{"SharedArrayBuffer",
const base::Feature kSignedHTTPExchange{"SignedHTTPExchange",
base::FEATURE_DISABLED_BY_DEFAULT};
+// Origin Trial of Origin-Signed HTTP Exchanges (for WebPackage Loading)
+const base::Feature kSignedHTTPExchangeOriginTrial{
+ "SignedHTTPExchangeOriginTrial", base::FEATURE_DISABLED_BY_DEFAULT};
+
// An experiment to require process isolation for the sign-in origin,
// https://accounts.google.com. Launch bug: https://crbug.com/739418.
const base::Feature kSignInProcessIsolation{"sign-in-process-isolation",
@@ -414,31 +412,11 @@ const base::Feature kTopDocumentIsolation{"top-document-isolation",
const base::Feature kTouchpadAndWheelScrollLatching{
"TouchpadAndWheelScrollLatching", base::FEATURE_ENABLED_BY_DEFAULT};
-// An experiment to turn off compositing for 2D transform & opacity animations.
-const base::Feature kTurnOff2DAndOpacityCompositorAnimations{
- "TurnOff2DAndOpacityCompositorAnimations",
- base::FEATURE_DISABLED_BY_DEFAULT};
-
-// Enables unified touch adjustment which adjusts touch events target to a best
-// nearby node.
-const base::Feature kUnifiedTouchAdjustment{"UnifiedTouchAdjustment",
- base::FEATURE_DISABLED_BY_DEFAULT};
-
// Use Feature Policy to gate the use of permission features like midi,
// geolocation, camera, microphone, etc.
const base::Feature kUseFeaturePolicyForPermissions{
"UseFeaturePolicyForPermissions", base::FEATURE_ENABLED_BY_DEFAULT};
-// Use MojoAudioInputIPC and RenderFrameAudioInputStreamFactory rather than
-// AudioInputMessageFilter and AudioInputRendererHost.
-const base::Feature kUseMojoAudioInputStreamFactory{
- "UseMojoAudioInputStreamFactory", base::FEATURE_ENABLED_BY_DEFAULT};
-
-// Use MojoAudioOutputIPC and RenderFrameAudioOutputStreamFactory rather than
-// AudioMessageFilter and AudioRendererHost.
-const base::Feature kUseMojoAudioOutputStreamFactory{
- "UseMojoAudioOutputStreamFactory", base::FEATURE_ENABLED_BY_DEFAULT};
-
// An experimental simple user-activation model where the user gesture state is
// tracked through a frame-based state instead of the gesture tokens we use
// today.
@@ -450,8 +428,7 @@ const base::Feature kUserActivationV2{"UserActivationV2",
// captured from the renderer for DevTools performance timeline and eyedropper
// tool.
const base::Feature kUseVideoCaptureApiForDevToolsSnapshots{
- "UseVideoCaptureApiForDevToolsSnapshots",
- base::FEATURE_DISABLED_BY_DEFAULT};
+ "UseVideoCaptureApiForDevToolsSnapshots", base::FEATURE_ENABLED_BY_DEFAULT};
// Enables to use a snapshot file in creating V8 contexts.
const base::Feature kV8ContextSnapshot{"V8ContextSnapshot",
@@ -474,7 +451,11 @@ const base::Feature kWebAssembly{"WebAssembly",
const base::Feature kWebAssemblyStreaming{"WebAssemblyStreaming",
base::FEATURE_ENABLED_BY_DEFAULT};
-// Enable WebAssembly streamed compilation.
+// Enable WebAssembly baseline compilation and tier up.
+const base::Feature kWebAssemblyBaseline{"WebAssemblyBaseline",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
+// Enable WebAssembly trap handler.
const base::Feature kWebAssemblyTrapHandler{"WebAssemblyTrapHandler",
base::FEATURE_DISABLED_BY_DEFAULT};
@@ -510,11 +491,21 @@ const base::Feature kWebAuthBle{"WebAuthenticationBle",
const base::Feature kWebAuthCtap2{"WebAuthenticationCtap2",
base::FEATURE_DISABLED_BY_DEFAULT};
+// Controls whether CTAP2 devices can communicate via the WebAuthentication API
+// using pairingless BLE protocol.
+// https://w3c.github.io/webauthn
+const base::Feature kWebAuthCable{"WebAuthenticationCable",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// If WebGL Image Chromium is allowed, this feature controls whether it is
// enabled.
const base::Feature kWebGLImageChromium{"WebGLImageChromium",
base::FEATURE_ENABLED_BY_DEFAULT};
+// Enable experimental policy-controlled features and LAPIs
+const base::Feature kExperimentalProductivityFeatures{
+ "ExperimentalProductivityFeatures", base::FEATURE_DISABLED_BY_DEFAULT};
+
// The JavaScript API for payments on the web.
const base::Feature kWebPayments{"WebPayments",
base::FEATURE_ENABLED_BY_DEFAULT};
@@ -529,6 +520,11 @@ const base::Feature kWebRtcAecBoundedErlSetup{
const base::Feature kWebRtcAecClockDriftSetup{
"WebRtcAecClockDriftSetup", base::FEATURE_DISABLED_BY_DEFAULT};
+// Informs the WebRTC Acoustic Echo Canceler (AEC) that the feature providing
+// echo canceller transparency to render noise should be used.
+const base::Feature kWebRtcAecNoiseTransparency{
+ "WebRtcAecNoiseTransparency", base::FEATURE_DISABLED_BY_DEFAULT};
+
// Makes WebRTC use ECDSA certs by default (i.e., when no cert type was
// specified in JS).
const base::Feature kWebRtcEcdsaDefault{"WebRTC-EnableWebRtcEcdsa",
@@ -548,6 +544,11 @@ const base::Feature kWebRtcHWVP8Encoding {
#endif
};
+// Enables HW VP8 encoding using Intel Vaapi, if available.
+// TODO(crbug.com/794608): Enable by default when we trust quality.
+const base::Feature kWebRtcVaapiHWVP8Encoding{
+ "WebRtcVaapiHWVP8Encoding", base::FEATURE_DISABLED_BY_DEFAULT};
+
// Enables negotiation of experimental multiplex codec in SDP.
const base::Feature kWebRtcMultiplexCodec{"WebRTC-MultiplexCodec",
base::FEATURE_DISABLED_BY_DEFAULT};
@@ -586,6 +587,10 @@ const base::Feature kWebXrHitTest{"WebXRHitTest",
const base::Feature kWebXrOrientationSensorDevice{
"WebXROrientationSensorDevice", base::FEATURE_DISABLED_BY_DEFAULT};
+// Wipe corrupt v2 IndexedDB databases.
+const base::Feature kWipeCorruptV2IDBDatabases{
+ "WipeCorruptV2IDBDatabases", base::FEATURE_ENABLED_BY_DEFAULT};
+
// Enabled "work stealing" in the script runner.
const base::Feature kWorkStealingInScriptRunner{
"WorkStealingInScriptRunner", base::FEATURE_DISABLED_BY_DEFAULT};
@@ -596,6 +601,11 @@ const base::Feature kWorkStealingInScriptRunner{
const base::Feature kAndroidAutofillAccessibility{
"AndroidAutofillAccessibility", base::FEATURE_ENABLED_BY_DEFAULT};
+// Enables developers to use the CSS safe-area-* and viewport-fit APIs which
+// allow them to support devices with a display cutout.
+const base::Feature kDisplayCutoutAPI{"DisplayCutoutAPI",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// Enables hiding incorrectly-sized frames while in fullscreen.
const base::Feature kHideIncorrectlySizedFullscreenFrames{
"HideIncorrectlySizedFullscreenFrames", base::FEATURE_ENABLED_BY_DEFAULT};
@@ -621,10 +631,19 @@ const char kWebXrRenderPathParamValueSharedBuffer[] = "SharedBuffer";
const base::Feature kDeviceMonitorMac{"DeviceMonitorMac",
base::FEATURE_ENABLED_BY_DEFAULT};
+// Enable IOSurface based screen capturer.
+const base::Feature kIOSurfaceCapturer{"IOSurfaceCapturer",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// The V2 sandbox on MacOS removes the unsandboed warmup phase and sandboxes the
// entire life of the process.
const base::Feature kMacV2Sandbox{"MacV2Sandbox",
base::FEATURE_DISABLED_BY_DEFAULT};
+
+// Controls whether the CTAP2 implementation should use a built-in platform
+// authenticator, where available.
+const base::Feature kWebAuthTouchId{"WebAuthenticationTouchId",
+ base::FEATURE_DISABLED_BY_DEFAULT};
#endif // defined(OS_MACOSX)
bool IsVideoCaptureServiceEnabledForOutOfProcess() {
diff --git a/chromium/content/public/common/content_features.h b/chromium/content/public/common/content_features.h
index e3eed28171b..d972131225d 100644
--- a/chromium/content/public/common/content_features.h
+++ b/chromium/content/public/common/content_features.h
@@ -19,74 +19,76 @@ namespace features {
CONTENT_EXPORT extern const base::Feature kAllowActivationDelegationAttr;
CONTENT_EXPORT extern const base::Feature
kAllowContentInitiatedDataUrlNavigations;
-CONTENT_EXPORT extern const base::Feature kArrayPrototypeValues;
CONTENT_EXPORT extern const base::Feature kAsmJsToWebAssembly;
CONTENT_EXPORT extern const base::Feature kAsyncWheelEvents;
+CONTENT_EXPORT extern const base::Feature kAudioServiceAudioStreams;
+CONTENT_EXPORT extern const base::Feature kAudioServiceLaunchOnStartup;
+CONTENT_EXPORT extern const base::Feature kAudioServiceOutOfProcess;
CONTENT_EXPORT extern const base::Feature kBlockCredentialedSubresources;
CONTENT_EXPORT extern const base::Feature kBrotliEncoding;
CONTENT_EXPORT extern const base::Feature kCacheInlineScriptCode;
CONTENT_EXPORT extern const base::Feature kCanvas2DImageChromium;
-CONTENT_EXPORT extern const base::Feature kCheckerImaging;
-CONTENT_EXPORT extern const base::Feature kCodeCacheAfterExecute;
CONTENT_EXPORT extern const base::Feature kCompositeOpaqueFixedPosition;
CONTENT_EXPORT extern const base::Feature kCompositeOpaqueScrollers;
CONTENT_EXPORT extern const base::Feature kCompositorTouchAction;
CONTENT_EXPORT extern const base::Feature kCrossSiteDocumentBlockingAlways;
CONTENT_EXPORT extern const base::Feature kCrossSiteDocumentBlockingIfIsolating;
CONTENT_EXPORT extern const base::Feature kDataSaverHoldback;
+CONTENT_EXPORT extern const base::Feature kExperimentalProductivityFeatures;
CONTENT_EXPORT extern const base::Feature kExpensiveBackgroundTimerThrottling;
CONTENT_EXPORT extern const base::Feature kExtendedMouseButtons;
CONTENT_EXPORT extern const base::Feature kFontCacheScaling;
CONTENT_EXPORT extern const base::Feature
kFramebustingNeedsSameOriginOrUserGesture;
CONTENT_EXPORT extern const base::Feature kGamepadExtensions;
+CONTENT_EXPORT extern const base::Feature kGamepadVibration;
CONTENT_EXPORT extern const base::Feature kGuestViewCrossProcessFrames;
CONTENT_EXPORT extern const base::Feature kHeapCompaction;
CONTENT_EXPORT extern const base::Feature kImageCaptureAPI;
+CONTENT_EXPORT extern const base::Feature kIntersectionObserverGeometryMapper;
CONTENT_EXPORT extern const base::Feature kIsolateOrigins;
CONTENT_EXPORT extern const char kIsolateOriginsFieldTrialParamName[];
CONTENT_EXPORT extern const base::Feature kKeyboardLockAPI;
+CONTENT_EXPORT extern const base::Feature kLayeredAPI;
CONTENT_EXPORT extern const base::Feature kLazyFrameLoading;
CONTENT_EXPORT extern const base::Feature kLazyInitializeMediaControls;
CONTENT_EXPORT extern const base::Feature kLazyParseCSS;
CONTENT_EXPORT extern const base::Feature kLowPriorityIframes;
-CONTENT_EXPORT extern const base::Feature kMainThreadBusyScrollIntervention;
CONTENT_EXPORT extern const base::Feature kMediaDevicesSystemMonitorCache;
CONTENT_EXPORT extern const base::Feature kMemoryCoordinator;
CONTENT_EXPORT extern const base::Feature kModuleScriptsDynamicImport;
CONTENT_EXPORT extern const base::Feature kModuleScriptsImportMetaUrl;
-CONTENT_EXPORT extern const base::Feature kMojoInputMessages;
CONTENT_EXPORT extern const base::Feature kMojoSessionStorage;
CONTENT_EXPORT extern const base::Feature kMojoVideoCapture;
-CONTENT_EXPORT extern const base::Feature kNavigationMojoResponse;
CONTENT_EXPORT extern const base::Feature kNetworkServiceInProcess;
CONTENT_EXPORT extern const base::Feature kNotificationContentImage;
-CONTENT_EXPORT extern const base::Feature kNotificationsWithMojo;
CONTENT_EXPORT extern const base::Feature kOffMainThreadWebSocket;
CONTENT_EXPORT extern const base::Feature kOriginManifest;
CONTENT_EXPORT extern const base::Feature kOriginTrials;
CONTENT_EXPORT extern const base::Feature kPassiveDocumentEventListeners;
CONTENT_EXPORT extern const base::Feature kPassiveEventListenersDueToFling;
CONTENT_EXPORT extern const base::Feature kPdfIsolation;
+CONTENT_EXPORT extern const base::Feature kPerNavigationMojoInterface;
CONTENT_EXPORT extern const base::Feature kPepper3DImageChromium;
CONTENT_EXPORT extern const base::Feature kPurgeAndSuspend;
CONTENT_EXPORT extern const base::Feature kPWAFullCodeCache;
CONTENT_EXPORT extern const base::Feature kRasterInducingScroll;
CONTENT_EXPORT extern const base::Feature kRenderingPipelineThrottling;
CONTENT_EXPORT extern const base::Feature kRequireCSSExtensionForFile;
+CONTENT_EXPORT extern const base::Feature kResamplingInputEvents;
CONTENT_EXPORT extern const base::Feature kResourceLoadScheduler;
-CONTENT_EXPORT extern const base::Feature kRootLayerScrolling;
CONTENT_EXPORT extern const base::Feature
kRunVideoCaptureServiceInBrowserProcess;
-CONTENT_EXPORT extern const base::Feature kScrollAnchoring;
CONTENT_EXPORT extern const base::Feature kScrollAnchorSerialization;
CONTENT_EXPORT extern const base::Feature
kSendBeaconThrowForBlobWithNonSimpleType;
+CONTENT_EXPORT extern const base::Feature kSecMetadata;
CONTENT_EXPORT extern const base::Feature kServiceWorkerPaymentApps;
CONTENT_EXPORT extern const base::Feature kServiceWorkerScriptFullCodeCache;
CONTENT_EXPORT extern const base::Feature kServiceWorkerServicification;
CONTENT_EXPORT extern const base::Feature kSharedArrayBuffer;
CONTENT_EXPORT extern const base::Feature kSignedHTTPExchange;
+CONTENT_EXPORT extern const base::Feature kSignedHTTPExchangeOriginTrial;
CONTENT_EXPORT extern const base::Feature kSignInProcessIsolation;
CONTENT_EXPORT extern const base::Feature kSlimmingPaintV175;
CONTENT_EXPORT extern const base::Feature kSpareRendererForSitePerProcess;
@@ -97,12 +99,7 @@ CONTENT_EXPORT extern const base::Feature kTimerThrottlingForHiddenFrames;
CONTENT_EXPORT extern const base::Feature kTopDocumentIsolation;
CONTENT_EXPORT extern const base::Feature kTouchpadAndWheelScrollLatching;
CONTENT_EXPORT extern const base::Feature kTouchpadOverscrollHistoryNavigation;
-CONTENT_EXPORT extern const base::Feature
- kTurnOff2DAndOpacityCompositorAnimations;
-CONTENT_EXPORT extern const base::Feature kUnifiedTouchAdjustment;
CONTENT_EXPORT extern const base::Feature kUseFeaturePolicyForPermissions;
-CONTENT_EXPORT extern const base::Feature kUseMojoAudioInputStreamFactory;
-CONTENT_EXPORT extern const base::Feature kUseMojoAudioOutputStreamFactory;
CONTENT_EXPORT extern const base::Feature kUserActivationV2;
CONTENT_EXPORT extern const base::Feature
kUseVideoCaptureApiForDevToolsSnapshots;
@@ -111,18 +108,22 @@ CONTENT_EXPORT extern const base::Feature kV8VmFuture;
CONTENT_EXPORT extern const base::Feature kVrWebInputEditing;
CONTENT_EXPORT extern const base::Feature kWebAssembly;
CONTENT_EXPORT extern const base::Feature kWebAssemblyStreaming;
+CONTENT_EXPORT extern const base::Feature kWebAssemblyBaseline;
CONTENT_EXPORT extern const base::Feature kWebAssemblyTrapHandler;
CONTENT_EXPORT extern const base::Feature kWebAuth;
CONTENT_EXPORT extern const base::Feature kWebAuthBle;
-CONTENT_EXPORT extern const base::Feature kWebContentsOcclusion;
CONTENT_EXPORT extern const base::Feature kWebAuthCtap2;
+CONTENT_EXPORT extern const base::Feature kWebAuthCable;
+CONTENT_EXPORT extern const base::Feature kWebContentsOcclusion;
CONTENT_EXPORT extern const base::Feature kWebGLImageChromium;
CONTENT_EXPORT extern const base::Feature kWebPayments;
CONTENT_EXPORT extern const base::Feature kWebRtcAecBoundedErlSetup;
CONTENT_EXPORT extern const base::Feature kWebRtcAecClockDriftSetup;
+CONTENT_EXPORT extern const base::Feature kWebRtcAecNoiseTransparency;
CONTENT_EXPORT extern const base::Feature kWebRtcEcdsaDefault;
CONTENT_EXPORT extern const base::Feature kWebRtcHWH264Encoding;
CONTENT_EXPORT extern const base::Feature kWebRtcHWVP8Encoding;
+CONTENT_EXPORT extern const base::Feature kWebRtcVaapiHWVP8Encoding;
CONTENT_EXPORT extern const base::Feature kWebRtcMultiplexCodec;
CONTENT_EXPORT extern const base::Feature kWebRtcScreenshareSwEncoding;
CONTENT_EXPORT extern const base::Feature kWebRtcUseEchoCanceller3;
@@ -133,10 +134,12 @@ CONTENT_EXPORT extern const base::Feature kWebXr;
CONTENT_EXPORT extern const base::Feature kWebXrGamepadSupport;
CONTENT_EXPORT extern const base::Feature kWebXrHitTest;
CONTENT_EXPORT extern const base::Feature kWebXrOrientationSensorDevice;
+CONTENT_EXPORT extern const base::Feature kWipeCorruptV2IDBDatabases;
CONTENT_EXPORT extern const base::Feature kWorkStealingInScriptRunner;
#if defined(OS_ANDROID)
CONTENT_EXPORT extern const base::Feature kAndroidAutofillAccessibility;
+CONTENT_EXPORT extern const base::Feature kDisplayCutoutAPI;
CONTENT_EXPORT extern const base::Feature kHideIncorrectlySizedFullscreenFrames;
CONTENT_EXPORT extern const base::Feature kWebNfc;
CONTENT_EXPORT extern const base::Feature kWebXrRenderPath;
@@ -148,7 +151,9 @@ CONTENT_EXPORT extern const char kWebXrRenderPathParamValueSharedBuffer[];
#if defined(OS_MACOSX)
CONTENT_EXPORT extern const base::Feature kDeviceMonitorMac;
+CONTENT_EXPORT extern const base::Feature kIOSurfaceCapturer;
CONTENT_EXPORT extern const base::Feature kMacV2Sandbox;
+CONTENT_EXPORT extern const base::Feature kWebAuthTouchId;
#endif // defined(OS_MACOSX)
// DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
diff --git a/chromium/content/public/common/content_switches.cc b/chromium/content/public/common/content_switches.cc
index 97e443b8fd7..aac63339ab2 100644
--- a/chromium/content/public/common/content_switches.cc
+++ b/chromium/content/public/common/content_switches.cc
@@ -169,9 +169,6 @@ const char kDisableGpuProcessCrashLimit[] = "disable-gpu-process-crash-limit";
// during fast scrolling especially on slower devices.
const char kDisableLowResTiling[] = "disable-low-res-tiling";
-// Disable the GPU process sandbox.
-const char kDisableGpuSandbox[] = "disable-gpu-sandbox";
-
// Disable the thread that crashes the GPU process if it stops responding to
// messages.
const char kDisableGpuWatchdog[] = "disable-gpu-watchdog";
@@ -206,9 +203,6 @@ const char kDisableLogging[] = "disable-logging";
// Disables using CODECAPI_AVLowLatencyMode when creating DXVA decoders.
const char kDisableLowLatencyDxva[] = "disable-low-latency-dxva";
-// Disables usage of the namespace sandbox.
-const char kDisableNamespaceSandbox[] = "disable-namespace-sandbox";
-
// Disables clearing the rendering output of a renderer when it didn't commit
// new output for a while after a top-frame navigation.
const char kDisableNewContentRenderingTimeout[] =
@@ -349,6 +343,10 @@ const char kEnableBackgroundFetchPersistence[] =
// features.
const char kEnableBlinkFeatures[] = "enable-blink-features";
+// A shorthand for adding both "--enable-blink-features=BlinkGenPropertyTrees"
+// and "--enable-layer-lists".
+const char kEnableBlinkGenPropertyTrees[] = "enable-blink-gen-property-trees";
+
// Enables Web Platform features that are in development.
const char kEnableExperimentalWebPlatformFeatures[] =
"enable-experimental-web-platform-features";
@@ -404,9 +402,10 @@ const char kEnableRGBA4444Textures[] = "enable-rgba-4444-textures";
// Set options to cache V8 data. (off, preparse data, or code)
const char kV8CacheOptions[] = "v8-cache-options";
-// Cause the OS X sandbox write to syslog every time an access to a resource
-// is denied by the sandbox.
-const char kEnableSandboxLogging[] = "enable-sandbox-logging";
+// If true the ServiceProcessLauncher is used to launch services. This allows
+// for service binaries to be loaded rather than using the utility process. This
+// is only useful for tests.
+const char kEnableServiceBinaryLauncher[] = "enable-service-binary-launcher";
// Enables the Skia benchmarking extension
const char kEnableSkiaBenchmarking[] = "enable-skia-benchmarking";
@@ -607,9 +606,6 @@ const char kMHTMLSkipNostoreAll[] = "skip-nostore-all";
// Use a Mojo-based LocalStorage implementation.
const char kMojoLocalStorage[] = "mojo-local-storage";
-// Disables the sandbox for all process types that are normally sandboxed.
-const char kNoSandbox[] = "no-sandbox";
-
// Disables the use of a zygote process for forking child processes. Instead,
// child processes will be forked and exec'd directly. Note that --no-sandbox
// should also be used together with this flag because the sandbox needs the
@@ -736,8 +732,8 @@ const char kRendererProcess[] = "renderer";
const char kRendererProcessLimit[] = "renderer-process-limit";
// Causes the renderer process to display a dialog on launch. Passing this flag
-// also adds kNoSandbox on Windows non-official builds, since that's needed to
-// show a dialog.
+// also adds service_manager::kNoSandbox on Windows non-official builds, since
+// that's needed to show a dialog.
const char kRendererStartupDialog[] = "renderer-startup-dialog";
// Reduce the default `referer` header's granularity.
@@ -856,13 +852,6 @@ const char kValidateInputEventStream[] = "validate-input-event-stream";
// kWaitForDebugger flag passed on or not.
const char kWaitForDebuggerChildren[] = "wait-for-debugger-children";
-// The prefix used when starting the zygote process. (i.e. 'gdb --args')
-const char kZygoteCmdPrefix[] = "zygote-cmd-prefix";
-
-// Causes the process to run as a renderer zygote.
-const char kZygoteProcess[] = "zygote";
-
-#if BUILDFLAG(ENABLE_WEBRTC)
// Disables encryption of RTP Media for WebRTC. When Chrome embeds Content, it
// ignores this switch on its stable and beta channels.
const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
@@ -909,7 +898,6 @@ const char kWebRtcMaxCpuConsumptionPercentage[] =
// interval. Please see SetupStunProbeTrial in
// chrome_browser_field_trials_desktop.cc for more detail.
const char kWebRtcStunProbeTrialParameter[] = "webrtc-stun-probe-trial";
-#endif
// Enable capture and local storage of WebRTC event logs without visiting
// chrome://webrtc-internals. This is useful for automated testing. It accepts
diff --git a/chromium/content/public/common/content_switches.h b/chromium/content/public/common/content_switches.h
index a1ccec7e81f..990f172ac8c 100644
--- a/chromium/content/public/common/content_switches.h
+++ b/chromium/content/public/common/content_switches.h
@@ -58,7 +58,6 @@ CONTENT_EXPORT extern const char kDisableGpuEarlyInit[];
CONTENT_EXPORT extern const char kDisableGpuMemoryBufferCompositorResources[];
CONTENT_EXPORT extern const char kDisableGpuMemoryBufferVideoFrames[];
extern const char kDisableGpuProcessCrashLimit[];
-CONTENT_EXPORT extern const char kDisableGpuSandbox[];
CONTENT_EXPORT extern const char kDisableGpuWatchdog[];
CONTENT_EXPORT extern const char kDisableImageAnimationResync[];
CONTENT_EXPORT extern const char kDisableJavaScriptHarmonyShipping[];
@@ -71,7 +70,6 @@ CONTENT_EXPORT extern const char kDisablePreferCompositingToLCDText[];
CONTENT_EXPORT extern const char kDisableKillAfterBadIPC[];
CONTENT_EXPORT extern const char kDisableLocalStorage[];
CONTENT_EXPORT extern const char kDisableLogging[];
-CONTENT_EXPORT extern const char kDisableNamespaceSandbox[];
CONTENT_EXPORT extern const char kDisableNewContentRenderingTimeout[];
CONTENT_EXPORT extern const char kDisableNotifications[];
CONTENT_EXPORT extern const char kDisableOriginTrialControlledBlinkFeatures[];
@@ -111,6 +109,7 @@ CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
CONTENT_EXPORT extern const char kEnableAutomation[];
CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
CONTENT_EXPORT extern const char kEnableBlinkFeatures[];
+CONTENT_EXPORT extern const char kEnableBlinkGenPropertyTrees[];
CONTENT_EXPORT extern const char kEnableBackgroundFetchPersistence[];
CONTENT_EXPORT extern const char kEnableDisplayList2dCanvas[];
CONTENT_EXPORT extern const char kEnableExperimentalWebPlatformFeatures[];
@@ -127,7 +126,7 @@ CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[];
CONTENT_EXPORT extern const char kEnablePreciseMemoryInfo[];
CONTENT_EXPORT extern const char kEnablePrintBrowser[];
CONTENT_EXPORT extern const char kEnableRGBA4444Textures[];
-CONTENT_EXPORT extern const char kEnableSandboxLogging[];
+CONTENT_EXPORT extern const char kEnableServiceBinaryLauncher[];
extern const char kEnableSkiaBenchmarking[];
CONTENT_EXPORT extern const char kEnableSlimmingPaintV175[];
CONTENT_EXPORT extern const char kEnableSlimmingPaintV2[];
@@ -182,7 +181,6 @@ CONTENT_EXPORT extern const char kMHTMLGeneratorOption[];
CONTENT_EXPORT extern const char kMHTMLSkipNostoreMain[];
CONTENT_EXPORT extern const char kMHTMLSkipNostoreAll[];
CONTENT_EXPORT extern const char kMojoLocalStorage[];
-CONTENT_EXPORT extern const char kNoSandbox[];
CONTENT_EXPORT extern const char kNoZygote[];
CONTENT_EXPORT extern const char kEnableAppContainer[];
CONTENT_EXPORT extern const char kDisableAppContainer[];
@@ -237,10 +235,7 @@ CONTENT_EXPORT extern const char kUtilityStartupDialog[];
CONTENT_EXPORT extern const char kV8CacheOptions[];
CONTENT_EXPORT extern const char kValidateInputEventStream[];
CONTENT_EXPORT extern const char kWaitForDebuggerChildren[];
-CONTENT_EXPORT extern const char kZygoteCmdPrefix[];
-CONTENT_EXPORT extern const char kZygoteProcess[];
-#if BUILDFLAG(ENABLE_WEBRTC)
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
CONTENT_EXPORT extern const char kDisableWebRtcHWDecoding[];
CONTENT_EXPORT extern const char kDisableWebRtcHWEncoding[];
@@ -252,11 +247,6 @@ CONTENT_EXPORT extern const char kForceWebRtcIPHandlingPolicy[];
extern const char kWebRtcMaxCaptureFramerate[];
extern const char kWebRtcMaxCpuConsumptionPercentage[];
CONTENT_EXPORT extern const char kWebRtcStunProbeTrialParameter[];
-#endif
-
-// TODO(eladalon): Move into "#if BUILDFLAG(ENABLE_WEBRTC)" section when
-// WebRTCInternals is excluded from the build for non-WebRTC builds.
-// https://crbug.com/817446
CONTENT_EXPORT extern const char kWebRtcLocalEventLogging[];
#if defined(OS_ANDROID)
diff --git a/chromium/content/public/common/load_timing_info.mojom b/chromium/content/public/common/load_timing_info.mojom
new file mode 100644
index 00000000000..605e65bd29d
--- /dev/null
+++ b/chromium/content/public/common/load_timing_info.mojom
@@ -0,0 +1,33 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module content.mojom;
+
+import "mojo/public/mojom/base/time.mojom";
+
+// Mirror of net::LoadTimingInfo::ConnectTiming.
+struct LoadTimingInfoConnectTiming {
+ mojo_base.mojom.TimeTicks dns_start;
+ mojo_base.mojom.TimeTicks dns_end;
+ mojo_base.mojom.TimeTicks connect_start;
+ mojo_base.mojom.TimeTicks connect_end;
+ mojo_base.mojom.TimeTicks ssl_start;
+ mojo_base.mojom.TimeTicks ssl_end;
+};
+
+// Mirror of net::LoadTimingInfo.
+struct LoadTimingInfo {
+ bool socket_reused;
+ uint32 socket_log_id;
+ mojo_base.mojom.Time request_start_time;
+ mojo_base.mojom.TimeTicks request_start;
+ mojo_base.mojom.TimeTicks proxy_resolve_start;
+ mojo_base.mojom.TimeTicks proxy_resolve_end;
+ LoadTimingInfoConnectTiming connect_timing;
+ mojo_base.mojom.TimeTicks send_start;
+ mojo_base.mojom.TimeTicks send_end;
+ mojo_base.mojom.TimeTicks receive_headers_end;
+ mojo_base.mojom.TimeTicks push_start;
+ mojo_base.mojom.TimeTicks push_end;
+};
diff --git a/chromium/content/public/common/load_timing_info.typemap b/chromium/content/public/common/load_timing_info.typemap
new file mode 100644
index 00000000000..b86d3647324
--- /dev/null
+++ b/chromium/content/public/common/load_timing_info.typemap
@@ -0,0 +1,14 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+mojom = "//content/public/common/load_timing_info.mojom"
+public_headers = [ "//net/base/load_timing_info.h" ]
+traits_headers = [ "//content/public/common/load_timing_info_struct_traits.h" ]
+sources = [
+ "//content/public/common/load_timing_info_struct_traits.cc",
+]
+type_mappings = [
+ "content.mojom.LoadTimingInfo=net::LoadTimingInfo",
+ "content.mojom.LoadTimingInfoConnectTiming=net::LoadTimingInfo::ConnectTiming",
+]
diff --git a/chromium/content/public/common/load_timing_info_struct_traits.cc b/chromium/content/public/common/load_timing_info_struct_traits.cc
new file mode 100644
index 00000000000..5894946d0a9
--- /dev/null
+++ b/chromium/content/public/common/load_timing_info_struct_traits.cc
@@ -0,0 +1,40 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/common/load_timing_info_struct_traits.h"
+
+#include "mojo/public/cpp/base/time_mojom_traits.h"
+
+namespace mojo {
+
+// static
+bool StructTraits<content::mojom::LoadTimingInfoConnectTimingDataView,
+ net::LoadTimingInfo::ConnectTiming>::
+ Read(content::mojom::LoadTimingInfoConnectTimingDataView data,
+ net::LoadTimingInfo::ConnectTiming* out) {
+ return data.ReadDnsStart(&out->dns_start) && data.ReadDnsEnd(&out->dns_end) &&
+ data.ReadConnectStart(&out->connect_start) &&
+ data.ReadConnectEnd(&out->connect_end) &&
+ data.ReadSslStart(&out->ssl_start) && data.ReadSslEnd(&out->ssl_end);
+}
+
+// static
+bool StructTraits<content::mojom::LoadTimingInfoDataView, net::LoadTimingInfo>::
+ Read(content::mojom::LoadTimingInfoDataView data,
+ net::LoadTimingInfo* out) {
+ out->socket_reused = data.socket_reused();
+ out->socket_log_id = data.socket_log_id();
+ return data.ReadRequestStartTime(&out->request_start_time) &&
+ data.ReadRequestStart(&out->request_start) &&
+ data.ReadProxyResolveStart(&out->proxy_resolve_start) &&
+ data.ReadProxyResolveEnd(&out->proxy_resolve_end) &&
+ data.ReadConnectTiming(&out->connect_timing) &&
+ data.ReadSendStart(&out->send_start) &&
+ data.ReadSendEnd(&out->send_end) &&
+ data.ReadReceiveHeadersEnd(&out->receive_headers_end) &&
+ data.ReadPushStart(&out->push_start) &&
+ data.ReadPushEnd(&out->push_end);
+}
+
+} // namespace mojo
diff --git a/chromium/content/public/common/load_timing_info_struct_traits.h b/chromium/content/public/common/load_timing_info_struct_traits.h
new file mode 100644
index 00000000000..523da814216
--- /dev/null
+++ b/chromium/content/public/common/load_timing_info_struct_traits.h
@@ -0,0 +1,109 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_COMMON_LOAD_TIMING_INFO_STRUCT_TRAITS_H_
+#define CONTENT_PUBLIC_COMMON_LOAD_TIMING_INFO_STRUCT_TRAITS_H_
+
+#include "content/public/common/load_timing_info.mojom.h"
+#include "mojo/public/cpp/bindings/struct_traits.h"
+#include "net/base/load_timing_info.h"
+
+namespace mojo {
+
+template <>
+struct StructTraits<content::mojom::LoadTimingInfoConnectTimingDataView,
+ net::LoadTimingInfo::ConnectTiming> {
+ static base::TimeTicks dns_start(
+ const net::LoadTimingInfo::ConnectTiming& obj) {
+ return obj.dns_start;
+ }
+
+ static base::TimeTicks dns_end(
+ const net::LoadTimingInfo::ConnectTiming& obj) {
+ return obj.dns_end;
+ }
+
+ static base::TimeTicks connect_start(
+ const net::LoadTimingInfo::ConnectTiming& obj) {
+ return obj.connect_start;
+ }
+
+ static base::TimeTicks connect_end(
+ const net::LoadTimingInfo::ConnectTiming& obj) {
+ return obj.connect_end;
+ }
+
+ static base::TimeTicks ssl_start(
+ const net::LoadTimingInfo::ConnectTiming& obj) {
+ return obj.ssl_start;
+ }
+
+ static base::TimeTicks ssl_end(
+ const net::LoadTimingInfo::ConnectTiming& obj) {
+ return obj.ssl_end;
+ }
+
+ static bool Read(content::mojom::LoadTimingInfoConnectTimingDataView obj,
+ net::LoadTimingInfo::ConnectTiming* output);
+};
+
+template <>
+struct StructTraits<content::mojom::LoadTimingInfoDataView,
+ net::LoadTimingInfo> {
+ static bool socket_reused(const net::LoadTimingInfo& obj) {
+ return obj.socket_reused;
+ }
+
+ static uint32_t socket_log_id(const net::LoadTimingInfo& obj) {
+ return obj.socket_log_id;
+ }
+
+ static base::Time request_start_time(const net::LoadTimingInfo& obj) {
+ return obj.request_start_time;
+ }
+
+ static base::TimeTicks request_start(const net::LoadTimingInfo& obj) {
+ return obj.request_start;
+ }
+
+ static base::TimeTicks proxy_resolve_start(const net::LoadTimingInfo& obj) {
+ return obj.proxy_resolve_start;
+ }
+
+ static base::TimeTicks proxy_resolve_end(const net::LoadTimingInfo& obj) {
+ return obj.proxy_resolve_end;
+ }
+
+ static net::LoadTimingInfo::ConnectTiming connect_timing(
+ const net::LoadTimingInfo& obj) {
+ return obj.connect_timing;
+ }
+
+ static base::TimeTicks send_start(const net::LoadTimingInfo& obj) {
+ return obj.send_start;
+ }
+
+ static base::TimeTicks send_end(const net::LoadTimingInfo& obj) {
+ return obj.send_end;
+ }
+
+ static base::TimeTicks receive_headers_end(const net::LoadTimingInfo& obj) {
+ return obj.receive_headers_end;
+ }
+
+ static base::TimeTicks push_start(const net::LoadTimingInfo& obj) {
+ return obj.push_start;
+ }
+
+ static base::TimeTicks push_end(const net::LoadTimingInfo& obj) {
+ return obj.push_end;
+ }
+
+ static bool Read(content::mojom::LoadTimingInfoDataView obj,
+ net::LoadTimingInfo* output);
+};
+
+} // namespace mojo
+
+#endif // CONTENT_PUBLIC_COMMON_LOAD_TIMING_INFO_STRUCT_TRAITS_H_
diff --git a/chromium/content/public/common/manifest.cc b/chromium/content/public/common/manifest.cc
deleted file mode 100644
index ad5211065be..00000000000
--- a/chromium/content/public/common/manifest.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/common/manifest.h"
-
-namespace content {
-
-// We need to provide a value here which is out of the range of a 32-bit integer
-// since otherwise we would not be able to check whether a theme color was valid
-// or not. The simplest way to do this is to simply add one to the maximum
-// possible 32-bit integer.
-const int64_t Manifest::kInvalidOrMissingColor =
- static_cast<int64_t>(std::numeric_limits<int32_t>::max()) + 1;
-const size_t Manifest::kMaxIPCStringLength = 4 * 1024;
-
-Manifest::Icon::Icon() = default;
-
-Manifest::Icon::Icon(const Icon& other) = default;
-
-Manifest::Icon::~Icon() = default;
-
-bool Manifest::Icon::operator==(const Manifest::Icon& other) const {
- return src == other.src && type == other.type && sizes == other.sizes;
-}
-
-Manifest::ShareTarget::ShareTarget() = default;
-
-Manifest::ShareTarget::~ShareTarget() = default;
-
-Manifest::RelatedApplication::RelatedApplication() = default;
-
-Manifest::RelatedApplication::~RelatedApplication() = default;
-
-Manifest::Manifest()
- : display(blink::kWebDisplayModeUndefined),
- orientation(blink::kWebScreenOrientationLockDefault),
- prefer_related_applications(false),
- theme_color(Manifest::kInvalidOrMissingColor),
- background_color(Manifest::kInvalidOrMissingColor) {
- share_target = base::nullopt;
-}
-
-Manifest::Manifest(const Manifest& other) = default;
-
-Manifest::~Manifest() = default;
-
-bool Manifest::IsEmpty() const {
- return name.is_null() && short_name.is_null() && start_url.is_empty() &&
- display == blink::kWebDisplayModeUndefined &&
- orientation == blink::kWebScreenOrientationLockDefault &&
- icons.empty() && !share_target.has_value() &&
- related_applications.empty() && !prefer_related_applications &&
- theme_color == Manifest::kInvalidOrMissingColor &&
- background_color == Manifest::kInvalidOrMissingColor &&
- splash_screen_url.is_empty() && gcm_sender_id.is_null() &&
- scope.is_empty();
-}
-
-} // namespace content
diff --git a/chromium/content/public/common/manifest.h b/chromium/content/public/common/manifest.h
deleted file mode 100644
index e00110ff2e0..00000000000
--- a/chromium/content/public/common/manifest.h
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_MANIFEST_H_
-#define CONTENT_PUBLIC_COMMON_MANIFEST_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <vector>
-
-#include "base/optional.h"
-#include "base/strings/nullable_string16.h"
-#include "base/strings/string16.h"
-#include "content/common/content_export.h"
-#include "third_party/blink/public/platform/modules/screen_orientation/web_screen_orientation_lock_type.h"
-#include "third_party/blink/public/platform/web_display_mode.h"
-#include "ui/gfx/geometry/size.h"
-#include "url/gurl.h"
-
-namespace content {
-
-// The Manifest structure is an internal representation of the Manifest file
-// described in the "Manifest for Web Application" document:
-// http://w3c.github.io/manifest/
-struct CONTENT_EXPORT Manifest {
- // Structure representing an icon as per the Manifest specification, see:
- // http://w3c.github.io/manifest/#dfn-icon-object
- struct CONTENT_EXPORT Icon {
- enum IconPurpose {
- ANY = 0,
- BADGE,
- ICON_PURPOSE_LAST = BADGE,
- };
-
- Icon();
- Icon(const Icon& other);
- ~Icon();
-
- bool operator==(const Icon& other) const;
-
- // MUST be a valid url. If an icon doesn't have a valid URL, it will not be
- // successfully parsed, thus will not be represented in the Manifest.
- GURL src;
-
- // Empty if the parsing failed or the field was not present. The type can be
- // any string and doesn't have to be a valid image MIME type at this point.
- // It is up to the consumer of the object to check if the type matches a
- // supported type.
- base::string16 type;
-
- // Empty if the parsing failed, the field was not present or empty.
- // The special value "any" is represented by gfx::Size(0, 0).
- std::vector<gfx::Size> sizes;
-
- // Empty if the field was not present or not of type "string". Defaults to
- // a vector with a single value, IconPurpose::ANY, for all other parsing
- // exceptions.
- std::vector<IconPurpose> purpose;
- };
-
- // Structure representing how a Web Share target handles an incoming share.
- struct CONTENT_EXPORT ShareTarget {
- ShareTarget();
- ~ShareTarget();
-
- // The URL template that contains placeholders to be replaced with shared
- // data. Empty if the parsing failed.
- GURL url_template;
- };
-
- // Structure representing a related application.
- struct CONTENT_EXPORT RelatedApplication {
- RelatedApplication();
- ~RelatedApplication();
-
- // The platform on which the application can be found. This can be any
- // string, and is interpreted by the consumer of the object. Empty if the
- // parsing failed.
- base::NullableString16 platform;
-
- // URL at which the application can be found. One of |url| and |id| must be
- // present. Empty if the parsing failed or the field was not present.
- GURL url;
-
- // An id which is used to represent the application on the platform. One of
- // |url| and |id| must be present. Empty if the parsing failed or the field
- // was not present.
- base::NullableString16 id;
- };
-
- Manifest();
- Manifest(const Manifest& other);
- ~Manifest();
-
- // Returns whether this Manifest had no attribute set. A newly created
- // Manifest is always empty.
- bool IsEmpty() const;
-
- // Null if the parsing failed or the field was not present.
- base::NullableString16 name;
-
- // Null if the parsing failed or the field was not present.
- base::NullableString16 short_name;
-
- // Empty if the parsing failed or the field was not present.
- GURL start_url;
-
- // Set to WebDisplayModeUndefined if the parsing failed or the field was not
- // present.
- blink::WebDisplayMode display;
-
- // Set to blink::WebScreenOrientationLockDefault if the parsing failed or the
- // field was not present.
- blink::WebScreenOrientationLockType orientation;
-
- // Empty if the parsing failed, the field was not present, empty or all the
- // icons inside the JSON array were invalid.
- std::vector<Icon> icons;
-
- // Null if parsing failed or the field was not present.
- // TODO(constantina): This field is non-standard and part of a Chrome
- // experiment. See:
- // https://github.com/WICG/web-share-target/blob/master/docs/interface.md
- // As such, this field should not be exposed to web contents.
- base::Optional<ShareTarget> share_target;
-
- // Empty if the parsing failed, the field was not present, empty or all the
- // applications inside the array were invalid. The order of the array
- // indicates the priority of the application to use.
- std::vector<RelatedApplication> related_applications;
-
- // A boolean that is used as a hint for the user agent to say that related
- // applications should be preferred over the web application. False if missing
- // or there is a parsing failure.
- bool prefer_related_applications;
-
- // This is a 64 bit integer because we need to represent an error state. The
- // color itself should only be 32 bits long if the value is not
- // kInvalidOrMissingColor and can be safely cast to SkColor if is valid.
- // Set to kInvalidOrMissingColor if parsing failed or field is not
- // present.
- int64_t theme_color;
-
- // This is a 64 bit integer because we need to represent an error state. The
- // color itself should only be 32 bits long if the value is not
- // kInvalidOrMissingColor and can be safely cast to SkColor if is valid.
- // Set to kInvalidOrMissingColor if parsing failed or field is not
- // present.
- int64_t background_color;
-
- // A URL of the HTML splash screen.
- // Empty if the parsing failed or the field was not present.
- GURL splash_screen_url;
-
- // This is a proprietary extension of the web Manifest, double-check that it
- // is okay to use this entry.
- // Null if parsing failed or the field was not present.
- base::NullableString16 gcm_sender_id;
-
- // Empty if the parsing failed or the field was not present.
- GURL scope;
-
- // Maximum length for all the strings inside the Manifest when it is sent over
- // IPC. The renderer process should truncate the strings before sending the
- // Manifest and the browser process must do the same when receiving it.
- static const size_t kMaxIPCStringLength;
-
- // Constant representing an invalid color. Set to a value outside the
- // range of a 32-bit integer.
- static const int64_t kInvalidOrMissingColor;
-};
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_
diff --git a/chromium/content/public/common/manifest.typemap b/chromium/content/public/common/manifest.typemap
deleted file mode 100644
index 4b27a5b76b7..00000000000
--- a/chromium/content/public/common/manifest.typemap
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2017 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-mojom = "//third_party/blink/public/platform/modules/manifest/manifest.mojom"
-public_headers = [ "//content/public/common/manifest.h" ]
-traits_headers = [ "//content/public/common/manifest_struct_traits.h" ]
-sources = [
- # Because this mojom is effectively linked as part of content/public/common,
- # and it cannot express a dependency on that target; yet manifest.h belongs to
- # that target, so gn check will complain about its inclusion by the traits
- # given the lack of explicit dependency. We work around this awkward situation
- # by claiming that manifest.h is part of the mojom sources. As long as
- # everything is still effectively part of content/public/common, this is fine.
- "//content/public/common/manifest.h",
- "//content/public/common/manifest_struct_traits.cc",
- "//content/public/common/manifest_struct_traits.h",
-]
-deps = [
- "//ui/gfx/geometry/mojo:struct_traits",
-]
-type_mappings = [
- "blink.mojom.Manifest=content::Manifest[nullable_is_same_type]",
- "blink.mojom.ManifestIcon=content::Manifest::Icon",
- "blink.mojom.ManifestRelatedApplication=content::Manifest::RelatedApplication",
- "blink.mojom.ManifestShareTarget=content::Manifest::ShareTarget",
-]
diff --git a/chromium/content/public/common/manifest_share_target_util.cc b/chromium/content/public/common/manifest_share_target_util.cc
deleted file mode 100644
index ada0a39b654..00000000000
--- a/chromium/content/public/common/manifest_share_target_util.cc
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/common/manifest_share_target_util.h"
-
-#include <map>
-
-#include "base/strings/strcat.h"
-#include "base/strings/string_util.h"
-#include "net/base/escape.h"
-#include "url/gurl.h"
-
-namespace content {
-namespace {
-
-// Determines whether a character is allowed in a URL template placeholder.
-bool IsIdentifier(char c) {
- return base::IsAsciiAlpha(c) || base::IsAsciiDigit(c) || c == '-' || c == '_';
-}
-
-// Returns to |out| the result of running the "replace placeholders"
-// algorithm on |url_template|. The algorithm is specified at
-// https://wicg.github.io/web-share-target/#dfn-replace-placeholders
-// Does not copy any string data. The resulting vector can be concatenated
-// together with base::StrCat to produce the final string.
-bool ReplacePlaceholders(base::StringPiece template_string,
- const std::map<base::StringPiece, std::string>& data,
- std::vector<base::StringPiece>* out) {
- DCHECK(out);
-
- bool last_saw_open = false;
- size_t start_index_to_copy = 0;
- for (size_t i = 0; i < template_string.size(); ++i) {
- if (last_saw_open) {
- if (template_string[i] == '}') {
- base::StringPiece placeholder = template_string.substr(
- start_index_to_copy + 1, i - 1 - start_index_to_copy);
- auto it = data.find(placeholder);
- if (it != data.end()) {
- // Replace the placeholder text with the parameter value.
- out->push_back(it->second);
- }
-
- last_saw_open = false;
- start_index_to_copy = i + 1;
- } else if (!IsIdentifier(template_string[i])) {
- // Error: Non-identifier character seen after open.
- return false;
- }
- } else {
- if (template_string[i] == '}') {
- // Error: Saw close, with no corresponding open.
- return false;
- } else if (template_string[i] == '{') {
- out->push_back(template_string.substr(start_index_to_copy,
- i - start_index_to_copy));
-
- last_saw_open = true;
- start_index_to_copy = i;
- }
- }
- }
- if (last_saw_open) {
- // Error: Saw open that was never closed.
- return false;
- }
- out->push_back(template_string.substr(
- start_index_to_copy, template_string.size() - start_index_to_copy));
- return true;
-}
-
-} // namespace
-
-bool ValidateWebShareUrlTemplate(const GURL& url_template) {
- return ReplaceWebShareUrlPlaceholders(url_template, /*title=*/"", /*text=*/"",
- /*share_url=*/GURL(),
- /*url_template_filled=*/nullptr);
-}
-
-bool ReplaceWebShareUrlPlaceholders(const GURL& url_template,
- base::StringPiece title,
- base::StringPiece text,
- const GURL& share_url,
- GURL* url_template_filled) {
- constexpr char kTitlePlaceholder[] = "title";
- constexpr char kTextPlaceholder[] = "text";
- constexpr char kUrlPlaceholder[] = "url";
- std::map<base::StringPiece, std::string> replacements;
- replacements[kTitlePlaceholder] = net::EscapeQueryParamValue(title, false);
- replacements[kTextPlaceholder] = net::EscapeQueryParamValue(text, false);
- replacements[kUrlPlaceholder] =
- net::EscapeQueryParamValue(share_url.spec(), false);
-
- std::vector<base::StringPiece> new_query_split;
- std::vector<base::StringPiece> new_ref_split;
- if (!ReplacePlaceholders(url_template.query_piece(), replacements,
- &new_query_split) ||
- !ReplacePlaceholders(url_template.ref_piece(), replacements,
- &new_ref_split)) {
- return false;
- }
-
- // Early-return optimization, since ReplaceWebShareUrlPlaceholders() is called
- // at manifest parse time just to get the success boolean, ignoring the
- // result.
- if (!url_template_filled)
- return true;
-
- // Ensure that the replacements are not deleted prior to
- // GURL::ReplaceComponents() being called. GURL::Replacements::SetQueryStr()
- // does not make a copy.
- std::string new_query = base::StrCat(new_query_split);
- std::string new_ref = base::StrCat(new_ref_split);
-
- // Check whether |url_template| has a query in order to preserve the '?' in
- // a URL with an empty query. e.g. http://www.google.com/?
- GURL::Replacements url_replacements;
- if (url_template.has_query())
- url_replacements.SetQueryStr(new_query);
- if (url_template.has_ref())
- url_replacements.SetRefStr(new_ref);
- *url_template_filled = url_template.ReplaceComponents(url_replacements);
- return true;
-}
-
-} // namespace content
diff --git a/chromium/content/public/common/manifest_share_target_util.h b/chromium/content/public/common/manifest_share_target_util.h
deleted file mode 100644
index ee46b28b363..00000000000
--- a/chromium/content/public/common/manifest_share_target_util.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_MANIFEST_SHARE_TARGET_UTIL_H_
-#define CONTENT_PUBLIC_COMMON_MANIFEST_SHARE_TARGET_UTIL_H_
-
-#include <string>
-
-#include "base/strings/string_piece.h"
-#include "content/common/content_export.h"
-
-class GURL;
-
-namespace content {
-
-// Determines whether |url_template| is valid; that is, whether
-// ReplaceWebShareUrlPlaceholders() would succeed for the given template.
-CONTENT_EXPORT bool ValidateWebShareUrlTemplate(const GURL& url_template);
-
-// Writes to |url_template_filled|, a copy of |url_template| with all
-// instances of "{title}", "{text}", and "{url}" in the query and fragment
-// parts of the URL replaced with |title|, |text|, and |url| respectively.
-// Replaces instances of "{X}" where "X" is any string besides "title",
-// "text", and "url", with an empty string, for forwards compatibility.
-// Returns false, if there are badly nested placeholders.
-// This includes any case in which two "{" occur before a "}", or a "}"
-// occurs with no preceding "{".
-CONTENT_EXPORT bool ReplaceWebShareUrlPlaceholders(const GURL& url_template,
- base::StringPiece title,
- base::StringPiece text,
- const GURL& share_url,
- GURL* url_template_filled);
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_MANIFEST_SHARE_TARGET_UTIL_H_
diff --git a/chromium/content/public/common/manifest_struct_traits.cc b/chromium/content/public/common/manifest_struct_traits.cc
deleted file mode 100644
index 2dfe11bc1df..00000000000
--- a/chromium/content/public/common/manifest_struct_traits.cc
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/common/manifest_struct_traits.h"
-
-#include "mojo/public/cpp/base/string16_mojom_traits.h"
-#include "third_party/blink/public/platform/modules/screen_orientation/web_screen_orientation_enum_traits.h"
-#include "third_party/blink/public/platform/web_display_mode_struct_traits.h"
-#include "ui/gfx/geometry/mojo/geometry_struct_traits.h"
-#include "url/mojom/url_gurl_mojom_traits.h"
-
-namespace mojo {
-namespace {
-
-bool ValidateColor(int64_t color) {
- return color >= std::numeric_limits<int32_t>::min() ||
- color <= std::numeric_limits<int32_t>::max() ||
- color == content::Manifest::kInvalidOrMissingColor;
-}
-
-// A wrapper around base::Optional<base::string16> so a custom StructTraits
-// specialization can enforce maximum string length.
-struct TruncatedString16 {
- base::Optional<base::string16> string;
-};
-
-} // namespace
-
-template <>
-struct StructTraits<mojo_base::mojom::String16DataView, TruncatedString16> {
- static void SetToNull(TruncatedString16* output) { output->string.reset(); }
-
- static bool Read(mojo_base::mojom::String16DataView input,
- TruncatedString16* output) {
- if (input.is_null()) {
- output->string.reset();
- return true;
- }
- mojo::ArrayDataView<uint16_t> buffer_view;
- input.GetDataDataView(&buffer_view);
- if (buffer_view.size() > content::Manifest::kMaxIPCStringLength)
- return false;
-
- output->string.emplace();
- return StructTraits<mojo_base::mojom::String16DataView,
- base::string16>::Read(input, &output->string.value());
- }
-};
-
-bool StructTraits<blink::mojom::ManifestDataView, content::Manifest>::Read(
- blink::mojom::ManifestDataView data,
- content::Manifest* out) {
- TruncatedString16 string;
- if (!data.ReadName(&string))
- return false;
- out->name = base::NullableString16(std::move(string.string));
-
- if (!data.ReadShortName(&string))
- return false;
- out->short_name = base::NullableString16(std::move(string.string));
-
- if (!data.ReadGcmSenderId(&string))
- return false;
- out->gcm_sender_id = base::NullableString16(std::move(string.string));
-
- if (!data.ReadStartUrl(&out->start_url))
- return false;
-
- if (!data.ReadIcons(&out->icons))
- return false;
-
- if (!data.ReadShareTarget(&out->share_target))
- return false;
-
- if (!data.ReadRelatedApplications(&out->related_applications))
- return false;
-
- out->prefer_related_applications = data.prefer_related_applications();
- out->theme_color = data.theme_color();
- if (!ValidateColor(out->theme_color))
- return false;
-
- out->background_color = data.background_color();
- if (!ValidateColor(out->background_color))
- return false;
-
- if (!data.ReadSplashScreenUrl(&out->splash_screen_url))
- return false;
-
- if (!data.ReadDisplay(&out->display))
- return false;
-
- if (!data.ReadOrientation(&out->orientation))
- return false;
-
- if (!data.ReadScope(&out->scope))
- return false;
-
- return true;
-}
-
-bool StructTraits<blink::mojom::ManifestIconDataView, content::Manifest::Icon>::
- Read(blink::mojom::ManifestIconDataView data,
- content::Manifest::Icon* out) {
- if (!data.ReadSrc(&out->src))
- return false;
-
- TruncatedString16 string;
- if (!data.ReadType(&string))
- return false;
-
- if (!string.string)
- return false;
-
- out->type = *std::move(string.string);
-
- if (!data.ReadSizes(&out->sizes))
- return false;
-
- if (!data.ReadPurpose(&out->purpose))
- return false;
-
- return true;
-}
-
-bool StructTraits<blink::mojom::ManifestRelatedApplicationDataView,
- content::Manifest::RelatedApplication>::
- Read(blink::mojom::ManifestRelatedApplicationDataView data,
- content::Manifest::RelatedApplication* out) {
- TruncatedString16 string;
- if (!data.ReadPlatform(&string))
- return false;
- out->platform = base::NullableString16(std::move(string.string));
-
- if (!data.ReadUrl(&out->url))
- return false;
-
- if (!data.ReadId(&string))
- return false;
- out->id = base::NullableString16(std::move(string.string));
-
- return !(out->url.is_empty() && out->id.is_null());
-}
-
-bool StructTraits<blink::mojom::ManifestShareTargetDataView,
- content::Manifest::ShareTarget>::
- Read(blink::mojom::ManifestShareTargetDataView data,
- content::Manifest::ShareTarget* out) {
- return data.ReadUrlTemplate(&out->url_template);
-}
-
-} // namespace mojo
diff --git a/chromium/content/public/common/manifest_struct_traits.h b/chromium/content/public/common/manifest_struct_traits.h
index f816251fb1d..ee92dc4e34c 100644
--- a/chromium/content/public/common/manifest_struct_traits.h
+++ b/chromium/content/public/common/manifest_struct_traits.h
@@ -63,12 +63,20 @@ struct StructTraits<blink::mojom::ManifestDataView, content::Manifest> {
return m.orientation;
}
- static int64_t theme_color(const content::Manifest& m) {
- return m.theme_color;
+ static bool has_theme_color(const content::Manifest& m) {
+ return m.theme_color.has_value();
}
- static int64_t background_color(const content::Manifest& m) {
- return m.background_color;
+ static uint32_t theme_color(const content::Manifest& m) {
+ return m.theme_color.value_or(0);
+ }
+
+ static bool has_background_color(const content::Manifest& m) {
+ return m.background_color.has_value();
+ }
+
+ static uint32_t background_color(const content::Manifest& m) {
+ return m.background_color.value_or(0);
}
static const GURL& splash_screen_url(const content::Manifest& m) {
diff --git a/chromium/content/public/common/manifest_util.h b/chromium/content/public/common/manifest_util.h
index 1ebe834a3e5..f6c70ba32b0 100644
--- a/chromium/content/public/common/manifest_util.h
+++ b/chromium/content/public/common/manifest_util.h
@@ -8,8 +8,8 @@
#include <string>
#include "content/common/content_export.h"
-#include "third_party/blink/public/platform/modules/screen_orientation/web_screen_orientation_lock_type.h"
-#include "third_party/blink/public/platform/web_display_mode.h"
+#include "third_party/blink/public/common/manifest/web_display_mode.h"
+#include "third_party/blink/public/common/screen_orientation/web_screen_orientation_lock_type.h"
namespace content {
diff --git a/chromium/content/public/common/media_stream_request.cc b/chromium/content/public/common/media_stream_request.cc
index 47a1085fd65..d2e688e67d3 100644
--- a/chromium/content/public/common/media_stream_request.cc
+++ b/chromium/content/public/common/media_stream_request.cc
@@ -22,8 +22,7 @@ bool IsVideoMediaType(MediaStreamType type) {
}
bool IsScreenCaptureMediaType(MediaStreamType type) {
- return (type == MEDIA_TAB_AUDIO_CAPTURE ||
- type == MEDIA_TAB_VIDEO_CAPTURE ||
+ return (type == MEDIA_TAB_AUDIO_CAPTURE || type == MEDIA_TAB_VIDEO_CAPTURE ||
type == MEDIA_DESKTOP_AUDIO_CAPTURE ||
type == MEDIA_DESKTOP_VIDEO_CAPTURE);
}
@@ -40,21 +39,19 @@ MediaStreamDevice::MediaStreamDevice(MediaStreamType type,
: type(type),
id(id),
video_facing(media::MEDIA_VIDEO_FACING_NONE),
- name(name) {
-#if defined(OS_ANDROID)
- if (name.find("front") != std::string::npos) {
- video_facing = media::MEDIA_VIDEO_FACING_USER;
- } else if (name.find("back") != std::string::npos) {
- video_facing = media::MEDIA_VIDEO_FACING_ENVIRONMENT;
- }
-#endif
-}
-
-MediaStreamDevice::MediaStreamDevice(MediaStreamType type,
- const std::string& id,
- const std::string& name,
- media::VideoFacingMode facing)
- : type(type), id(id), video_facing(facing), name(name) {}
+ name(name) {}
+
+MediaStreamDevice::MediaStreamDevice(
+ MediaStreamType type,
+ const std::string& id,
+ const std::string& name,
+ media::VideoFacingMode facing,
+ const base::Optional<std::string>& group_id)
+ : type(type),
+ id(id),
+ video_facing(facing),
+ group_id(group_id),
+ name(name) {}
MediaStreamDevice::MediaStreamDevice(MediaStreamType type,
const std::string& id,
@@ -69,7 +66,6 @@ MediaStreamDevice::MediaStreamDevice(MediaStreamType type,
input(media::AudioParameters::AUDIO_FAKE,
static_cast<media::ChannelLayout>(channel_layout),
sample_rate,
- 16,
frames_per_buffer) {
DCHECK(input.IsValid());
}
diff --git a/chromium/content/public/common/media_stream_request.h b/chromium/content/public/common/media_stream_request.h
index fedfe072de9..9ea6103ed5c 100644
--- a/chromium/content/public/common/media_stream_request.h
+++ b/chromium/content/public/common/media_stream_request.h
@@ -91,10 +91,12 @@ struct CONTENT_EXPORT MediaStreamDevice {
const std::string& id,
const std::string& name);
- MediaStreamDevice(MediaStreamType type,
- const std::string& id,
- const std::string& name,
- media::VideoFacingMode facing);
+ MediaStreamDevice(
+ MediaStreamType type,
+ const std::string& id,
+ const std::string& name,
+ media::VideoFacingMode facing,
+ const base::Optional<std::string>& group_id = base::nullopt);
MediaStreamDevice(MediaStreamType type,
const std::string& id,
@@ -118,6 +120,9 @@ struct CONTENT_EXPORT MediaStreamDevice {
// The facing mode for video capture device.
media::VideoFacingMode video_facing;
+ // The device's group ID.
+ base::Optional<std::string> group_id;
+
// The device id of a matched output device if any (otherwise empty).
// Only applicable to audio devices.
base::Optional<std::string> matched_output_device_id;
diff --git a/chromium/content/public/common/mojo_channel_switches.cc b/chromium/content/public/common/mojo_channel_switches.cc
deleted file mode 100644
index 9cd2c3c1bb5..00000000000
--- a/chromium/content/public/common/mojo_channel_switches.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/common/mojo_channel_switches.h"
-
-namespace switches {
-
-// The token to use to construct the message pipe for a service in a child
-// process.
-const char kServiceRequestChannelToken[] = "service-request-channel-token";
-
-} // namespace switches
diff --git a/chromium/content/public/common/mojo_channel_switches.h b/chromium/content/public/common/mojo_channel_switches.h
deleted file mode 100644
index 954a86f691c..00000000000
--- a/chromium/content/public/common/mojo_channel_switches.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_MOJO_CHANNEL_SWITCHES_H_
-#define CONTENT_PUBLIC_COMMON_MOJO_CHANNEL_SWITCHES_H_
-
-#include "content/common/content_export.h"
-
-namespace switches {
-
-CONTENT_EXPORT extern const char kServiceRequestChannelToken[];
-
-} // namespace switches
-
-#endif // CONTENT_PUBLIC_COMMON_MOJO_CHANNEL_SWITCHES_H_
diff --git a/chromium/content/public/common/origin_trial_policy.cc b/chromium/content/public/common/origin_trial_policy.cc
deleted file mode 100644
index 76472c94b29..00000000000
--- a/chromium/content/public/common/origin_trial_policy.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/common/origin_trial_policy.h"
-
-namespace content {
-
-base::StringPiece OriginTrialPolicy::GetPublicKey() const {
- return base::StringPiece();
-}
-
-bool OriginTrialPolicy::IsFeatureDisabled(base::StringPiece feature) const {
- return false;
-}
-
-bool OriginTrialPolicy::IsTokenDisabled(
- base::StringPiece token_signature) const {
- return false;
-}
-
-} // namespace content
diff --git a/chromium/content/public/common/origin_trial_policy.h b/chromium/content/public/common/origin_trial_policy.h
deleted file mode 100644
index 5368e6dea9b..00000000000
--- a/chromium/content/public/common/origin_trial_policy.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_ORIGIN_TRIAL_POLICY_H_
-#define CONTENT_PUBLIC_COMMON_ORIGIN_TRIAL_POLICY_H_
-
-#include "base/strings/string_piece.h"
-#include "content/common/content_export.h"
-
-namespace content {
-
-class CONTENT_EXPORT OriginTrialPolicy {
- public:
- virtual ~OriginTrialPolicy() = default;
-
- virtual void Initialize() {}
- virtual base::StringPiece GetPublicKey() const;
- virtual bool IsFeatureDisabled(base::StringPiece feature) const;
- virtual bool IsTokenDisabled(base::StringPiece token_signature) const;
-};
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_ORIGIN_TRIAL_POLICY_H_
diff --git a/chromium/content/public/common/page_state.h b/chromium/content/public/common/page_state.h
index 6cf6c09116e..c630e6bcf30 100644
--- a/chromium/content/public/common/page_state.h
+++ b/chromium/content/public/common/page_state.h
@@ -53,20 +53,18 @@ class CONTENT_EXPORT PageState {
PageState RemoveScrollOffset() const;
PageState RemoveReferrer() const;
+ // Support DCHECK_EQ(a, b), etc.
+ bool operator==(const PageState& other) const { return this->Equals(other); }
+ bool operator!=(const PageState& other) const {
+ return !(this->Equals(other));
+ }
+
private:
PageState(const std::string& data);
std::string data_;
};
-// Support DCHECK_EQ(a, b), etc.
-inline bool operator==(const PageState& a, const PageState& b) {
- return a.Equals(b);
-}
-inline bool operator!=(const PageState& a, const PageState& b) {
- return !(a == b);
-}
-
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_PAGE_STATE_H_
diff --git a/chromium/content/public/common/platform_notification_data.h b/chromium/content/public/common/platform_notification_data.h
index 74049011c9b..c6bd563401e 100644
--- a/chromium/content/public/common/platform_notification_data.h
+++ b/chromium/content/public/common/platform_notification_data.h
@@ -56,10 +56,6 @@ struct CONTENT_EXPORT PlatformNotificationData {
PlatformNotificationData(const PlatformNotificationData& other);
~PlatformNotificationData();
- // The maximum size of developer-provided data to be stored in the |data|
- // property of this structure.
- static const size_t kMaximumDeveloperDataSize = 1024 * 1024;
-
enum Direction {
DIRECTION_LEFT_TO_RIGHT,
DIRECTION_RIGHT_TO_LEFT,
diff --git a/chromium/content/public/common/presentation_info.cc b/chromium/content/public/common/presentation_info.cc
deleted file mode 100644
index 09cff09e76b..00000000000
--- a/chromium/content/public/common/presentation_info.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/common/presentation_info.h"
-
-namespace content {
-
-PresentationInfo::PresentationInfo(const GURL& presentation_url,
- const std::string& presentation_id)
- : presentation_url(presentation_url), presentation_id(presentation_id) {}
-
-PresentationInfo::~PresentationInfo() {}
-
-PresentationError::PresentationError()
- : error_type(PRESENTATION_ERROR_UNKNOWN) {}
-
-PresentationError::PresentationError(PresentationErrorType error_type,
- const std::string& message)
- : error_type(error_type), message(message) {}
-
-PresentationError::~PresentationError() {}
-
-} // namespace content
diff --git a/chromium/content/public/common/presentation_info.h b/chromium/content/public/common/presentation_info.h
deleted file mode 100644
index 5adb0f54f66..00000000000
--- a/chromium/content/public/common/presentation_info.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_PRESENTATION_INFO_H_
-#define CONTENT_PUBLIC_COMMON_PRESENTATION_INFO_H_
-
-#include <string>
-
-#include "content/common/content_export.h"
-#include "url/gurl.h"
-
-namespace content {
-
-enum PresentationConnectionState {
- PRESENTATION_CONNECTION_STATE_CONNECTING,
- PRESENTATION_CONNECTION_STATE_CONNECTED,
- PRESENTATION_CONNECTION_STATE_CLOSED,
- PRESENTATION_CONNECTION_STATE_TERMINATED
-};
-
-// TODO(imcheng): Use WENT_AWAY for 1-UA mode when it is implemented
-// (crbug.com/513859).
-enum PresentationConnectionCloseReason {
- PRESENTATION_CONNECTION_CLOSE_REASON_CONNECTION_ERROR,
- PRESENTATION_CONNECTION_CLOSE_REASON_CLOSED,
- PRESENTATION_CONNECTION_CLOSE_REASON_WENT_AWAY
-};
-
-// Represents a presentation that has been established via either
-// browser actions or Presentation API.
-struct CONTENT_EXPORT PresentationInfo {
- PresentationInfo() = default;
- PresentationInfo(const GURL& presentation_url,
- const std::string& presentation_id);
- ~PresentationInfo();
-
- static constexpr size_t kMaxIdLength = 256;
-
- GURL presentation_url;
- std::string presentation_id;
-};
-
-// Possible reasons why an attempt to create a presentation failed.
-enum PresentationErrorType {
- PRESENTATION_ERROR_NO_AVAILABLE_SCREENS,
- PRESENTATION_ERROR_PRESENTATION_REQUEST_CANCELLED,
- PRESENTATION_ERROR_NO_PRESENTATION_FOUND,
- PRESENTATION_ERROR_PREVIOUS_START_IN_PROGRESS,
- PRESENTATION_ERROR_UNKNOWN,
-};
-
-// Struct returned when an attempt to create a presentation fails.
-// Defaults to PRESENTATION_ERROR_UNKNOWN with an empty message.
-struct CONTENT_EXPORT PresentationError {
- PresentationError();
- PresentationError(PresentationErrorType error_type,
- const std::string& message);
- ~PresentationError();
-
- static constexpr size_t kMaxMessageLength = 256;
-
- PresentationErrorType error_type;
- std::string message;
-};
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_PRESENTATION_INFO_H_
diff --git a/chromium/content/public/common/resource_load_info.mojom b/chromium/content/public/common/resource_load_info.mojom
index c6926fdacaa..9305cbaf6e0 100644
--- a/chromium/content/public/common/resource_load_info.mojom
+++ b/chromium/content/public/common/resource_load_info.mojom
@@ -4,11 +4,34 @@
module content.mojom;
+import "content/public/common/load_timing_info.mojom";
import "content/public/common/resource_type.mojom";
-import "mojo/public/mojom/base/time.mojom";
import "net/interfaces/ip_address.mojom";
+import "services/network/public/mojom/network_param.mojom";
import "url/mojom/url.mojom";
+// Network related information reported for loads and redirects.
+struct CommonNetworkInfo {
+ // True if the request accessed the network in the process of retrieving data.
+ bool network_accessed;
+
+ // True if loading this resource always requires accessing the network, either
+ // because it should always be revalidated or because it should not be cached.
+ bool always_access_network;
+
+ // The host IP and port of the response.
+ network.mojom.HostPortPair? ip_port_pair;
+};
+
+// Information for a redirect.
+struct RedirectInfo {
+ // The URL after the redirect.
+ url.mojom.Url url;
+
+ // Various network related information.
+ CommonNetworkInfo network_info;
+};
+
// Information pertaining to resource loading.
// This will be passed to ResourceResponse callback methods.
struct ResourceLoadInfo {
@@ -34,18 +57,29 @@ struct ResourceLoadInfo {
// The mime type.
string mime_type;
- // The host IP.
- net.interfaces.IPAddress? ip;
-
// True if the response was fetched from the network cache.
bool was_cached;
- // True if the request accessed the network in the process of retrieving data.
- bool network_accessed;
+ // Various network related information.
+ CommonNetworkInfo network_info;
// The network error code, net::OK if no error happened.
int32 net_error;
- // The time at which the request was started.
- mojo_base.mojom.TimeTicks request_start;
+ // The timing info.
+ content.mojom.LoadTimingInfo load_timing_info;
+
+ // The size of the response body before removing any content encodings.
+ // Does not include redirects or sub-requests issued at lower levels (range
+ // requests or auth). Does include bytes from the cache.
+ int64 raw_body_bytes;
+
+ // The total amount of data received from network after SSL decoding and proxy
+ // handling. Pertains only to the last request, i.e. reset on redirects, but
+ // not reset when multiple roundtrips are used for range requests or auth.
+ int64 total_received_bytes;
+
+ // The list of redirects that led to this resource load. Empty if there were
+ // no redirects.
+ array<RedirectInfo> redirect_info_chain;
};
diff --git a/chromium/content/public/common/result_codes.h b/chromium/content/public/common/result_codes.h
index cd66a5bdc42..a0b0b7482e9 100644
--- a/chromium/content/public/common/result_codes.h
+++ b/chromium/content/public/common/result_codes.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_PUBLIC_COMMON_RESULT_CODES_H_
#define CONTENT_PUBLIC_COMMON_RESULT_CODES_H_
+#include "services/service_manager/embedder/result_codes.h"
+
namespace content {
// This file consolidates all the return codes for the browser and renderer
@@ -28,11 +30,10 @@ namespace content {
// TODO(wfh): Break the dependency so it is possible to add more values.
enum ResultCode {
- // Process terminated normally.
- RESULT_CODE_NORMAL_EXIT,
+ RESULT_CODE_CONTENT_START = service_manager::RESULT_CODE_LAST_CODE,
// Process was killed by user or system.
- RESULT_CODE_KILLED,
+ RESULT_CODE_KILLED = RESULT_CODE_CONTENT_START,
// Process hung.
RESULT_CODE_HUNG,
diff --git a/chromium/content/public/common/sandboxed_process_launcher_delegate.cc b/chromium/content/public/common/sandboxed_process_launcher_delegate.cc
index 2574f49e44b..1b3d27134ee 100644
--- a/chromium/content/public/common/sandboxed_process_launcher_delegate.cc
+++ b/chromium/content/public/common/sandboxed_process_launcher_delegate.cc
@@ -5,11 +5,7 @@
#include "content/public/common/sandboxed_process_launcher_delegate.h"
#include "build/build_config.h"
-#include "content/public/common/zygote_buildflags.h"
-
-#if BUILDFLAG(USE_ZYGOTE_HANDLE)
-#include "content/public/common/zygote_handle.h"
-#endif
+#include "services/service_manager/zygote/common/zygote_buildflags.h"
namespace content {
@@ -37,7 +33,7 @@ bool SandboxedProcessLauncherDelegate::ShouldLaunchElevated() {
#endif // defined(OS_WIN)
#if BUILDFLAG(USE_ZYGOTE_HANDLE)
-ZygoteHandle SandboxedProcessLauncherDelegate::GetZygote() {
+service_manager::ZygoteHandle SandboxedProcessLauncherDelegate::GetZygote() {
return nullptr;
}
#endif // BUILDFLAG(USE_ZYGOTE_HANDLE)
diff --git a/chromium/content/public/common/sandboxed_process_launcher_delegate.h b/chromium/content/public/common/sandboxed_process_launcher_delegate.h
index 80043c88767..644e461607c 100644
--- a/chromium/content/public/common/sandboxed_process_launcher_delegate.h
+++ b/chromium/content/public/common/sandboxed_process_launcher_delegate.h
@@ -10,12 +10,12 @@
#include "base/process/process.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
-#include "content/public/common/zygote_buildflags.h"
#include "services/service_manager/sandbox/sandbox_delegate.h"
#include "services/service_manager/sandbox/sandbox_type.h"
+#include "services/service_manager/zygote/common/zygote_buildflags.h"
#if BUILDFLAG(USE_ZYGOTE_HANDLE)
-#include "content/public/common/zygote_handle.h"
+#include "services/service_manager/zygote/common/zygote_handle.h" // nogncheck
#endif // BUILDFLAG(USE_ZYGOTE_HANDLE)
namespace content {
@@ -45,7 +45,7 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate
// Returns the zygote used to launch the process.
// NOTE: For now Chrome always uses the same zygote for performance reasons.
// http://crbug.com/569191
- virtual ZygoteHandle GetZygote();
+ virtual service_manager::ZygoteHandle GetZygote();
#endif // BUILDFLAG(USE_ZYGOTE_HANDLE)
#if defined(OS_POSIX)
diff --git a/chromium/content/public/common/send_zygote_child_ping_linux.h b/chromium/content/public/common/send_zygote_child_ping_linux.h
deleted file mode 100644
index ae971a1b290..00000000000
--- a/chromium/content/public/common/send_zygote_child_ping_linux.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_SEND_ZYGOTE_CHILD_PING_LINUX_H_
-#define CONTENT_PUBLIC_COMMON_SEND_ZYGOTE_CHILD_PING_LINUX_H_
-
-#include "content/common/content_export.h"
-
-namespace content {
-
-// Sends a zygote child "ping" message to browser process via socket |fd|.
-// Returns true on success.
-CONTENT_EXPORT bool SendZygoteChildPing(int fd);
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_SEND_ZYGOTE_CHILD_PING_LINUX_H_
diff --git a/chromium/content/public/common/speech_recognition_error.h b/chromium/content/public/common/speech_recognition_error.h
index 7456a43f204..34aa16de1c2 100644
--- a/chromium/content/public/common/speech_recognition_error.h
+++ b/chromium/content/public/common/speech_recognition_error.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_
#define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_
+#include "content/common/content_export.h"
+
namespace content {
// A Java counterpart will be generated for this enum.
diff --git a/chromium/content/public/common/speech_recognition_error.mojom b/chromium/content/public/common/speech_recognition_error.mojom
new file mode 100644
index 00000000000..31f28a46d87
--- /dev/null
+++ b/chromium/content/public/common/speech_recognition_error.mojom
@@ -0,0 +1,34 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module content.mojom;
+
+// TODO(adithyas): Update users of content::SpeechRecognitionErrorCode to use
+// this instead, then remove content::SpeechRecognitionErrorCode.
+enum SpeechRecognitionErrorCode {
+ kNone,
+ kNoSpeech,
+ kAborted,
+ kAudioCapture,
+ kNetwork,
+ kNotAllowed,
+ kServiceNotAllowed,
+ kBadGrammar,
+ kLanguageNotSupported,
+ kNoMatch
+};
+
+// TODO(adithyas): Update users of content::SpeechAudioErrorDetails to use
+// this instead, then remove content::SpeechAudioErrorDetails.
+enum SpeechAudioErrorDetails {
+ kNone,
+ kNoMic
+};
+
+// TODO(adithyas): Update users of content::SpeechRecognitionError to use
+// this instead, then remove content::SpeechRecognitionError.
+struct SpeechRecognitionError {
+ content.mojom.SpeechRecognitionErrorCode code;
+ content.mojom.SpeechAudioErrorDetails details;
+};
diff --git a/chromium/content/public/common/speech_recognition_error.typemap b/chromium/content/public/common/speech_recognition_error.typemap
new file mode 100644
index 00000000000..4b99fa73245
--- /dev/null
+++ b/chromium/content/public/common/speech_recognition_error.typemap
@@ -0,0 +1,14 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+mojom = "//content/public/common/speech_recognition_error.mojom"
+public_headers = [ "//content/public/common/speech_recognition_error.h" ]
+traits_headers =
+ [ "//content/public/common/speech_recognition_error_struct_traits.h" ]
+sources = [
+ "//content/public/common/speech_recognition_error_struct_traits.cc",
+]
+deps = []
+type_mappings =
+ [ "content.mojom.SpeechRecognitionError=content::SpeechRecognitionError" ]
diff --git a/chromium/content/public/common/speech_recognition_error_struct_traits.cc b/chromium/content/public/common/speech_recognition_error_struct_traits.cc
new file mode 100644
index 00000000000..19720639dd1
--- /dev/null
+++ b/chromium/content/public/common/speech_recognition_error_struct_traits.cc
@@ -0,0 +1,22 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/common/speech_recognition_error_struct_traits.h"
+
+namespace mojo {
+
+bool StructTraits<content::mojom::SpeechRecognitionErrorDataView,
+ content::SpeechRecognitionError>::
+ Read(content::mojom::SpeechRecognitionErrorDataView data,
+ content::SpeechRecognitionError* out) {
+ if (!data.ReadCode(&out->code)) {
+ return false;
+ }
+ if (!data.ReadDetails(&out->details)) {
+ return false;
+ }
+ return true;
+}
+
+} // namespace mojo
diff --git a/chromium/content/public/common/speech_recognition_error_struct_traits.h b/chromium/content/public/common/speech_recognition_error_struct_traits.h
new file mode 100644
index 00000000000..c863e5a698b
--- /dev/null
+++ b/chromium/content/public/common/speech_recognition_error_struct_traits.h
@@ -0,0 +1,152 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_STRUCT_TRAITS_H_
+#define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_STRUCT_TRAITS_H_
+
+#include "content/public/common/speech_recognition_error.h"
+#include "content/public/common/speech_recognition_error.mojom.h"
+
+namespace mojo {
+
+template <>
+struct EnumTraits<content::mojom::SpeechRecognitionErrorCode,
+ content::SpeechRecognitionErrorCode> {
+ static content::mojom::SpeechRecognitionErrorCode ToMojom(
+ content::SpeechRecognitionErrorCode input) {
+ switch (input) {
+ case content::SpeechRecognitionErrorCode::SPEECH_RECOGNITION_ERROR_NONE:
+ return content::mojom::SpeechRecognitionErrorCode::kNone;
+ case content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_NO_SPEECH:
+ return content::mojom::SpeechRecognitionErrorCode::kNoSpeech;
+ case content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_ABORTED:
+ return content::mojom::SpeechRecognitionErrorCode::kAborted;
+ case content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE:
+ return content::mojom::SpeechRecognitionErrorCode::kAudioCapture;
+ case content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_NETWORK:
+ return content::mojom::SpeechRecognitionErrorCode::kNetwork;
+ case content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_NOT_ALLOWED:
+ return content::mojom::SpeechRecognitionErrorCode::kNotAllowed;
+ case content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_SERVICE_NOT_ALLOWED:
+ return content::mojom::SpeechRecognitionErrorCode::kServiceNotAllowed;
+ case content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR:
+ return content::mojom::SpeechRecognitionErrorCode::kBadGrammar;
+ case content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_LANGUAGE_NOT_SUPPORTED:
+ return content::mojom::SpeechRecognitionErrorCode::
+ kLanguageNotSupported;
+ case content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_NO_MATCH:
+ return content::mojom::SpeechRecognitionErrorCode::kNoMatch;
+ }
+ NOTREACHED();
+ return content::mojom::SpeechRecognitionErrorCode::kNoMatch;
+ }
+
+ static bool FromMojom(content::mojom::SpeechRecognitionErrorCode input,
+ content::SpeechRecognitionErrorCode* output) {
+ switch (input) {
+ case content::mojom::SpeechRecognitionErrorCode::kNone:
+ *output =
+ content::SpeechRecognitionErrorCode::SPEECH_RECOGNITION_ERROR_NONE;
+ return true;
+ case content::mojom::SpeechRecognitionErrorCode::kNoSpeech:
+ *output = content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_NO_SPEECH;
+ return true;
+ case content::mojom::SpeechRecognitionErrorCode::kAborted:
+ *output = content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_ABORTED;
+ return true;
+ case content::mojom::SpeechRecognitionErrorCode::kAudioCapture:
+ *output = content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE;
+ return true;
+ case content::mojom::SpeechRecognitionErrorCode::kNetwork:
+ *output = content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_NETWORK;
+ return true;
+ case content::mojom::SpeechRecognitionErrorCode::kNotAllowed:
+ *output = content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_NOT_ALLOWED;
+ return true;
+ case content::mojom::SpeechRecognitionErrorCode::kServiceNotAllowed:
+ *output = content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_SERVICE_NOT_ALLOWED;
+ return true;
+ case content::mojom::SpeechRecognitionErrorCode::kBadGrammar:
+ *output = content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR;
+ return true;
+ case content::mojom::SpeechRecognitionErrorCode::kLanguageNotSupported:
+ *output = content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_LANGUAGE_NOT_SUPPORTED;
+ return true;
+ case content::mojom::SpeechRecognitionErrorCode::kNoMatch:
+ *output = content::SpeechRecognitionErrorCode::
+ SPEECH_RECOGNITION_ERROR_NO_MATCH;
+ return true;
+ }
+ NOTREACHED();
+ return false;
+ }
+};
+
+template <>
+struct EnumTraits<content::mojom::SpeechAudioErrorDetails,
+ content::SpeechAudioErrorDetails> {
+ static content::mojom::SpeechAudioErrorDetails ToMojom(
+ content::SpeechAudioErrorDetails input) {
+ switch (input) {
+ case content::SpeechAudioErrorDetails::SPEECH_AUDIO_ERROR_DETAILS_NONE:
+ return content::mojom::SpeechAudioErrorDetails::kNone;
+ case content::SpeechAudioErrorDetails::SPEECH_AUDIO_ERROR_DETAILS_NO_MIC:
+ return content::mojom::SpeechAudioErrorDetails::kNoMic;
+ }
+ NOTREACHED();
+ return content::mojom::SpeechAudioErrorDetails::kNoMic;
+ }
+
+ static bool FromMojom(content::mojom::SpeechAudioErrorDetails input,
+ content::SpeechAudioErrorDetails* output) {
+ switch (input) {
+ case content::mojom::SpeechAudioErrorDetails::kNone:
+ *output =
+ content::SpeechAudioErrorDetails::SPEECH_AUDIO_ERROR_DETAILS_NONE;
+ return true;
+ case content::mojom::SpeechAudioErrorDetails::kNoMic:
+ *output =
+ content::SpeechAudioErrorDetails::SPEECH_AUDIO_ERROR_DETAILS_NO_MIC;
+ return true;
+ }
+ NOTREACHED();
+ return false;
+ }
+};
+
+template <>
+struct StructTraits<content::mojom::SpeechRecognitionErrorDataView,
+ content::SpeechRecognitionError> {
+ static content::SpeechRecognitionErrorCode code(
+ const content::SpeechRecognitionError& r) {
+ return r.code;
+ }
+ static content::SpeechAudioErrorDetails details(
+ const content::SpeechRecognitionError& r) {
+ return r.details;
+ }
+ static bool Read(content::mojom::SpeechRecognitionErrorDataView data,
+ content::SpeechRecognitionError* out);
+};
+
+} // namespace mojo
+
+#endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_STRUCT_TRAITS_H_
diff --git a/chromium/content/public/common/speech_recognition_grammar.h b/chromium/content/public/common/speech_recognition_grammar.h
deleted file mode 100644
index 0621a56259c..00000000000
--- a/chromium/content/public/common/speech_recognition_grammar.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_GRAMMAR_H_
-#define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_GRAMMAR_H_
-
-#include <vector>
-
-#include "content/common/content_export.h"
-
-namespace content {
-
-struct CONTENT_EXPORT SpeechRecognitionGrammar {
- SpeechRecognitionGrammar()
- : weight(0.0f) {
- }
- explicit SpeechRecognitionGrammar(const std::string& url_value)
- : url(url_value),
- weight(0.0f) {
- }
- SpeechRecognitionGrammar(const std::string& url_value, double weight_value)
- : url(url_value),
- weight(weight_value) {
- }
-
- std::string url;
- double weight;
-};
-
-typedef std::vector<SpeechRecognitionGrammar> SpeechRecognitionGrammarArray;
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_GRAMMAR_H_
diff --git a/chromium/content/public/common/speech_recognition_grammar.mojom b/chromium/content/public/common/speech_recognition_grammar.mojom
new file mode 100644
index 00000000000..fbb0bb2cbfe
--- /dev/null
+++ b/chromium/content/public/common/speech_recognition_grammar.mojom
@@ -0,0 +1,12 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module content.mojom;
+
+import "url/mojom/url.mojom";
+
+struct SpeechRecognitionGrammar {
+ url.mojom.Url url;
+ double weight;
+};
diff --git a/chromium/content/public/common/speech_recognition_result.mojom b/chromium/content/public/common/speech_recognition_result.mojom
new file mode 100644
index 00000000000..8bc5b6c55c1
--- /dev/null
+++ b/chromium/content/public/common/speech_recognition_result.mojom
@@ -0,0 +1,29 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module content.mojom;
+
+import "mojo/public/mojom/base/string16.mojom";
+
+// A single hypothesis indicating what the recognition service thinks a
+// particular speech segment means.
+struct SpeechRecognitionHypothesis {
+ // Transcript of spoken text.
+ mojo_base.mojom.String16 utterance;
+
+ // A numeric estimate between 0 and 1 that represents how confident the
+ // recognition system is that the recognition is correct.
+ double confidence;
+};
+
+// Group of recognition hypotheses for a particular speech segment.
+struct SpeechRecognitionResult {
+ // An N-best list of hypotheses.
+ array<content.mojom.SpeechRecognitionHypothesis> hypotheses;
+
+ // False if this is the final time the speech service will return this
+ // particular result. If true, then this represents an interim result that
+ // could still be changed.
+ bool is_provisional;
+};
diff --git a/chromium/content/public/common/speech_recognition_result.typemap b/chromium/content/public/common/speech_recognition_result.typemap
new file mode 100644
index 00000000000..ac03718a8d6
--- /dev/null
+++ b/chromium/content/public/common/speech_recognition_result.typemap
@@ -0,0 +1,16 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+mojom = "//content/public/common/speech_recognition_result.mojom"
+public_headers = [ "//content/public/common/speech_recognition_result.h" ]
+traits_headers =
+ [ "//content/public/common/speech_recognition_result_struct_traits.h" ]
+sources = [
+ "//content/public/common/speech_recognition_result_struct_traits.cc",
+]
+deps = []
+type_mappings = [
+ "content.mojom.SpeechRecognitionHypothesis=content::SpeechRecognitionHypothesis",
+ "content.mojom.SpeechRecognitionResult=content::SpeechRecognitionResult",
+]
diff --git a/chromium/content/public/common/speech_recognition_result_struct_traits.cc b/chromium/content/public/common/speech_recognition_result_struct_traits.cc
new file mode 100644
index 00000000000..1c1e06d1f08
--- /dev/null
+++ b/chromium/content/public/common/speech_recognition_result_struct_traits.cc
@@ -0,0 +1,29 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/common/speech_recognition_result_struct_traits.h"
+
+namespace mojo {
+
+bool StructTraits<content::mojom::SpeechRecognitionHypothesisDataView,
+ content::SpeechRecognitionHypothesis>::
+ Read(content::mojom::SpeechRecognitionHypothesisDataView data,
+ content::SpeechRecognitionHypothesis* out) {
+ if (!data.ReadUtterance(&out->utterance))
+ return false;
+ out->confidence = data.confidence();
+ return true;
+}
+
+bool StructTraits<content::mojom::SpeechRecognitionResultDataView,
+ content::SpeechRecognitionResult>::
+ Read(content::mojom::SpeechRecognitionResultDataView data,
+ content::SpeechRecognitionResult* out) {
+ if (!data.ReadHypotheses(&out->hypotheses))
+ return false;
+ out->is_provisional = data.is_provisional();
+ return true;
+}
+
+} // namespace mojo
diff --git a/chromium/content/public/common/speech_recognition_result_struct_traits.h b/chromium/content/public/common/speech_recognition_result_struct_traits.h
new file mode 100644
index 00000000000..53b84eb0da0
--- /dev/null
+++ b/chromium/content/public/common/speech_recognition_result_struct_traits.h
@@ -0,0 +1,47 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_STRUCT_TRAITS_H_
+#define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_STRUCT_TRAITS_H_
+
+#include "content/public/common/speech_recognition_result.h"
+#include "content/public/common/speech_recognition_result.mojom.h"
+#include "mojo/public/cpp/base/string16_mojom_traits.h"
+#include "mojo/public/cpp/bindings/struct_traits.h"
+
+namespace mojo {
+
+template <>
+struct StructTraits<content::mojom::SpeechRecognitionHypothesisDataView,
+ content::SpeechRecognitionHypothesis> {
+ static const base::string16& utterance(
+ const content::SpeechRecognitionHypothesis& r) {
+ return r.utterance;
+ }
+ static double confidence(const content::SpeechRecognitionHypothesis& r) {
+ return r.confidence;
+ }
+ static bool Read(content::mojom::SpeechRecognitionHypothesisDataView data,
+ content::SpeechRecognitionHypothesis* out);
+};
+
+template <>
+struct StructTraits<content::mojom::SpeechRecognitionResultDataView,
+ content::SpeechRecognitionResult> {
+ static const std::vector<content::SpeechRecognitionHypothesis>& hypotheses(
+ const content::SpeechRecognitionResult& r) {
+ return r.hypotheses;
+ }
+
+ static bool is_provisional(const content::SpeechRecognitionResult& r) {
+ return r.is_provisional;
+ }
+
+ static bool Read(content::mojom::SpeechRecognitionResultDataView data,
+ content::SpeechRecognitionResult* out);
+};
+
+} // namespace mojo
+
+#endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_STRUCT_TRAITS_H_
diff --git a/chromium/content/public/common/stop_find_action.h b/chromium/content/public/common/stop_find_action.h
index 0088eec3ea6..399c4be6e30 100644
--- a/chromium/content/public/common/stop_find_action.h
+++ b/chromium/content/public/common/stop_find_action.h
@@ -5,15 +5,22 @@
#ifndef CONTENT_PUBLIC_COMMON_STOP_FIND_ACTION_H_
#define CONTENT_PUBLIC_COMMON_STOP_FIND_ACTION_H_
+#include "third_party/blink/public/mojom/frame/find_in_page.mojom.h"
+
namespace content {
+// DEPRECATED - For future usage, use blink::mojom::StopFindAction directly.
// The user has completed a find-in-page; this type defines what actions the
// renderer should take next.
enum StopFindAction {
- STOP_FIND_ACTION_CLEAR_SELECTION,
- STOP_FIND_ACTION_KEEP_SELECTION,
- STOP_FIND_ACTION_ACTIVATE_SELECTION,
- STOP_FIND_ACTION_LAST = STOP_FIND_ACTION_ACTIVATE_SELECTION
+ STOP_FIND_ACTION_CLEAR_SELECTION = static_cast<int>(
+ blink::mojom::StopFindAction::kStopFindActionClearSelection),
+ STOP_FIND_ACTION_KEEP_SELECTION = static_cast<int>(
+ blink::mojom::StopFindAction::kStopFindActionKeepSelection),
+ STOP_FIND_ACTION_ACTIVATE_SELECTION = static_cast<int>(
+ blink::mojom::StopFindAction::kStopFindActionActivateSelection),
+ STOP_FIND_ACTION_LAST =
+ static_cast<int>(blink::mojom::StopFindAction::kMaxValue)
};
} // namespace content
diff --git a/chromium/content/public/common/typemaps.gni b/chromium/content/public/common/typemaps.gni
index 5d4fc4d71a9..ae8d8a0e219 100644
--- a/chromium/content/public/common/typemaps.gni
+++ b/chromium/content/public/common/typemaps.gni
@@ -3,8 +3,10 @@
# found in the LICENSE file.
typemaps = [
- "//content/public/common/manifest.typemap",
+ "//content/public/common/load_timing_info.typemap",
"//content/public/common/referrer.typemap",
"//content/public/common/resource_type.typemap",
+ "//content/public/common/speech_recognition_result.typemap",
+ "//content/public/common/speech_recognition_error.typemap",
"//content/public/common/webplugininfo.typemap",
]
diff --git a/chromium/content/public/common/url_constants.cc b/chromium/content/public/common/url_constants.cc
index ece77d53898..e85d54e2990 100644
--- a/chromium/content/public/common/url_constants.cc
+++ b/chromium/content/public/common/url_constants.cc
@@ -32,6 +32,7 @@ const char kChromeUIMediaInternalsHost[] = "media-internals";
const char kChromeUIMemoryExhaustHost[] = "memory-exhaust";
const char kChromeUINetworkErrorHost[] = "network-error";
const char kChromeUINetworkErrorsListingHost[] = "network-errors";
+const char kChromeUIProcessInternalsHost[] = "process-internals";
const char kChromeUIResourcesHost[] = "resources";
const char kChromeUIServiceWorkerInternalsHost[] = "serviceworker-internals";
const char kChromeUITracingHost[] = "tracing";
@@ -54,6 +55,7 @@ const char kChromeUINetworkErrorURL[] = "chrome://network-error/";
const char kChromeUINetworkErrorsListingURL[] = "chrome://network-errors/";
const char kChromeUIPpapiFlashCrashURL[] = "chrome://ppapiflashcrash/";
const char kChromeUIPpapiFlashHangURL[] = "chrome://ppapiflashhang/";
+const char kChromeUIProcessInternalsURL[] = "chrome://process-internals";
#if defined(OS_ANDROID)
const char kChromeUIGpuJavaCrashURL[] = "chrome://gpu-java-crash/";
#endif
diff --git a/chromium/content/public/common/url_constants.h b/chromium/content/public/common/url_constants.h
index 67009beda0d..0da500fb484 100644
--- a/chromium/content/public/common/url_constants.h
+++ b/chromium/content/public/common/url_constants.h
@@ -41,6 +41,7 @@ CONTENT_EXPORT extern const char kChromeUIMediaInternalsHost[];
CONTENT_EXPORT extern const char kChromeUIMemoryExhaustHost[];
CONTENT_EXPORT extern const char kChromeUINetworkErrorHost[];
CONTENT_EXPORT extern const char kChromeUINetworkErrorsListingHost[];
+CONTENT_EXPORT extern const char kChromeUIProcessInternalsHost[];
CONTENT_EXPORT extern const char kChromeUIResourcesHost[];
CONTENT_EXPORT extern const char kChromeUIServiceWorkerInternalsHost[];
CONTENT_EXPORT extern const char kChromeUITracingHost[];
@@ -64,6 +65,7 @@ CONTENT_EXPORT extern const char kChromeUINetworkErrorsListingURL[];
CONTENT_EXPORT extern const char kChromeUINetworkErrorURL[];
CONTENT_EXPORT extern const char kChromeUIPpapiFlashCrashURL[];
CONTENT_EXPORT extern const char kChromeUIPpapiFlashHangURL[];
+CONTENT_EXPORT extern const char kChromeUIProcessInternalsURL[];
#if defined(OS_ANDROID)
CONTENT_EXPORT extern const char kChromeUIGpuJavaCrashURL[];
#endif
diff --git a/chromium/content/public/common/weak_wrapper_shared_url_loader_factory.cc b/chromium/content/public/common/weak_wrapper_shared_url_loader_factory.cc
deleted file mode 100644
index bd99c1e1914..00000000000
--- a/chromium/content/public/common/weak_wrapper_shared_url_loader_factory.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/public/common/weak_wrapper_shared_url_loader_factory.h"
-
-#include "content/common/wrapper_shared_url_loader_factory.h"
-#include "mojo/public/cpp/bindings/interface_request.h"
-
-namespace content {
-
-WeakWrapperSharedURLLoaderFactory::WeakWrapperSharedURLLoaderFactory(
- network::mojom::URLLoaderFactory* factory_ptr)
- : factory_ptr_(factory_ptr) {}
-
-void WeakWrapperSharedURLLoaderFactory::Detach() {
- factory_ptr_ = nullptr;
-}
-
-void WeakWrapperSharedURLLoaderFactory::CreateLoaderAndStart(
- network::mojom::URLLoaderRequest loader,
- int32_t routing_id,
- int32_t request_id,
- uint32_t options,
- const network::ResourceRequest& request,
- network::mojom::URLLoaderClientPtr client,
- const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) {
- if (!factory_ptr_)
- return;
- factory_ptr_->CreateLoaderAndStart(std::move(loader), routing_id, request_id,
- options, request, std::move(client),
- traffic_annotation);
-}
-
-std::unique_ptr<network::SharedURLLoaderFactoryInfo>
-WeakWrapperSharedURLLoaderFactory::Clone() {
- network::mojom::URLLoaderFactoryPtrInfo factory_ptr_info;
- if (factory_ptr_)
- factory_ptr_->Clone(mojo::MakeRequest(&factory_ptr_info));
- return std::make_unique<WrapperSharedURLLoaderFactoryInfo>(
- std::move(factory_ptr_info));
-}
-
-WeakWrapperSharedURLLoaderFactory::~WeakWrapperSharedURLLoaderFactory() =
- default;
-
-} // namespace content
diff --git a/chromium/content/public/common/weak_wrapper_shared_url_loader_factory.h b/chromium/content/public/common/weak_wrapper_shared_url_loader_factory.h
deleted file mode 100644
index 0bbf213f914..00000000000
--- a/chromium/content/public/common/weak_wrapper_shared_url_loader_factory.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_WEAK_WRAPPER_SHARED_URL_LOADER_FACTORY_H_
-#define CONTENT_PUBLIC_COMMON_WEAK_WRAPPER_SHARED_URL_LOADER_FACTORY_H_
-
-#include "content/common/content_export.h"
-#include "services/network/public/cpp/shared_url_loader_factory.h"
-#include "services/network/public/mojom/url_loader_factory.mojom.h"
-
-namespace content {
-
-// A SharedURLLoaderFactory implementation that wraps a raw
-// mojom::URLLoaderFactory pointer.
-class CONTENT_EXPORT WeakWrapperSharedURLLoaderFactory
- : public network::SharedURLLoaderFactory {
- public:
- explicit WeakWrapperSharedURLLoaderFactory(
- network::mojom::URLLoaderFactory* factory_ptr);
-
- // Detaches from the raw mojom::URLLoaderFactory pointer. All subsequent calls
- // to CreateLoaderAndStart() will fail silently.
- void Detach();
-
- // SharedURLLoaderFactory implementation.
- void CreateLoaderAndStart(network::mojom::URLLoaderRequest loader,
- int32_t routing_id,
- int32_t request_id,
- uint32_t options,
- const network::ResourceRequest& request,
- network::mojom::URLLoaderClientPtr client,
- const net::MutableNetworkTrafficAnnotationTag&
- traffic_annotation) override;
-
- std::unique_ptr<network::SharedURLLoaderFactoryInfo> Clone() override;
-
- private:
- ~WeakWrapperSharedURLLoaderFactory() override;
-
- // Not owned.
- network::mojom::URLLoaderFactory* factory_ptr_ = nullptr;
-};
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_WEAK_WRAPPER_SHARED_URL_LOADER_FACTORY_H_
diff --git a/chromium/content/public/common/web_preferences.cc b/chromium/content/public/common/web_preferences.cc
index dcff5cef776..c5f6d0b03ba 100644
--- a/chromium/content/public/common/web_preferences.cc
+++ b/chromium/content/public/common/web_preferences.cc
@@ -90,6 +90,8 @@ WebPreferences::WebPreferences()
xss_auditor_enabled(true),
dns_prefetching_enabled(true),
data_saver_enabled(false),
+ data_saver_holdback_web_api_enabled(false),
+ data_saver_holdback_media_api_enabled(false),
local_storage_enabled(false),
databases_enabled(false),
application_cache_enabled(false),
diff --git a/chromium/content/public/common/web_preferences.h b/chromium/content/public/common/web_preferences.h
index e4fc39c60fd..a1e9fba06a6 100644
--- a/chromium/content/public/common/web_preferences.h
+++ b/chromium/content/public/common/web_preferences.h
@@ -118,6 +118,14 @@ struct CONTENT_EXPORT WebPreferences {
// Preference to save data. When enabled, requests will contain the header
// 'Save-Data: on'.
bool data_saver_enabled;
+ // Whether data saver holdback for Web APIs is enabled. If enabled, data saver
+ // appears as disabled to the web consumers even if it has been actually
+ // enabled by the user.
+ bool data_saver_holdback_web_api_enabled;
+ // Whether data saver holdback is enabled when queried by the media APIs
+ // within Blink. If enabled, data saver appears as disabled to the media APIs
+ // even if it has been actually enabled by the user.
+ bool data_saver_holdback_media_api_enabled;
bool local_storage_enabled;
bool databases_enabled;
bool application_cache_enabled;
diff --git a/chromium/content/public/common/zygote_features.gni b/chromium/content/public/common/zygote_features.gni
deleted file mode 100644
index c7580b35ff3..00000000000
--- a/chromium/content/public/common/zygote_features.gni
+++ /dev/null
@@ -1,5 +0,0 @@
-# Copyright 2018 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-use_zygote_handle = is_posix && !is_android && !is_mac
diff --git a/chromium/content/public/common/zygote_fork_delegate_linux.h b/chromium/content/public/common/zygote_fork_delegate_linux.h
deleted file mode 100644
index 8a15434ecc2..00000000000
--- a/chromium/content/public/common/zygote_fork_delegate_linux.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_ZYGOTE_FORK_DELEGATE_LINUX_H_
-#define CONTENT_PUBLIC_COMMON_ZYGOTE_FORK_DELEGATE_LINUX_H_
-
-#include <unistd.h>
-
-#include <string>
-#include <vector>
-
-// TODO(jln) base::TerminationStatus should be forward declared when switching
-// to C++11.
-#include "base/process/kill.h"
-
-namespace content {
-
-// The ZygoteForkDelegate allows the Chrome Linux zygote to delegate
-// fork operations to another class that knows how to do some
-// specialized version of fork.
-class ZygoteForkDelegate {
- public:
- // A ZygoteForkDelegate is created during Chrome linux zygote
- // initialization, and provides "fork()" functionality as an
- // alternative to forking the zygote. A new delegate is passed in
- // as an argument to ZygoteMain().
- virtual ~ZygoteForkDelegate() {}
-
- // Initialization happens in the zygote after it has been
- // started by ZygoteMain.
- // If |enable_layer1_sandbox| is true, the delegate must enable a
- // layer-1 sandbox such as the setuid sandbox.
- virtual void Init(int sandboxdesc, bool enable_layer1_sandbox) = 0;
-
- // After Init, supply a UMA_HISTOGRAM_ENUMERATION the delegate would like
- // reported to the browser process. (Note: Because these reports are
- // piggy-backed onto fork responses that don't otherwise contain UMA reports,
- // this method may not be called until much later.)
- virtual void InitialUMA(std::string* uma_name,
- int* uma_sample,
- int* uma_boundary_value) = 0;
-
- // Returns 'true' if the delegate would like to handle a given fork
- // request. Otherwise returns false. Optionally, fills in uma_name et al
- // with a report the helper wants to make via UMA_HISTOGRAM_ENUMERATION.
- virtual bool CanHelp(const std::string& process_type, std::string* uma_name,
- int* uma_sample, int* uma_boundary_value) = 0;
-
- // Indexes of FDs in the vector passed to Fork().
- enum {
- // Used to pass in the descriptor for talking to the Browser.
- // Because the children use ChannelMojo, this is actually the Mojo fd.
- kBrowserFDIndex,
- // The PID oracle is used in the protocol for discovering the
- // child process's real PID from within the SUID sandbox.
- // The child process is required to write to the socket after
- // successfully forking.
- kPIDOracleFDIndex,
- kNumPassedFDs // Number of FDs in the vector passed to Fork().
- };
-
- // Delegate forks, returning a -1 on failure. Outside the
- // suid sandbox, Fork() returns the Linux process ID.
- // This method is not aware of any potential pid namespaces, so it'll
- // return a raw pid just like fork() would.
- // Delegate is responsible for communicating the channel ID to the
- // newly created child process.
- virtual pid_t Fork(const std::string& process_type,
- const std::vector<int>& fds,
- const std::string& channel_id) = 0;
-
- // The fork delegate must also assume the role of waiting for its children
- // since the caller will not be their parents and cannot do it. |pid| here
- // should be a pid that has been returned by the Fork() method. i.e. This
- // method is completely unaware of eventual PID namespaces due to sandboxing.
- // |known_dead| indicates that the process is already dead and that a
- // blocking wait() should be performed. In this case, GetTerminationStatus()
- // will send a SIGKILL to the target process first.
- virtual bool GetTerminationStatus(pid_t pid, bool known_dead,
- base::TerminationStatus* status,
- int* exit_code) = 0;
-};
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_ZYGOTE_FORK_DELEGATE_LINUX_H_
diff --git a/chromium/content/public/common/zygote_handle.h b/chromium/content/public/common/zygote_handle.h
deleted file mode 100644
index 5c21c883072..00000000000
--- a/chromium/content/public/common/zygote_handle.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_COMMON_ZYGOTE_HANDLE_H_
-#define CONTENT_PUBLIC_COMMON_ZYGOTE_HANDLE_H_
-
-#include "base/callback.h"
-#include "base/command_line.h"
-#include "base/files/scoped_file.h"
-#include "build/build_config.h"
-#include "content/common/content_export.h"
-#include "content/public/common/zygote_buildflags.h"
-
-#if !BUILDFLAG(USE_ZYGOTE_HANDLE)
-#error "Can not use zygote handles without USE_ZYGOTE_HANDLE"
-#endif
-
-namespace content {
-
-#if defined(OS_POSIX)
-class ZygoteCommunication;
-using ZygoteHandle = ZygoteCommunication*;
-#else
-// Perhaps other ports may USE_ZYGOTE_HANDLE here somdeday.
-#error "Can not use zygote handles on this platform"
-#endif // defined(OS_POSIX)
-
-// Allocates and initializes the global generic zygote process, and returns the
-// ZygoteHandle used to communicate with it. |launcher| is a callback that
-// should actually launch the process, after adding additional command line
-// switches to the ones composed by this function. It returns the pid created,
-// and provides a control fd for it.
-CONTENT_EXPORT ZygoteHandle CreateGenericZygote(
- base::OnceCallback<pid_t(base::CommandLine*, base::ScopedFD*)> launcher);
-
-// Returns a handle to a global generic zygote object. This function allows the
-// browser to launch and use a single zygote process until the performance
-// issues around launching multiple zygotes are resolved.
-// http://crbug.com/569191
-CONTENT_EXPORT ZygoteHandle GetGenericZygote();
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_ZYGOTE_HANDLE_H_