summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/public/platform
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/public/platform')
-rw-r--r--chromium/third_party/blink/public/platform/DEPS1
-rw-r--r--chromium/third_party/blink/public/platform/file_path_conversion.h2
-rw-r--r--chromium/third_party/blink/public/platform/interface_registry.h4
-rw-r--r--chromium/third_party/blink/public/platform/mac/web_sandbox_support.h6
-rw-r--r--chromium/third_party/blink/public/platform/mac/web_scrollbar_theme.h17
-rw-r--r--chromium/third_party/blink/public/platform/modules/background_sync/OWNERS1
-rw-r--r--chromium/third_party/blink/public/platform/modules/background_sync/background_sync.mojom10
-rw-r--r--chromium/third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom27
-rw-r--r--chromium/third_party/blink/public/platform/modules/fetch/fetch_api_request.typemap10
-rw-r--r--chromium/third_party/blink/public/platform/modules/frame_sinks/embedded_frame_sink.mojom15
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/indexed_db_key_builder.h76
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_callbacks.h5
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_cursor.h68
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_database.h152
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_database_callbacks.h4
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_factory.h70
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_key.h33
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_name_and_version.h20
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_observation.h5
-rw-r--r--chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_value.h7
-rw-r--r--chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_callbacks.h24
-rw-r--r--chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_client.h8
-rw-r--r--chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_decoding_info.h22
-rw-r--r--chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_info.h5
-rw-r--r--chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_key_system_configuration.h48
-rw-r--r--chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_configuration.h10
-rw-r--r--chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_decoding_configuration.h35
-rw-r--r--chromium/third_party/blink/public/platform/modules/mediasession/media_session.mojom20
-rw-r--r--chromium/third_party/blink/public/platform/modules/push_messaging/web_push_client.h4
-rw-r--r--chromium/third_party/blink/public/platform/modules/push_messaging/web_push_provider.h10
-rw-r--r--chromium/third_party/blink/public/platform/modules/service_worker/web_navigation_preload_state.h22
-rw-r--r--chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h1
-rw-r--r--chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_provider.h19
-rw-r--r--chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration.h73
-rw-r--r--chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_object_info.h69
-rw-r--r--chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_proxy.h34
-rw-r--r--chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_request.h20
-rw-r--r--chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_response.h6
-rw-r--r--chromium/third_party/blink/public/platform/modules/webauthn/authenticator.mojom10
-rw-r--r--chromium/third_party/blink/public/platform/platform.h82
-rw-r--r--chromium/third_party/blink/public/platform/referrer.mojom36
-rw-r--r--chromium/third_party/blink/public/platform/referrer_policy.typemap9
-rw-r--r--chromium/third_party/blink/public/platform/referrer_policy_enum_traits.h87
-rw-r--r--chromium/third_party/blink/public/platform/reporting.mojom5
-rw-r--r--chromium/third_party/blink/public/platform/scheduler/DEPS1
-rw-r--r--chromium/third_party/blink/public/platform/scheduler/child/webthread_base.h79
-rw-r--r--chromium/third_party/blink/public/platform/scheduler/single_thread_idle_task_runner.h112
-rw-r--r--chromium/third_party/blink/public/platform/scheduler/web_renderer_process_type.h (renamed from chromium/third_party/blink/public/platform/scheduler/renderer_process_type.h)8
-rw-r--r--chromium/third_party/blink/public/platform/scheduler/web_thread_scheduler.h24
-rw-r--r--chromium/third_party/blink/public/platform/task_type.h5
-rw-r--r--chromium/third_party/blink/public/platform/web_application_cache_host.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_audio_device.h10
-rw-r--r--chromium/third_party/blink/public/platform/web_audio_source_provider_client.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_canonical_cookie.h6
-rw-r--r--chromium/third_party/blink/public/platform/web_coalesced_input_event.h15
-rw-r--r--chromium/third_party/blink/public/platform/web_content_decryption_module_access.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_content_settings_client.h4
-rw-r--r--chromium/third_party/blink/public/platform/web_cors.h59
-rw-r--r--chromium/third_party/blink/public/platform/web_crypto.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_crypto_key_algorithm_params.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_database_observer.h32
-rw-r--r--chromium/third_party/blink/public/platform/web_document_subresource_filter.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_double_point.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_double_size.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_feature.mojom42
-rw-r--r--chromium/third_party/blink/public/platform/web_float_point.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_float_point_3d.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_float_rect.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_float_size.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_font_render_style.h10
-rw-r--r--chromium/third_party/blink/public/platform/web_gesture_event.h24
-rw-r--r--chromium/third_party/blink/public/platform/web_graphics_context_3d_provider.h6
-rw-r--r--chromium/third_party/blink/public/platform/web_input_event.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_keyboard_event.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_layer_tree_view.h19
-rw-r--r--chromium/third_party/blink/public/platform/web_loading_behavior_flag.h11
-rw-r--r--chromium/third_party/blink/public/platform/web_media_constraints.h28
-rw-r--r--chromium/third_party/blink/public/platform/web_media_player.h18
-rw-r--r--chromium/third_party/blink/public/platform/web_media_recorder_handler.h4
-rw-r--r--chromium/third_party/blink/public/platform/web_media_stream_source.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_media_stream_track.h4
-rw-r--r--chromium/third_party/blink/public/platform/web_mouse_event.h3
-rw-r--r--chromium/third_party/blink/public/platform/web_mouse_wheel_event.h10
-rw-r--r--chromium/third_party/blink/public/platform/web_point.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_pointer_event.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_prerender.h5
-rw-r--r--chromium/third_party/blink/public/platform/web_private_ptr.h6
-rw-r--r--chromium/third_party/blink/public/platform/web_rect.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_referrer_policy.h58
-rw-r--r--chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler.h3
-rw-r--r--chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler_client.h27
-rw-r--r--chromium/third_party/blink/public/platform/web_rtc_rtp_receiver.h3
-rw-r--r--chromium/third_party/blink/public/platform/web_rtc_rtp_sender.h3
-rw-r--r--chromium/third_party/blink/public/platform/web_rtc_stats.h5
-rw-r--r--chromium/third_party/blink/public/platform/web_runtime_features.h40
-rw-r--r--chromium/third_party/blink/public/platform/web_scroll_into_view_params.h4
-rw-r--r--chromium/third_party/blink/public/platform/web_size.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_speech_synthesis_constants.h10
-rw-r--r--chromium/third_party/blink/public/platform/web_string.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_surface_layer_bridge.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_thread_type.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_touch_event.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_url_error.h6
-rw-r--r--chromium/third_party/blink/public/platform/web_url_loader_client.h4
-rw-r--r--chromium/third_party/blink/public/platform/web_url_loader_mock_factory.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_url_request.h28
-rw-r--r--chromium/third_party/blink/public/platform/web_url_response.h2
-rw-r--r--chromium/third_party/blink/public/platform/web_video_frame_submitter.h11
-rw-r--r--chromium/third_party/blink/public/platform/web_worker_fetch_context.h32
109 files changed, 762 insertions, 1259 deletions
diff --git a/chromium/third_party/blink/public/platform/DEPS b/chromium/third_party/blink/public/platform/DEPS
index a10dc67d4e5..a21100dbc8b 100644
--- a/chromium/third_party/blink/public/platform/DEPS
+++ b/chromium/third_party/blink/public/platform/DEPS
@@ -34,6 +34,7 @@ include_rules = [
"+services/network/public/mojom/fetch_api.mojom-shared.h",
"+services/network/public/mojom/request_context_frame_type.mojom-shared.h",
"+services/network/public/mojom/restricted_cookie_manager.mojom-shared.h",
+ "+services/network/public/mojom/referrer_policy.mojom-shared.h",
"+services/service_manager/public/mojom",
"+third_party/blink/public/platform",
diff --git a/chromium/third_party/blink/public/platform/file_path_conversion.h b/chromium/third_party/blink/public/platform/file_path_conversion.h
index 852e4be3172..6396d387d78 100644
--- a/chromium/third_party/blink/public/platform/file_path_conversion.h
+++ b/chromium/third_party/blink/public/platform/file_path_conversion.h
@@ -8,7 +8,7 @@
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/wtf/forward.h"
+#include "third_party/blink/renderer/platform/wtf/forward.h" // nogncheck
#endif
namespace base {
diff --git a/chromium/third_party/blink/public/platform/interface_registry.h b/chromium/third_party/blink/public/platform/interface_registry.h
index 3429ef22943..7bb6909c9c7 100644
--- a/chromium/third_party/blink/public/platform/interface_registry.h
+++ b/chromium/third_party/blink/public/platform/interface_registry.h
@@ -14,8 +14,8 @@
#if INSIDE_BLINK
#include "mojo/public/cpp/bindings/associated_interface_request.h"
#include "mojo/public/cpp/bindings/interface_request.h"
-#include "third_party/blink/renderer/platform/cross_thread_functional.h"
-#include "third_party/blink/renderer/platform/wtf/functional.h"
+#include "third_party/blink/renderer/platform/cross_thread_functional.h" // nogncheck
+#include "third_party/blink/renderer/platform/wtf/functional.h" // nogncheck
#endif
namespace base {
diff --git a/chromium/third_party/blink/public/platform/mac/web_sandbox_support.h b/chromium/third_party/blink/public/platform/mac/web_sandbox_support.h
index a2b67d503aa..4e1b27e2143 100644
--- a/chromium/third_party/blink/public/platform/mac/web_sandbox_support.h
+++ b/chromium/third_party/blink/public/platform/mac/web_sandbox_support.h
@@ -31,6 +31,9 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MAC_WEB_SANDBOX_SUPPORT_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MAC_WEB_SANDBOX_SUPPORT_H_
+#include "third_party/blink/public/common/sandbox_support/sandbox_support_mac.h"
+#include "third_party/skia/include/core/SkColor.h"
+
typedef struct CGFont* CGFontRef;
namespace blink {
@@ -52,6 +55,9 @@ class WebSandboxSupport {
virtual bool LoadFont(CTFontRef src_font,
CGFontRef* out,
uint32_t* font_id) = 0;
+
+ // Returns the system's preferred value for a named color.
+ virtual SkColor GetSystemColor(MacSystemColorID) = 0;
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/mac/web_scrollbar_theme.h b/chromium/third_party/blink/public/platform/mac/web_scrollbar_theme.h
index 639e9608ca6..9af5197cf74 100644
--- a/chromium/third_party/blink/public/platform/mac/web_scrollbar_theme.h
+++ b/chromium/third_party/blink/public/platform/mac/web_scrollbar_theme.h
@@ -32,14 +32,9 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MAC_WEB_SCROLLBAR_THEME_H_
#include "third_party/blink/public/platform/web_common.h"
-#include "third_party/blink/public/platform/web_scrollbar_buttons_placement.h"
namespace blink {
-#if INSIDE_BLINK
-class WebScrollbarThemeClient;
-#endif
-
// This enum must match NSScrollerStyle in the 10.7 SDK.
enum ScrollerStyle { kScrollerStyleLegacy = 0, kScrollerStyleOverlay = 1 };
@@ -60,18 +55,6 @@ class WebScrollbarTheme {
ScrollerStyle preferred_scroller_style,
bool redraw,
bool jump_on_track_click);
-
-// Registered clients will receive a callback whenever
-// UpdateScrollbarsWithNSDefaults is called.
-#if INSIDE_BLINK
- static float InitialButtonDelay();
- static float AutoscrollButtonDelay();
- static ScrollerStyle PreferredScrollerStyle();
- static bool JumpOnTrackClick();
-
- static void RegisterClient(WebScrollbarThemeClient& client);
- static void UnregisterClient(WebScrollbarThemeClient& client);
-#endif
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/modules/background_sync/OWNERS b/chromium/third_party/blink/public/platform/modules/background_sync/OWNERS
index 256ecaa0b09..4340bc40037 100644
--- a/chromium/third_party/blink/public/platform/modules/background_sync/OWNERS
+++ b/chromium/third_party/blink/public/platform/modules/background_sync/OWNERS
@@ -1,5 +1,6 @@
iclelland@chromium.org
jkarlin@chromium.org
+peter@chromium.org
per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
diff --git a/chromium/third_party/blink/public/platform/modules/background_sync/background_sync.mojom b/chromium/third_party/blink/public/platform/modules/background_sync/background_sync.mojom
index d87bd0dad9f..e89976a3f46 100644
--- a/chromium/third_party/blink/public/platform/modules/background_sync/background_sync.mojom
+++ b/chromium/third_party/blink/public/platform/modules/background_sync/background_sync.mojom
@@ -4,17 +4,8 @@
module blink.mojom;
-enum BackgroundSyncNetworkState {
- ANY,
- AVOID_CELLULAR,
- ONLINE,
- MAX=ONLINE
-};
-
struct SyncRegistration {
- int64 id = -1;
string tag = "";
- BackgroundSyncNetworkState network_state = ONLINE;
};
enum BackgroundSyncError {
@@ -41,6 +32,7 @@ enum BackgroundSyncEventLastChance {
interface BackgroundSyncService {
Register(SyncRegistration options, int64 service_worker_registration_id)
=> (BackgroundSyncError err, SyncRegistration options);
+ DidResolveRegistration(int64 service_worker_registration_id, string tag);
GetRegistrations(int64 service_worker_registration_id)
=> (BackgroundSyncError err, array<SyncRegistration> registrations);
};
diff --git a/chromium/third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom b/chromium/third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom
index cbaae17470a..15cc955f0fd 100644
--- a/chromium/third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom
+++ b/chromium/third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom
@@ -6,8 +6,8 @@ module blink.mojom;
import "services/network/public/mojom/fetch_api.mojom";
import "services/network/public/mojom/request_context_frame_type.mojom";
-import "third_party/blink/public/platform/referrer.mojom";
import "third_party/blink/public/mojom/blob/serialized_blob.mojom";
+import "third_party/blink/public/mojom/referrer.mojom";
import "url/mojom/url.mojom";
@@ -101,21 +101,24 @@ enum FetchImportanceMode {
};
struct FetchAPIRequest {
- network.mojom.FetchRequestMode mode;
- bool is_main_resource_load;
- RequestContextType request_context_type;
- network.mojom.RequestContextFrameType frame_type;
+ network.mojom.FetchRequestMode mode = network.mojom.FetchRequestMode.kNoCors;
+ bool is_main_resource_load = false;
+ RequestContextType request_context_type = RequestContextType.UNSPECIFIED;
+ network.mojom.RequestContextFrameType frame_type =
+ network.mojom.RequestContextFrameType.kNone;
url.mojom.Url url;
string method;
map<string, string> headers;
SerializedBlob? blob;
- Referrer referrer;
- network.mojom.FetchCredentialsMode credentials_mode;
- FetchCacheMode cache_mode;
- network.mojom.FetchRedirectMode redirect_mode;
+ Referrer? referrer;
+ network.mojom.FetchCredentialsMode credentials_mode =
+ network.mojom.FetchCredentialsMode.kOmit;
+ FetchCacheMode cache_mode = FetchCacheMode.kDefault;
+ network.mojom.FetchRedirectMode redirect_mode =
+ network.mojom.FetchRedirectMode.kFollow;
string? integrity;
- bool keepalive;
+ bool keepalive = false;
string? client_id;
- bool is_reload;
- bool is_history_navigation;
+ bool is_reload = false;
+ bool is_history_navigation = false;
};
diff --git a/chromium/third_party/blink/public/platform/modules/fetch/fetch_api_request.typemap b/chromium/third_party/blink/public/platform/modules/fetch/fetch_api_request.typemap
deleted file mode 100644
index 0be087a9b85..00000000000
--- a/chromium/third_party/blink/public/platform/modules/fetch/fetch_api_request.typemap
+++ /dev/null
@@ -1,10 +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/fetch/fetch_api_request.mojom"
-public_headers = [ "//third_party/blink/public/platform/modules/service_worker/web_service_worker_request.h" ]
-traits_headers = [ "//third_party/blink/renderer/platform/mojo/fetch_api_request_struct_traits.h" ]
-type_mappings =
- [ "blink.mojom.FetchAPIRequest=::blink::WebServiceWorkerRequest" ]
diff --git a/chromium/third_party/blink/public/platform/modules/frame_sinks/embedded_frame_sink.mojom b/chromium/third_party/blink/public/platform/modules/frame_sinks/embedded_frame_sink.mojom
index ab355bedd61..a4ff4c08b91 100644
--- a/chromium/third_party/blink/public/platform/modules/frame_sinks/embedded_frame_sink.mojom
+++ b/chromium/third_party/blink/public/platform/modules/frame_sinks/embedded_frame_sink.mojom
@@ -7,12 +7,22 @@ module blink.mojom;
import "services/viz/public/interfaces/compositing/compositor_frame_sink.mojom";
import "services/viz/public/interfaces/compositing/frame_sink_id.mojom";
import "services/viz/public/interfaces/compositing/surface_info.mojom";
+import "services/viz/public/interfaces/compositing/local_surface_id.mojom";
-// Interface back to the embedder so it can be notified about surface
+// Interface from the the submitter to the embedder.
+interface SurfaceEmbedder {
+ // Called by the embedee when a new LocalSurfaceId is allocated.
+ SetLocalSurfaceId(viz.mojom.LocalSurfaceId local_surface_id);
+};
+
+// Interface from browser to the embedder so it can be notified about surface
// activations. Closing this interface will destroy the corresponding
// CompositorFrameSink if one exists.
interface EmbeddedFrameSinkClient {
OnFirstSurfaceActivation(viz.mojom.SurfaceInfo surface_info);
+ // Called when a CompositorFrameSink is created for this frame sink.
+ // Establishes a direct connection from the embedee to the embedder.
+ BindSurfaceEmbedder(SurfaceEmbedder& embedder);
};
// Provides embedded CompositorFrameSinks for the renderer. The renderer should
@@ -31,7 +41,8 @@ interface EmbeddedFrameSinkProvider {
// calling RegisterEmbeddedFrameSink() for |frame_sink_id|.
CreateCompositorFrameSink(viz.mojom.FrameSinkId frame_sink_id,
viz.mojom.CompositorFrameSinkClient client,
- viz.mojom.CompositorFrameSink& sink);
+ viz.mojom.CompositorFrameSink& sink,
+ SurfaceEmbedder& notifier);
// Ceate CompositorFrameSink directly in a single call (instead of going
// through both function above).
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/indexed_db_key_builder.h b/chromium/third_party/blink/public/platform/modules/indexeddb/indexed_db_key_builder.h
new file mode 100644
index 00000000000..28a5e8fad19
--- /dev/null
+++ b/chromium/third_party/blink/public/platform/modules/indexeddb/indexed_db_key_builder.h
@@ -0,0 +1,76 @@
+// Copyright (c) 2013 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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_INDEXED_DB_KEY_BUILDER_H_
+#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_INDEXED_DB_KEY_BUILDER_H_
+
+#include "third_party/blink/public/common/indexeddb/indexeddb_key.h"
+#include "third_party/blink/public/common/indexeddb/indexeddb_key_path.h"
+#include "third_party/blink/public/platform/modules/indexeddb/web_idb_key.h"
+#include "third_party/blink/public/platform/web_common.h"
+
+namespace blink {
+
+class IndexedDBKeyRange;
+class WebIDBKeyPath;
+class WebIDBKeyRange;
+
+class BLINK_EXPORT IndexedDBKeyBuilder {
+ public:
+ static IndexedDBKey Build(WebIDBKeyView key);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBKeyBuilder);
+};
+
+class BLINK_EXPORT WebIDBKeyBuilder {
+ public:
+ static WebIDBKey Build(const IndexedDBKey& key);
+ static WebIDBKey Build(const WebIDBKeyView& key);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebIDBKeyBuilder);
+};
+
+class BLINK_EXPORT IndexedDBKeyRangeBuilder {
+ public:
+ static IndexedDBKeyRange Build(const WebIDBKeyRange& key_range);
+
+ // Builds a point range (containing a single key).
+ static IndexedDBKeyRange Build(WebIDBKeyView key);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBKeyRangeBuilder);
+};
+
+class BLINK_EXPORT WebIDBKeyRangeBuilder {
+ public:
+ static WebIDBKeyRange Build(const IndexedDBKeyRange& key);
+
+ // Builds a point range (containing a single key).
+ static WebIDBKeyRange Build(WebIDBKeyView key);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebIDBKeyRangeBuilder);
+};
+
+class BLINK_EXPORT IndexedDBKeyPathBuilder {
+ public:
+ static IndexedDBKeyPath Build(const WebIDBKeyPath& key_path);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBKeyPathBuilder);
+};
+
+class BLINK_EXPORT WebIDBKeyPathBuilder {
+ public:
+ static WebIDBKeyPath Build(const IndexedDBKeyPath& key_path);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebIDBKeyPathBuilder);
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_INDEXED_DB_KEY_BUILDER_H_
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_callbacks.h b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_callbacks.h
index df26944be08..65d1ff386f5 100644
--- a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_callbacks.h
+++ b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_callbacks.h
@@ -26,6 +26,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_CALLBACKS_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_CALLBACKS_H_
+#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom-shared.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_vector.h"
@@ -37,6 +38,7 @@ class WebIDBDatabase;
class WebIDBDatabaseError;
class WebIDBKey;
struct WebIDBMetadata;
+struct WebIDBNameAndVersion;
class WebIDBValue;
class WebIDBCallbacks {
@@ -45,6 +47,7 @@ class WebIDBCallbacks {
// Pointers transfer ownership.
virtual void OnError(const WebIDBDatabaseError&) = 0;
+ virtual void OnSuccess(const WebVector<WebIDBNameAndVersion>&) = 0;
virtual void OnSuccess(const WebVector<WebString>&) = 0;
virtual void OnSuccess(WebIDBCursor*,
WebIDBKey,
@@ -61,7 +64,7 @@ class WebIDBCallbacks {
virtual void OnUpgradeNeeded(long long old_version,
WebIDBDatabase*,
const WebIDBMetadata&,
- unsigned short data_loss,
+ mojom::IDBDataLoss data_loss,
WebString data_loss_message) = 0;
virtual void Detach() = 0;
};
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_cursor.h b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_cursor.h
deleted file mode 100644
index 248df14cdd0..00000000000
--- a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_cursor.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_CURSOR_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_CURSOR_H_
-
-#include "third_party/blink/public/common/indexeddb/web_idb_types.h"
-#include "third_party/blink/public/platform/modules/indexeddb/web_idb_callbacks.h"
-#include "third_party/blink/public/platform/modules/indexeddb/web_idb_key.h"
-#include "third_party/blink/public/platform/web_common.h"
-#include "third_party/blink/public/platform/web_string.h"
-
-namespace blink {
-
-class WebIDBCursor {
- public:
- virtual ~WebIDBCursor() = default;
-
- // Used to implement IDBCursor.advance().
- virtual void Advance(unsigned long count, WebIDBCallbacks*) = 0;
-
- // Used to implement IDBCursor.continue() and IDBCursor.continuePrimaryKey().
- //
- // The key and primary key are null when they are not supplied by the
- // application. When both arguments are null, the cursor advances by one
- // entry.
- //
- // The keys pointed to by WebIDBKeyView are only guaranteed to be alive for
- // the duration of the call.
- virtual void CursorContinue(WebIDBKeyView,
- WebIDBKeyView primary_key,
- WebIDBCallbacks*) = 0;
-
- // Called after a cursor request's success handler is executed.
- //
- // This is only used by the cursor prefetching logic, and does not result in
- // an IPC.
- virtual void PostSuccessHandlerCallback() = 0;
-
- protected:
- WebIDBCursor() = default;
-};
-
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_CURSOR_H_
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_database.h b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_database.h
deleted file mode 100644
index 782d60fa152..00000000000
--- a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_database.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_DATABASE_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_DATABASE_H_
-
-#include "third_party/blink/public/common/indexeddb/web_idb_types.h"
-#include "third_party/blink/public/platform/modules/indexeddb/web_idb_cursor.h"
-#include "third_party/blink/public/platform/modules/indexeddb/web_idb_metadata.h"
-#include "third_party/blink/public/platform/web_blob_info.h"
-#include "third_party/blink/public/platform/web_common.h"
-
-#include <bitset>
-
-namespace blink {
-
-class WebData;
-class WebIDBCallbacks;
-class WebIDBKeyPath;
-class WebIDBKeyRange;
-
-class WebIDBDatabase {
- public:
- virtual ~WebIDBDatabase() = default;
-
- virtual void CreateObjectStore(long long transaction_id,
- long long object_store_id,
- const WebString& name,
- const WebIDBKeyPath&,
- bool auto_increment) = 0;
- virtual void DeleteObjectStore(long long transaction_id,
- long long object_store_id) = 0;
- virtual void RenameObjectStore(long long transaction_id,
- long long object_store_id,
- const WebString& name) = 0;
- virtual void CreateTransaction(long long id,
- const WebVector<long long>& scope,
- WebIDBTransactionMode) = 0;
- virtual void Close() = 0;
- virtual void VersionChangeIgnored() = 0;
-
- virtual void Abort(long long transaction_id) = 0;
- virtual void Commit(long long transaction_id) = 0;
-
- virtual void CreateIndex(long long transaction_id,
- long long object_store_id,
- long long index_id,
- const WebString& name,
- const WebIDBKeyPath&,
- bool unique,
- bool multi_entry) = 0;
- virtual void DeleteIndex(long long transaction_id,
- long long object_store_id,
- long long index_id) = 0;
- virtual void RenameIndex(long long transaction_id,
- long long object_store_id,
- long long index_id,
- const WebString& new_name) = 0;
-
- static const long long kMinimumIndexId = 30;
-
- virtual void AddObserver(
- long long transaction_id,
- int32_t observer_id,
- bool include_transaction,
- bool no_records,
- bool values,
- const std::bitset<kWebIDBOperationTypeCount>& operation_types) = 0;
- virtual void RemoveObservers(
- const WebVector<int32_t>& observer_ids_to_remove) = 0;
- virtual void Get(long long transaction_id,
- long long object_store_id,
- long long index_id,
- const WebIDBKeyRange&,
- bool key_only,
- WebIDBCallbacks*) = 0;
- virtual void GetAll(long long transaction_id,
- long long object_store_id,
- long long index_id,
- const WebIDBKeyRange&,
- long long max_count,
- bool key_only,
- WebIDBCallbacks*) = 0;
- virtual void Put(long long transaction_id,
- long long object_store_id,
- const WebData& value,
- const WebVector<WebBlobInfo>&,
- WebIDBKeyView primary_key,
- WebIDBPutMode,
- WebIDBCallbacks*,
- const WebVector<WebIDBIndexKeys>&) = 0;
- virtual void SetIndexKeys(long long transaction_id,
- long long object_store_id,
- WebIDBKeyView primary_key,
- const WebVector<WebIDBIndexKeys>&) = 0;
- virtual void SetIndexesReady(long long transaction_id,
- long long object_store_id,
- const WebVector<long long>& index_ids) = 0;
- virtual void OpenCursor(long long transaction_id,
- long long object_store_id,
- long long index_id,
- const WebIDBKeyRange&,
- WebIDBCursorDirection,
- bool key_only,
- WebIDBTaskType,
- WebIDBCallbacks*) = 0;
- virtual void Count(long long transaction_id,
- long long object_store_id,
- long long index_id,
- const WebIDBKeyRange&,
- WebIDBCallbacks*) = 0;
- virtual void Delete(long long transaction_id,
- long long object_store_id,
- WebIDBKeyView primary_key,
- WebIDBCallbacks*) = 0;
- virtual void DeleteRange(long long transaction_id,
- long long object_store_id,
- const WebIDBKeyRange&,
- WebIDBCallbacks*) = 0;
- virtual void Clear(long long transaction_id,
- long long object_store_id,
- WebIDBCallbacks*) = 0;
-
- protected:
- WebIDBDatabase() = default;
-};
-
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_DATABASE_H_
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_database_callbacks.h b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_database_callbacks.h
index 23433150468..deac9f44d73 100644
--- a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_database_callbacks.h
+++ b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_database_callbacks.h
@@ -40,11 +40,11 @@ struct WebIDBObservation;
class WebIDBDatabaseCallbacks {
public:
- using ObservationIndexMap = std::unordered_map<int32_t, std::vector<int32_t>>;
+ using ObservationIndexMap = std::unordered_map<int32_t, WebVector<int32_t>>;
// Maps observer to transaction, which needs an id and a scope.
using TransactionMap =
- std::unordered_map<int32_t, std::pair<int64_t, std::vector<int64_t>>>;
+ std::unordered_map<int32_t, std::pair<int64_t, WebVector<int64_t>>>;
virtual ~WebIDBDatabaseCallbacks() = default;
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_factory.h b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_factory.h
deleted file mode 100644
index 5739a5ef119..00000000000
--- a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_factory.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_FACTORY_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_FACTORY_H_
-
-#include "base/single_thread_task_runner.h"
-#include "third_party/blink/public/platform/web_common.h"
-
-namespace base {
-class SingleThreadTaskRunner;
-}
-
-namespace blink {
-
-class WebIDBCallbacks;
-class WebIDBDatabaseCallbacks;
-class WebSecurityOrigin;
-class WebString;
-
-class WebIDBFactory {
- public:
- virtual ~WebIDBFactory() = default;
-
- virtual void GetDatabaseNames(
- WebIDBCallbacks*,
- const WebSecurityOrigin&,
- scoped_refptr<base::SingleThreadTaskRunner>) = 0;
- virtual void Open(const WebString& name,
- long long version,
- long long transaction_id,
- WebIDBCallbacks*,
- WebIDBDatabaseCallbacks*,
- const WebSecurityOrigin&,
- scoped_refptr<base::SingleThreadTaskRunner>) = 0;
- virtual void DeleteDatabase(const WebString& name,
- WebIDBCallbacks*,
- const WebSecurityOrigin&,
- bool force_close,
- scoped_refptr<base::SingleThreadTaskRunner>) = 0;
-};
-
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_FACTORY_H_
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_key.h b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_key.h
index cdacdfe42d0..afd027054f6 100644
--- a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_key.h
+++ b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_key.h
@@ -62,7 +62,7 @@ class WebIDBKeyArrayView {
// The Blink object wrapped by WebIDBKey is immutable, so WebIDBKeyView
// instances are implicitly const references.
//
-// Having both WebIDBKeyView and WebIDBView is extra complexity, and we pay this
+// Having both WebIDBKeyView and WebIDBKey is extra complexity, and we pay this
// price to avoid unnecessary memory copying. Specifically, WebIDBKeyView is
// used to issue requests to the IndexedDB backing store.
//
@@ -99,6 +99,19 @@ class WebIDBKeyView {
// Only valid for NumberType.
BLINK_EXPORT double Number() const;
+ BLINK_EXPORT size_t SizeEstimate() const;
+
+ // TODO(cmp): Ensure |private_| can never be null.
+ //
+ // SizeEstimate() can be called when |private_| is null. That happens if and
+ // only if the |WebIDBKey| instance is created using WebIDBKey::CreateNull().
+ //
+ // Eventually, WebIDBKey::CreateNull() will change so that case will lead to
+ // a non-null |private_|. At that time, this null check can change to a
+ // DCHECK that |private_| is not null and the special null case handling can
+ // be removed.
+ BLINK_EXPORT bool IsNull() const { return !private_; }
+
private:
const IDBKey* const private_;
};
@@ -124,34 +137,34 @@ class WebIDBKey {
BLINK_EXPORT static WebIDBKey CreateNull() noexcept { return WebIDBKey(); }
// The default constructor must not be used explicitly.
- // It is only provided for WebVector's use.
+ // It is only provided for WebVector and Mojo's use.
BLINK_EXPORT WebIDBKey() noexcept;
BLINK_EXPORT WebIDBKey(WebIDBKey&&) noexcept;
BLINK_EXPORT WebIDBKey& operator=(WebIDBKey&&) noexcept;
+ // TODO(cmp): Remove copy and assignment constructors when Vector<->WebVector
+ // conversions are no longer needed.
+ BLINK_EXPORT WebIDBKey(const WebIDBKey& rkey);
+ BLINK_EXPORT WebIDBKey& operator=(const WebIDBKey& rkey);
+
BLINK_EXPORT ~WebIDBKey();
BLINK_EXPORT WebIDBKeyView View() const {
return WebIDBKeyView(private_.get());
}
+ BLINK_EXPORT size_t SizeEstimate() const { return View().SizeEstimate(); }
+
#if INSIDE_BLINK
explicit WebIDBKey(std::unique_ptr<IDBKey>) noexcept;
WebIDBKey& operator=(std::unique_ptr<IDBKey>) noexcept;
operator IDBKey*() const noexcept { return private_.get(); }
- std::unique_ptr<IDBKey> ReleaseIdbKey() noexcept {
- return std::move(private_);
- }
+ std::unique_ptr<IDBKey> ReleaseIdbKey() noexcept;
#endif // INSIDE_BLINK
private:
- // WebIDBKey has to be move-only, because std::unique_ptr is move-only. Making
- // the restriction explicit results in slightly better compilation error
- // messages in code that attempts copying.
- WebIDBKey(const WebIDBKey&) = delete;
- WebIDBKey& operator=(const WebIDBKey&) = delete;
std::unique_ptr<IDBKey> private_;
};
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_name_and_version.h b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_name_and_version.h
new file mode 100644
index 00000000000..6368c4aafaf
--- /dev/null
+++ b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_name_and_version.h
@@ -0,0 +1,20 @@
+#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_NAME_AND_VERSION_H_
+#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_NAME_AND_VERSION_H_
+
+#include "third_party/blink/public/platform/web_string.h"
+
+namespace blink {
+
+struct WebIDBNameAndVersion {
+ enum { kNoVersion = -1 };
+ WebString name;
+ int64_t version;
+
+ WebIDBNameAndVersion() : version(kNoVersion) {}
+ WebIDBNameAndVersion(WebString name, int64_t version)
+ : name(name), version(version) {}
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_NAME_AND_VERSION_H_
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_observation.h b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_observation.h
index dd0a1903630..3ba4de6e5dd 100644
--- a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_observation.h
+++ b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_observation.h
@@ -6,6 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_INDEXEDDB_WEB_IDB_OBSERVATION_H_
#include "third_party/blink/public/common/indexeddb/web_idb_types.h"
+#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom-shared.h"
#include "third_party/blink/public/platform/modules/indexeddb/web_idb_key_range.h"
#include "third_party/blink/public/platform/modules/indexeddb/web_idb_value.h"
@@ -13,12 +14,12 @@ namespace blink {
struct WebIDBObservation {
int64_t object_store_id;
- WebIDBOperationType type;
+ mojom::IDBOperationType type;
WebIDBKeyRange key_range;
WebIDBValue value;
WebIDBObservation(int64_t object_store_id,
- WebIDBOperationType type,
+ mojom::IDBOperationType type,
WebIDBKeyRange key_range,
WebIDBValue value)
: object_store_id(object_store_id),
diff --git a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_value.h b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_value.h
index ab318f08c14..e090e63106f 100644
--- a/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_value.h
+++ b/chromium/third_party/blink/public/platform/modules/indexeddb/web_idb_value.h
@@ -42,12 +42,7 @@ class WebIDBValue {
// TODO(pwnall): When Onion Soup-ing IndexedDB, ReleaseIDBValue() should
// take a v8::Isolate, and all the ownership tracking logic
// can be deleted.
- std::unique_ptr<IDBValue> ReleaseIdbValue() noexcept {
-#if DCHECK_IS_ON()
- ReleaseIdbValueOwnership();
-#endif // DCHECK_IS_ON()
- return std::move(private_);
- }
+ BLINK_EXPORT std::unique_ptr<IDBValue> ReleaseIdbValue() noexcept;
#endif // INSIDE_BLINK
private:
diff --git a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_callbacks.h b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_callbacks.h
new file mode 100644
index 00000000000..e7b9b57e9b4
--- /dev/null
+++ b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_callbacks.h
@@ -0,0 +1,24 @@
+// 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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_CALLBACKS_H_
+#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_CALLBACKS_H_
+
+#include <memory>
+
+#include "third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_decoding_info.h"
+#include "third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_info.h"
+#include "third_party/blink/public/platform/web_callbacks.h"
+
+namespace blink {
+
+using WebMediaCapabilitiesDecodingInfoCallbacks =
+ WebCallbacks<std::unique_ptr<WebMediaCapabilitiesDecodingInfo>, void>;
+
+using WebMediaCapabilitiesEncodingInfoCallbacks =
+ WebCallbacks<std::unique_ptr<WebMediaCapabilitiesInfo>, void>;
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_CALLBACKS_H_
diff --git a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_client.h b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_client.h
index 165392c16d4..0771c5c8e20 100644
--- a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_client.h
+++ b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_client.h
@@ -7,11 +7,11 @@
#include <memory>
-#include "third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_info.h"
+#include "third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_callbacks.h"
namespace blink {
-struct WebMediaConfiguration;
+struct WebMediaDecodingConfiguration;
// Interface between Blink and the Media layer.
class WebMediaCapabilitiesClient {
@@ -19,8 +19,8 @@ class WebMediaCapabilitiesClient {
virtual ~WebMediaCapabilitiesClient() = default;
virtual void DecodingInfo(
- const WebMediaConfiguration&,
- std::unique_ptr<WebMediaCapabilitiesQueryCallbacks>) = 0;
+ const WebMediaDecodingConfiguration&,
+ std::unique_ptr<WebMediaCapabilitiesDecodingInfoCallbacks>) = 0;
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_decoding_info.h b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_decoding_info.h
new file mode 100644
index 00000000000..fb8a97f6212
--- /dev/null
+++ b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_decoding_info.h
@@ -0,0 +1,22 @@
+// 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.
+
+#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_DECODING_INFO_H_
+#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_DECODING_INFO_H_
+
+#include "third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_info.h"
+#include "third_party/blink/public/platform/web_content_decryption_module_access.h"
+
+namespace blink {
+
+// Represents a MediaCapabilitiesDecodingInfo dictionary to be used outside of
+// Blink. This is set by consumers and sent back to Blink.
+struct WebMediaCapabilitiesDecodingInfo : WebMediaCapabilitiesInfo {
+ std::unique_ptr<WebContentDecryptionModuleAccess>
+ content_decryption_module_access;
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_DECODING_INFO_H_
diff --git a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_info.h b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_info.h
index cc31358de03..7a15df2a933 100644
--- a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_info.h
+++ b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_info.h
@@ -5,8 +5,6 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_INFO_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_INFO_H_
-#include "third_party/blink/public/platform/web_callbacks.h"
-
namespace blink {
// Represents a MediaCapabilitiesInfo dictionary to be used outside of Blink.
@@ -17,9 +15,6 @@ struct WebMediaCapabilitiesInfo {
bool power_efficient = false;
};
-using WebMediaCapabilitiesQueryCallbacks =
- WebCallbacks<std::unique_ptr<WebMediaCapabilitiesInfo>, void>;
-
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_INFO_H_
diff --git a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_key_system_configuration.h b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_key_system_configuration.h
new file mode 100644
index 00000000000..7c94a01f149
--- /dev/null
+++ b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_key_system_configuration.h
@@ -0,0 +1,48 @@
+// 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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_KEY_SYSTEM_CONFIGURATION_H_
+#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_KEY_SYSTEM_CONFIGURATION_H_
+
+#include "third_party/blink/public/platform/web_encrypted_media_types.h"
+#include "third_party/blink/public/platform/web_media_key_system_configuration.h"
+#include "third_party/blink/public/platform/web_vector.h"
+
+namespace blink {
+
+// Represents a MediaCapabilitiesKeySystemConfiguration dictionary to be used
+// outside of Blink. When possible, the properties will be converted from string
+// to Web types. The default values and behavior when invalid or missing is
+// specific to each property.
+struct WebMediaCapabilitiesKeySystemConfiguration {
+ // This property is mandatory and should always contain a value. However, it
+ // is not guaranteed that the value is valid.
+ WebString key_system;
+
+ // This is optional and will contain WebEncryptedMediaInitDataType::kUnknown
+ // if invalid or not present.
+ WebEncryptedMediaInitDataType init_data_type;
+
+ // Robustness properties are optional and will contain the empty string if not
+ // set. These values are not verified.
+ WebString audio_robustness = "";
+ WebString video_robustness = "";
+
+ // These two properties are optional and will be set to
+ // WebMediaKeySystemConfiguration::Requirement::kOptional if invalid or not
+ // present.
+ WebMediaKeySystemConfiguration::Requirement distinctive_identifier =
+ WebMediaKeySystemConfiguration::Requirement::kOptional;
+ WebMediaKeySystemConfiguration::Requirement persistent_state =
+ WebMediaKeySystemConfiguration::Requirement::kOptional;
+
+ // This is optional and will be an empty vector if not set. Each item in the
+ // vector will be parsed and will be set to
+ // WebEncryptedMediaSessionType::kUnknown if invalid.
+ WebVector<WebEncryptedMediaSessionType> session_types;
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_CAPABILITIES_KEY_SYSTEM_CONFIGURATION_H_
diff --git a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_configuration.h b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_configuration.h
index 00400dfd0a9..8ceed7835e4 100644
--- a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_configuration.h
+++ b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_configuration.h
@@ -21,6 +21,16 @@ enum class MediaConfigurationType {
// It is created by Blink and passed to consumers that can assume that all
// required fields are properly set.
struct WebMediaConfiguration {
+ WebMediaConfiguration() = default;
+
+ WebMediaConfiguration(
+ MediaConfigurationType type,
+ base::Optional<WebAudioConfiguration> audio_configuration,
+ base::Optional<WebVideoConfiguration> video_configuration)
+ : type(type),
+ audio_configuration(audio_configuration),
+ video_configuration(video_configuration) {}
+
MediaConfigurationType type;
base::Optional<WebAudioConfiguration> audio_configuration;
diff --git a/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_decoding_configuration.h b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_decoding_configuration.h
new file mode 100644
index 00000000000..568fa4152f6
--- /dev/null
+++ b/chromium/third_party/blink/public/platform/modules/media_capabilities/web_media_decoding_configuration.h
@@ -0,0 +1,35 @@
+// 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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_DECODING_CONFIGURATION_H_
+#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_DECODING_CONFIGURATION_H_
+
+#include "base/optional.h"
+#include "third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_key_system_configuration.h"
+#include "third_party/blink/public/platform/modules/media_capabilities/web_media_configuration.h"
+
+namespace blink {
+
+// Represents a MediaDecodingConfiguration dictionary to be used outside of
+// Blink. The added `key_system_configuration` is optional and, if set, can be
+// assumed to match the requirements set by the specification.
+struct WebMediaDecodingConfiguration : public WebMediaConfiguration {
+ WebMediaDecodingConfiguration() = default;
+
+ WebMediaDecodingConfiguration(
+ MediaConfigurationType type,
+ base::Optional<WebAudioConfiguration> audio_configuration,
+ base::Optional<WebVideoConfiguration> video_configuration,
+ base::Optional<WebMediaCapabilitiesKeySystemConfiguration>
+ key_system_configuration)
+ : WebMediaConfiguration(type, audio_configuration, video_configuration),
+ key_system_configuration(key_system_configuration) {}
+
+ base::Optional<WebMediaCapabilitiesKeySystemConfiguration>
+ key_system_configuration;
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIA_CAPABILITIES_WEB_MEDIA_DECODING_CONFIGURATION_H_
diff --git a/chromium/third_party/blink/public/platform/modules/mediasession/media_session.mojom b/chromium/third_party/blink/public/platform/modules/mediasession/media_session.mojom
index a053820fb71..f4261da046d 100644
--- a/chromium/third_party/blink/public/platform/modules/mediasession/media_session.mojom
+++ b/chromium/third_party/blink/public/platform/modules/mediasession/media_session.mojom
@@ -5,21 +5,10 @@
module blink.mojom;
import "mojo/public/mojom/base/string16.mojom";
+import "services/media_session/public/mojom/media_session.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
import "url/mojom/url.mojom";
-// Spec: https://wicg.github.io/mediasession/
-enum MediaSessionAction {
- PLAY,
- PAUSE,
- PREVIOUS_TRACK,
- NEXT_TRACK,
- SEEK_BACKWARD,
- SEEK_FORWARD,
-
- LAST = SEEK_FORWARD,
-};
-
enum MediaSessionPlaybackState {
NONE,
PAUSED,
@@ -46,7 +35,7 @@ struct MediaMetadata {
interface MediaSessionClient {
// Notifies the Blink side that a MediaSessionAction has been fired from the
// UI or the platform.
- DidReceiveAction(MediaSessionAction action);
+ DidReceiveAction(media_session.mojom.MediaSessionAction action);
};
interface MediaSessionService {
@@ -64,9 +53,10 @@ interface MediaSessionService {
// Notifies the browser that the event handler for |action| has been set,
// browser needs to show a media button in the UI or register listeners to the
// platform.
- EnableAction(MediaSessionAction action);
+ EnableAction(media_session.mojom.MediaSessionAction action);
+
// Notifies the browser that the event handler for |action| has been set,
// browser needs to hide the media button in the UI and unregister listeners
// from the platform.
- DisableAction(MediaSessionAction action);
+ DisableAction(media_session.mojom.MediaSessionAction action);
};
diff --git a/chromium/third_party/blink/public/platform/modules/push_messaging/web_push_client.h b/chromium/third_party/blink/public/platform/modules/push_messaging/web_push_client.h
index ccf5c05e7c4..539ee80f756 100644
--- a/chromium/third_party/blink/public/platform/modules/push_messaging/web_push_client.h
+++ b/chromium/third_party/blink/public/platform/modules/push_messaging/web_push_client.h
@@ -12,16 +12,14 @@
namespace blink {
-class WebServiceWorkerRegistration;
struct WebPushSubscriptionOptions;
class WebPushClient {
public:
virtual ~WebPushClient() = default;
- // Ownership of the WebServiceWorkerRegistration is not transferred.
// Ownership of the callbacks is transferred to the client.
- virtual void Subscribe(WebServiceWorkerRegistration*,
+ virtual void Subscribe(int64_t service_worker_registration_id,
const WebPushSubscriptionOptions&,
bool user_gesture,
std::unique_ptr<WebPushSubscriptionCallbacks>) = 0;
diff --git a/chromium/third_party/blink/public/platform/modules/push_messaging/web_push_provider.h b/chromium/third_party/blink/public/platform/modules/push_messaging/web_push_provider.h
index 041402ea997..da3b8b46528 100644
--- a/chromium/third_party/blink/public/platform/modules/push_messaging/web_push_provider.h
+++ b/chromium/third_party/blink/public/platform/modules/push_messaging/web_push_provider.h
@@ -12,7 +12,6 @@
namespace blink {
-class WebServiceWorkerRegistration;
struct WebPushError;
struct WebPushSubscriptionOptions;
@@ -25,21 +24,18 @@ class WebPushProvider {
virtual ~WebPushProvider() = default;
// Takes ownership of the WebPushSubscriptionCallbacks.
- // Does not take ownership of the WebServiceWorkerRegistration.
- virtual void Subscribe(WebServiceWorkerRegistration*,
+ virtual void Subscribe(int64_t service_worker_registration_id,
const WebPushSubscriptionOptions&,
bool user_gesture,
std::unique_ptr<WebPushSubscriptionCallbacks>) = 0;
// Takes ownership of the WebPushSubscriptionCallbacks.
- // Does not take ownership of the WebServiceWorkerRegistration.
virtual void GetSubscription(
- WebServiceWorkerRegistration*,
+ int64_t service_worker_registration_id,
std::unique_ptr<WebPushSubscriptionCallbacks>) = 0;
// Takes ownership if the WebPushUnsubscribeCallbacks.
- // Does not take ownership of the WebServiceWorkerRegistration.
- virtual void Unsubscribe(WebServiceWorkerRegistration*,
+ virtual void Unsubscribe(int64_t service_worker_registration_id,
std::unique_ptr<WebPushUnsubscribeCallbacks>) = 0;
};
diff --git a/chromium/third_party/blink/public/platform/modules/service_worker/web_navigation_preload_state.h b/chromium/third_party/blink/public/platform/modules/service_worker/web_navigation_preload_state.h
deleted file mode 100644
index be613cdf396..00000000000
--- a/chromium/third_party/blink/public/platform/modules/service_worker/web_navigation_preload_state.h
+++ /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.
-
-#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_NAVIGATION_PRELOAD_STATE_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_NAVIGATION_PRELOAD_STATE_H_
-
-#include "third_party/blink/public/platform/web_string.h"
-
-namespace blink {
-
-struct WebNavigationPreloadState {
- WebNavigationPreloadState(bool enabled, const WebString& header_value)
- : enabled(enabled), header_value(header_value) {}
-
- const bool enabled;
- const WebString header_value;
-};
-
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_NAVIGATION_PRELOAD_STATE_H_
diff --git a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h
index 901cf5aee95..8eceeaa0d34 100644
--- a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h
+++ b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h
@@ -18,7 +18,6 @@ namespace blink {
// interfaces receive blink.mojom.ServiceWorkerObjectInfo directly inside Blink.
// - content.mojom.ServiceWorker
// - content.mojom.ServiceWorkerContainer
-// - blink.mojom.ServiceWorkerRegistrationObject
//
// As we're on the border line between non-Blink and Blink variants, we need
// to use mojo::ScopedInterfaceEndpointHandle to pass Mojo types.
diff --git a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_provider.h b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_provider.h
index 2ebcdfb250e..711006cf109 100644
--- a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_provider.h
+++ b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_provider.h
@@ -32,7 +32,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_H_
#include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom-shared.h"
-#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_registration.h"
+#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_object_info.h"
#include "third_party/blink/public/platform/web_callbacks.h"
#include "third_party/blink/public/platform/web_vector.h"
@@ -50,10 +50,9 @@ struct WebServiceWorkerError;
//
// It is implemented by content::WebServiceWorkerProviderImpl.
//
-// WebServiceWorkerProvider is created in ServiceWorkerContainerClient::From(),
-// which is used to instantiate navigator.serviceWorker. It is
-// owned by ServiceWorkerContainerClient, which is a
-// garbage collected Supplement for Document.
+// WebServiceWorkerProvider is created in ServiceWorkerContainer::From(),
+// which is used to instantiate navigator.serviceWorker. It is owned by
+// ServiceWorkerContainer, which is a garbage collected Supplement for Document.
//
// Each ServiceWorkerContainer instance has a WebServiceWorkerProvider.
// ServiceWorkerContainer is called the "client" of the
@@ -66,19 +65,17 @@ class WebServiceWorkerProvider {
virtual void SetClient(WebServiceWorkerProviderClient*) {}
using WebServiceWorkerRegistrationCallbacks =
- WebCallbacks<std::unique_ptr<WebServiceWorkerRegistration::Handle>,
+ WebCallbacks<WebServiceWorkerRegistrationObjectInfo,
const WebServiceWorkerError&>;
using WebServiceWorkerGetRegistrationCallbacks =
- WebCallbacks<std::unique_ptr<WebServiceWorkerRegistration::Handle>,
+ WebCallbacks<WebServiceWorkerRegistrationObjectInfo,
const WebServiceWorkerError&>;
- using WebServiceWorkerRegistrationHandles =
- WebVector<std::unique_ptr<WebServiceWorkerRegistration::Handle>>;
using WebServiceWorkerGetRegistrationsCallbacks =
- WebCallbacks<std::unique_ptr<WebServiceWorkerRegistrationHandles>,
+ WebCallbacks<WebVector<WebServiceWorkerRegistrationObjectInfo>,
const WebServiceWorkerError&>;
using WebServiceWorkerGetRegistrationForReadyCallbacks =
- WebCallbacks<std::unique_ptr<WebServiceWorkerRegistration::Handle>, void>;
+ WebCallbacks<WebServiceWorkerRegistrationObjectInfo, void>;
// For ServiceWorkerContainer#register(). Requests the embedder to register a
// service worker.
diff --git a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration.h b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration.h
deleted file mode 100644
index 7cc0be77380..00000000000
--- a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration.h
+++ /dev/null
@@ -1,73 +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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_H_
-
-#include <memory>
-
-#include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom-shared.h"
-#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_error.h"
-#include "third_party/blink/public/platform/web_callbacks.h"
-#include "third_party/blink/public/platform/web_url.h"
-
-namespace blink {
-
-class WebServiceWorkerRegistrationProxy;
-struct WebNavigationPreloadState;
-
-// The interface of the registration representation in the embedder. The
-// embedder implements this interface and passes its handle
-// (WebServiceWorkerRegistration::Handle) to Blink. Blink accesses the
-// implementation via the handle to update or unregister the registration.
-class WebServiceWorkerRegistration {
- public:
- virtual ~WebServiceWorkerRegistration() = default;
-
- // The handle interface that retains a reference to the implementation of
- // WebServiceWorkerRegistration in the embedder and is owned by
- // ServiceWorkerRegistration object in Blink. The embedder must keep the
- // registration representation while Blink is owning this handle.
- class Handle {
- public:
- virtual ~Handle() = default;
- virtual WebServiceWorkerRegistration* Registration() { return nullptr; }
- };
-
- using WebServiceWorkerUpdateCallbacks =
- WebCallbacks<std::unique_ptr<Handle>, const WebServiceWorkerError&>;
- using WebServiceWorkerUnregistrationCallbacks =
- WebCallbacks<bool, const WebServiceWorkerError&>;
- using WebEnableNavigationPreloadCallbacks =
- WebCallbacks<void, const WebServiceWorkerError&>;
- using WebGetNavigationPreloadStateCallbacks =
- WebCallbacks<const WebNavigationPreloadState&,
- const WebServiceWorkerError&>;
- using WebSetNavigationPreloadHeaderCallbacks =
- WebCallbacks<void, const WebServiceWorkerError&>;
-
- virtual void SetProxy(WebServiceWorkerRegistrationProxy*) {}
- virtual WebServiceWorkerRegistrationProxy* Proxy() { return nullptr; }
- virtual void ProxyStopped() {}
-
- virtual WebURL Scope() const { return WebURL(); }
- virtual mojom::ServiceWorkerUpdateViaCache UpdateViaCache() const = 0;
- virtual int64_t RegistrationId() const = 0;
- virtual void Update(std::unique_ptr<WebServiceWorkerUpdateCallbacks>) {}
- virtual void Unregister(
- std::unique_ptr<WebServiceWorkerUnregistrationCallbacks>) {}
-
- virtual void EnableNavigationPreload(
- bool enable,
- std::unique_ptr<WebEnableNavigationPreloadCallbacks>) {}
- virtual void GetNavigationPreloadState(
- std::unique_ptr<WebGetNavigationPreloadStateCallbacks>) {}
- virtual void SetNavigationPreloadHeader(
- const WebString& value,
- std::unique_ptr<WebSetNavigationPreloadHeaderCallbacks>) {}
-};
-
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_H_
diff --git a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_object_info.h b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_object_info.h
new file mode 100644
index 00000000000..cdc2b575963
--- /dev/null
+++ b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_object_info.h
@@ -0,0 +1,69 @@
+// 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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_OBJECT_INFO_H_
+#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_OBJECT_INFO_H_
+
+#include "base/macros.h"
+#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
+#include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom-shared.h"
+#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h"
+#include "third_party/blink/public/platform/web_url.h"
+
+namespace blink {
+
+// This is to carry blink.mojom.ServiceWorkerRegistrationObjectInfo data from
+// //content across the boundary into Blink.
+// TODO(crbug.com/879019): Remove this class once we make the following Mojo
+// interfaces receive blink.mojom.ServiceWorkerRegistrationObjectInfo directly
+// inside Blink.
+// - content.mojom.ServiceWorker
+// - content.mojom.ServiceWorkerContainer
+//
+// As we're on the border line between non-Blink and Blink variants, we need
+// to use mojo::ScopedInterfaceEndpointHandle to pass Mojo types.
+struct WebServiceWorkerRegistrationObjectInfo {
+ WebServiceWorkerRegistrationObjectInfo(
+ int64_t registration_id,
+ WebURL scope,
+ mojom::ScriptType type,
+ mojom::ServiceWorkerUpdateViaCache update_via_cache,
+ mojo::ScopedInterfaceEndpointHandle host_ptr_info,
+ mojo::ScopedInterfaceEndpointHandle request,
+ WebServiceWorkerObjectInfo installing,
+ WebServiceWorkerObjectInfo waiting,
+ WebServiceWorkerObjectInfo active)
+ : registration_id(registration_id),
+ scope(std::move(scope)),
+ type(type),
+ update_via_cache(update_via_cache),
+ host_ptr_info(std::move(host_ptr_info)),
+ request(std::move(request)),
+ installing(std::move(installing)),
+ waiting(std::move(waiting)),
+ active(std::move(active)) {}
+ WebServiceWorkerRegistrationObjectInfo(
+ WebServiceWorkerRegistrationObjectInfo&& other) = default;
+
+ int64_t registration_id;
+
+ WebURL scope;
+ mojom::ScriptType type;
+ mojom::ServiceWorkerUpdateViaCache update_via_cache;
+
+ // For blink::mojom::ServiceWorkerRegistrationObjectHostAssociatedPtrInfo.
+ mojo::ScopedInterfaceEndpointHandle host_ptr_info;
+ // For blink::mojom::ServiceWorkerRegistrationObjectAssociatedRequest.
+ mojo::ScopedInterfaceEndpointHandle request;
+
+ WebServiceWorkerObjectInfo installing;
+ WebServiceWorkerObjectInfo waiting;
+ WebServiceWorkerObjectInfo active;
+
+ DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationObjectInfo);
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_OBJECT_INFO_H_
diff --git a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_proxy.h b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_proxy.h
deleted file mode 100644
index 995bcb87aea..00000000000
--- a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_registration_proxy.h
+++ /dev/null
@@ -1,34 +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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_PROXY_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_PROXY_H_
-
-#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h"
-
-#include <memory>
-
-namespace blink {
-
-// A proxy interface, passed via WebServiceWorkerRegistration.setProxy() from
-// blink to the embedder, to talk to the ServiceWorkerRegistration object from
-// embedder.
-class WebServiceWorkerRegistrationProxy {
- public:
- // Notifies that the registration entered the installation process.
- // The installing worker should be accessible via
- // WebServiceWorkerRegistration.installing.
- virtual void DispatchUpdateFoundEvent() = 0;
-
- virtual void SetInstalling(WebServiceWorkerObjectInfo) = 0;
- virtual void SetWaiting(WebServiceWorkerObjectInfo) = 0;
- virtual void SetActive(WebServiceWorkerObjectInfo) = 0;
-
- protected:
- virtual ~WebServiceWorkerRegistrationProxy() = default;
-};
-
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_PROXY_H_
diff --git a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_request.h b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_request.h
index 01bd29206c8..dfa9130a36d 100644
--- a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_request.h
+++ b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_request.h
@@ -6,11 +6,11 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_REQUEST_H_
#include "mojo/public/cpp/system/message_pipe.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "services/network/public/mojom/request_context_frame_type.mojom-shared.h"
#include "third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom-shared.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_private_ptr.h"
-#include "third_party/blink/public/platform/web_referrer_policy.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_url_request.h"
@@ -18,10 +18,10 @@
#if INSIDE_BLINK
#include <utility>
#include "third_party/blink/public/mojom/blob/blob.mojom-blink.h" // nogncheck
-#include "third_party/blink/renderer/platform/network/http_header_map.h"
-#include "third_party/blink/renderer/platform/weborigin/referrer.h"
-#include "third_party/blink/renderer/platform/wtf/forward.h"
-#include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
+#include "third_party/blink/renderer/platform/network/http_header_map.h" // nogncheck
+#include "third_party/blink/renderer/platform/weborigin/referrer.h" // nogncheck
+#include "third_party/blink/renderer/platform/wtf/forward.h" // nogncheck
+#include "third_party/blink/renderer/platform/wtf/text/string_hash.h" // nogncheck
#endif
namespace base {
@@ -34,6 +34,12 @@ class WebHTTPHeaderVisitor;
class WebServiceWorkerRequestPrivate;
// Represents a request for a web resource.
+//
+// Now this is used only to carry the request data of a fetch event dispatched
+// towards a service worker, from //content across the boundary into Blink.
+// TODO(crbug.com/879019): Remove this class once we make the following Mojo
+// interface receive the fetch event directly inside Blink.
+// - content.mojom.ServiceWorker
class BLINK_PLATFORM_EXPORT WebServiceWorkerRequest {
public:
~WebServiceWorkerRequest() { Reset(); }
@@ -71,9 +77,9 @@ class BLINK_PLATFORM_EXPORT WebServiceWorkerRequest {
long long size,
mojo::ScopedMessagePipeHandle);
- void SetReferrer(const WebString&, WebReferrerPolicy);
+ void SetReferrer(const WebString&, network::mojom::ReferrerPolicy);
WebURL ReferrerUrl() const;
- WebReferrerPolicy GetReferrerPolicy() const;
+ network::mojom::ReferrerPolicy GetReferrerPolicy() const;
void SetMode(network::mojom::FetchRequestMode);
network::mojom::FetchRequestMode Mode() const;
diff --git a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_response.h b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_response.h
index 97459feeed6..86575f2ccf1 100644
--- a/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_response.h
+++ b/chromium/third_party/blink/public/platform/modules/service_worker/web_service_worker_response.h
@@ -17,9 +17,9 @@
#include "third_party/blink/public/platform/web_vector.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/wtf/forward.h"
-#include "third_party/blink/renderer/platform/wtf/hash_map.h"
-#include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
+#include "third_party/blink/renderer/platform/wtf/forward.h" // nogncheck
+#include "third_party/blink/renderer/platform/wtf/hash_map.h" // nogncheck
+#include "third_party/blink/renderer/platform/wtf/text/string_hash.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/platform/modules/webauthn/authenticator.mojom b/chromium/third_party/blink/public/platform/modules/webauthn/authenticator.mojom
index 70441193b89..8a35cfa4102 100644
--- a/chromium/third_party/blink/public/platform/modules/webauthn/authenticator.mojom
+++ b/chromium/third_party/blink/public/platform/modules/webauthn/authenticator.mojom
@@ -62,6 +62,12 @@ struct MakeCredentialAuthenticatorResponse {
// A list of transports that the authenticator supports, with the transport
// used for the registration as the first element.
array<AuthenticatorTransport> transports;
+
+ // True if getClientExtensionResults() called on the returned
+ // PublicKeyCredential instance should contain an `hmacCreateSecret`
+ // extension output. If so, |hmac_create_secret| contains the actual value.
+ bool echo_hmac_create_secret;
+ bool hmac_create_secret;
};
struct GetAssertionAuthenticatorResponse {
@@ -257,6 +263,10 @@ struct PublicKeyCredentialCreationOptions {
// devices to establish a pairingless BLE connection.
// TODO(crbug.com/842371): Add link to spec when available.
CableRegistration? cable_registration_data;
+
+ // The contents of the hmacCreateSecret extension, if any. See
+ // https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fido-client-to-authenticator-protocol-v2.0-rd-20180702.html#sctn-hmac-secret-extension
+ bool hmac_create_secret;
};
enum PublicKeyCredentialType {
diff --git a/chromium/third_party/blink/public/platform/platform.h b/chromium/third_party/blink/public/platform/platform.h
index 2f57bdd1ef3..e3f1a22160b 100644
--- a/chromium/third_party/blink/public/platform/platform.h
+++ b/chromium/third_party/blink/public/platform/platform.h
@@ -50,7 +50,6 @@
#include "third_party/blink/public/mojom/loader/code_cache.mojom-shared.h"
#include "third_party/blink/public/platform/blame_context.h"
#include "third_party/blink/public/platform/code_cache_loader.h"
-#include "third_party/blink/public/platform/modules/indexeddb/web_idb_factory.h"
#include "third_party/blink/public/platform/user_metrics_action.h"
#include "third_party/blink/public/platform/web_audio_device.h"
#include "third_party/blink/public/platform/web_common.h"
@@ -65,12 +64,15 @@
#include "third_party/blink/public/platform/web_url_error.h"
#include "third_party/blink/public/platform/web_url_loader.h"
#include "third_party/blink/public/platform/web_url_loader_factory.h"
-#include "third_party/webrtc/p2p/base/portallocator.h"
namespace base {
class SingleThreadTaskRunner;
}
+namespace cricket {
+class PortAllocator;
+}
+
namespace gpu {
class GpuMemoryBufferManager;
}
@@ -167,6 +169,12 @@ class BLINK_PLATFORM_EXPORT Platform {
// You should not pass in a Platform object that is not fully instantiated.
static void SetCurrentPlatformForTesting(Platform*);
+ // This sets up a minimally viable implementation of blink::Thread without
+ // changing the current Platform. This is essentially a workaround for the
+ // initialization order in ScopedUnittestsEnvironmentSetup, and nobody else
+ // should use this.
+ static void CreateMainThreadForTesting();
+
// These are dirty workaround for tests requiring the main thread task runner
// from a non-main thread. If your test needs base::ScopedTaskEnvironment
// and a non-main thread may call MainThread()->GetTaskRunner(), call
@@ -289,11 +297,6 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual WebString ConvertIDNToUnicode(const WebString& host) { return host; }
- // IndexedDB ----------------------------------------------------------
-
- // Must return non-null.
- virtual std::unique_ptr<WebIDBFactory> CreateIdbFactory() { return nullptr; }
-
// History -------------------------------------------------------------
// Returns the hash for the given canonicalized URL for use in visited
@@ -341,7 +344,7 @@ class BLINK_PLATFORM_EXPORT Platform {
// get a factory bundle from the browser process, and compose a new factory
// using both the bundle and this default.
//
- // TODO(kinuko): See if we can deprecate this too.
+ // TODO(kinuko): https://crbug.com/891872: See if we can deprecate this too.
virtual std::unique_ptr<WebURLLoaderFactory> CreateDefaultURLLoaderFactory() {
return nullptr;
}
@@ -428,38 +431,34 @@ class BLINK_PLATFORM_EXPORT Platform {
// Threads -------------------------------------------------------
- // blink::Thread creation is no longer customizable in Platform.
- // CreateThread() always creates a new physical thread for Blink.
- // Platform maintains the thread-local storage containing each blink::Thread
- // object, so that CurrentThread() could return the correct thread object.
- //
- // TODO(yutak): These non-virtual functions should be moved to somewhere
- // else, because they no longer require embedder's implementation.
+ // Most of threading functionality has moved to blink::Thread. The functions
+ // in Platform are deprecated; use the counterpart in blink::Thread as noted
+ // below.
- // Creates a new thread. This may be called from a non-main thread (e.g.
- // nested Web workers).
+ // DEPRECATED: Use Thread::CreateThread() instead.
std::unique_ptr<Thread> CreateThread(const ThreadCreationParams&);
- // Creates a WebAudio-specific thread with the elevated priority. Do NOT use
- // for any other purpose.
+ // DEPRECATED: Use Thread::CreateWebAudioThread() instead.
std::unique_ptr<Thread> CreateWebAudioThread();
- // Create and initialize the compositor thread. The thread is saved in
- // Platform, and will be accessible through CompositorThread().
- void InitializeCompositorThread();
-
- // Returns an interface to the current thread.
+ // DEPRECATED: Use Thread::Current() instead.
Thread* CurrentThread();
- // Returns an interface to the main thread.
+ // DEPRECATED: Use Thread::MainThread() instead.
Thread* MainThread();
- // Returns an interface to the compositor thread. This can be null if the
- // renderer was created with threaded rendering disabled.
+ // DEPRECATED: Use Thread::CompositorThread() instead.
Thread* CompositorThread();
+ // The two compositor-related functions below are called by the embedder.
+ // TODO(yutak): Perhaps we should move these to somewhere else?
+
+ // Create and initialize the compositor thread. After this function
+ // completes, you can access CompositorThreadTaskRunner().
+ void CreateAndSetCompositorThread();
+
// Returns the task runner of the compositor thread. This is available
- // once InitializeCompositorThread() is called.
+ // once CreateAndSetCompositorThread() is called.
scoped_refptr<base::SingleThreadTaskRunner> CompositorThreadTaskRunner();
// This is called after the compositor thread is created, so the embedder
@@ -655,9 +654,7 @@ class BLINK_PLATFORM_EXPORT Platform {
// May return null if WebRTC functionality is not implemented.
virtual std::unique_ptr<cricket::PortAllocator> CreateWebRtcPortAllocator(
- WebLocalFrame* frame) {
- return nullptr;
- }
+ WebLocalFrame* frame);
// Creates a WebCanvasCaptureHandler to capture Canvas output.
virtual std::unique_ptr<WebCanvasCaptureHandler>
@@ -766,28 +763,9 @@ class BLINK_PLATFORM_EXPORT Platform {
// runs during Chromium's build step).
virtual bool IsTakingV8ContextSnapshot() { return false; }
- protected:
- Thread* main_thread_;
-
private:
- static void InitializeCommon(Platform* platform);
-
- void WaitUntilThreadTLSUpdate(Thread*);
- void UpdateThreadTLS(Thread* thread, base::WaitableEvent* event);
-
- // Platform owns the main thread in most cases. The pointer value is the same
- // as main_thread_ if this variable is non-null.
- //
- // This variable is null if (and only if) ScopedTestingPlatformSupport<>
- // overrides the old Platform. In this case, main_thread_ points to the old
- // Platform's main thread. See testing_platform_support.h for this.
- std::unique_ptr<Thread> owned_main_thread_;
-
- std::unique_ptr<Thread> compositor_thread_;
-
- // We can't use WTF stuff here. Ultimately these should go away (see comments
- // near CreateThread()), though.
- base::ThreadLocalStorage::Slot current_thread_slot_;
+ static void InitializeCommon(Platform* platform,
+ std::unique_ptr<Thread> main_thread);
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/referrer.mojom b/chromium/third_party/blink/public/platform/referrer.mojom
deleted file mode 100644
index b7dc06c8e81..00000000000
--- a/chromium/third_party/blink/public/platform/referrer.mojom
+++ /dev/null
@@ -1,36 +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.
-
-module blink.mojom;
-
-import "url/mojom/url.mojom";
-
-// Maps to blink::WebReferrerPolicy in
-// src/third_party/blink/public/platform/WebReferrerPolicy.h.
-//
-// TODO(rockot): Update all WebReferrerPolicy consumers to use this type
-// instead, and remove the typemap.
-// Don't make backwards-incompatible changes to this definition!
-// It's used in PageState serialization, so backwards incompatible changes
-// would cause stored PageState objects to be un-parseable. Please contact the
-// page state serialization owners before making such a change.
-enum ReferrerPolicy {
- ALWAYS,
- DEFAULT,
- NO_REFERRER_WHEN_DOWNGRADE,
- NEVER,
- ORIGIN,
- ORIGIN_WHEN_CROSS_ORIGIN,
- SAME_ORIGIN,
- STRICT_ORIGIN,
- NO_REFERRER_WHEN_DOWNGRADE_ORIGIN_WHEN_CROSS_ORIGIN,
-};
-
-// This struct holds a referrer URL, as well as the referrer policy to be
-// applied to this URL. When passing around referrers that will eventually end
-// up being used for URL requests, always use this struct.
-struct Referrer {
- url.mojom.Url url;
- ReferrerPolicy policy;
-};
diff --git a/chromium/third_party/blink/public/platform/referrer_policy.typemap b/chromium/third_party/blink/public/platform/referrer_policy.typemap
deleted file mode 100644
index ba4b7e69ad1..00000000000
--- a/chromium/third_party/blink/public/platform/referrer_policy.typemap
+++ /dev/null
@@ -1,9 +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.
-
-mojom = "//third_party/blink/public/platform/referrer.mojom"
-public_headers = [ "//third_party/blink/public/platform/web_referrer_policy.h" ]
-traits_headers =
- [ "//third_party/blink/public/platform/referrer_policy_enum_traits.h" ]
-type_mappings = [ "blink.mojom.ReferrerPolicy=::blink::WebReferrerPolicy" ]
diff --git a/chromium/third_party/blink/public/platform/referrer_policy_enum_traits.h b/chromium/third_party/blink/public/platform/referrer_policy_enum_traits.h
deleted file mode 100644
index 9dd75175a82..00000000000
--- a/chromium/third_party/blink/public/platform/referrer_policy_enum_traits.h
+++ /dev/null
@@ -1,87 +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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_REFERRER_POLICY_ENUM_TRAITS_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_REFERRER_POLICY_ENUM_TRAITS_H_
-
-#include "base/logging.h"
-#include "mojo/public/cpp/bindings/enum_traits.h"
-#include "third_party/blink/public/platform/referrer.mojom-shared.h"
-#include "third_party/blink/public/platform/web_referrer_policy.h"
-
-namespace mojo {
-
-template <>
-struct EnumTraits<::blink::mojom::ReferrerPolicy, ::blink::WebReferrerPolicy> {
- static ::blink::mojom::ReferrerPolicy ToMojom(
- ::blink::WebReferrerPolicy policy) {
- switch (policy) {
- case ::blink::kWebReferrerPolicyAlways:
- return ::blink::mojom::ReferrerPolicy::ALWAYS;
- case ::blink::kWebReferrerPolicyDefault:
- return ::blink::mojom::ReferrerPolicy::DEFAULT;
- case ::blink::kWebReferrerPolicyNoReferrerWhenDowngrade:
- return ::blink::mojom::ReferrerPolicy::NO_REFERRER_WHEN_DOWNGRADE;
- case ::blink::kWebReferrerPolicyNever:
- return ::blink::mojom::ReferrerPolicy::NEVER;
- case ::blink::kWebReferrerPolicyOrigin:
- return ::blink::mojom::ReferrerPolicy::ORIGIN;
- case ::blink::kWebReferrerPolicyOriginWhenCrossOrigin:
- return ::blink::mojom::ReferrerPolicy::ORIGIN_WHEN_CROSS_ORIGIN;
- case ::blink::kWebReferrerPolicySameOrigin:
- return ::blink::mojom::ReferrerPolicy::SAME_ORIGIN;
- case ::blink::kWebReferrerPolicyStrictOrigin:
- return ::blink::mojom::ReferrerPolicy::STRICT_ORIGIN;
- case ::blink::
- kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin:
- return ::blink::mojom::ReferrerPolicy::
- NO_REFERRER_WHEN_DOWNGRADE_ORIGIN_WHEN_CROSS_ORIGIN;
- default:
- NOTREACHED();
- return ::blink::mojom::ReferrerPolicy::DEFAULT;
- }
- }
-
- static bool FromMojom(::blink::mojom::ReferrerPolicy policy,
- ::blink::WebReferrerPolicy* out) {
- switch (policy) {
- case ::blink::mojom::ReferrerPolicy::ALWAYS:
- *out = ::blink::kWebReferrerPolicyAlways;
- return true;
- case ::blink::mojom::ReferrerPolicy::DEFAULT:
- *out = ::blink::kWebReferrerPolicyDefault;
- return true;
- case ::blink::mojom::ReferrerPolicy::NO_REFERRER_WHEN_DOWNGRADE:
- *out = ::blink::kWebReferrerPolicyNoReferrerWhenDowngrade;
- return true;
- case ::blink::mojom::ReferrerPolicy::NEVER:
- *out = ::blink::kWebReferrerPolicyNever;
- return true;
- case ::blink::mojom::ReferrerPolicy::ORIGIN:
- *out = ::blink::kWebReferrerPolicyOrigin;
- return true;
- case ::blink::mojom::ReferrerPolicy::ORIGIN_WHEN_CROSS_ORIGIN:
- *out = ::blink::kWebReferrerPolicyOriginWhenCrossOrigin;
- return true;
- case ::blink::mojom::ReferrerPolicy::SAME_ORIGIN:
- *out = ::blink::kWebReferrerPolicySameOrigin;
- return true;
- case ::blink::mojom::ReferrerPolicy::STRICT_ORIGIN:
- *out = ::blink::kWebReferrerPolicyStrictOrigin;
- return true;
- case ::blink::mojom::ReferrerPolicy::
- NO_REFERRER_WHEN_DOWNGRADE_ORIGIN_WHEN_CROSS_ORIGIN:
- *out = ::blink::
- kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin;
- return true;
- default:
- NOTREACHED();
- return false;
- }
- }
-};
-
-} // namespace mojo
-
-#endif
diff --git a/chromium/third_party/blink/public/platform/reporting.mojom b/chromium/third_party/blink/public/platform/reporting.mojom
index c9e91275a32..34cd006e901 100644
--- a/chromium/third_party/blink/public/platform/reporting.mojom
+++ b/chromium/third_party/blink/public/platform/reporting.mojom
@@ -50,8 +50,9 @@ interface ReportingServiceProxy {
//
// (See //third_party/blink/renderer/core/frame/feature_policy_violation_report_body.h.)
QueueFeaturePolicyViolationReport(url.mojom.Url url,
- string policy,
- string message,
+ string policy_id,
+ string disposition,
+ string? message,
string? source_file,
int32 line_number,
int32 column_number);
diff --git a/chromium/third_party/blink/public/platform/scheduler/DEPS b/chromium/third_party/blink/public/platform/scheduler/DEPS
index be14c6e7068..e4bbc967b96 100644
--- a/chromium/third_party/blink/public/platform/scheduler/DEPS
+++ b/chromium/third_party/blink/public/platform/scheduler/DEPS
@@ -6,6 +6,7 @@ include_rules = [
"+base/memory/ptr_util.h",
"+base/memory/ref_counted.h",
"+base/message_loop/message_loop.h",
+ "+base/message_loop/message_pump.h",
"+base/optional.h",
"+base/single_thread_task_runner.h",
"+base/threading/thread.h",
diff --git a/chromium/third_party/blink/public/platform/scheduler/child/webthread_base.h b/chromium/third_party/blink/public/platform/scheduler/child/webthread_base.h
deleted file mode 100644
index 707ae112497..00000000000
--- a/chromium/third_party/blink/public/platform/scheduler/child/webthread_base.h
+++ /dev/null
@@ -1,79 +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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_CHILD_WEBTHREAD_BASE_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_CHILD_WEBTHREAD_BASE_H_
-
-#include <map>
-#include <memory>
-
-#include "base/location.h"
-#include "base/memory/scoped_refptr.h"
-#include "base/message_loop/message_loop.h"
-#include "base/threading/thread.h"
-#include "third_party/blink/public/platform/web_common.h"
-#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
-
-namespace base {
-namespace sequence_manager {
-class TaskTimeObserver;
-}
-} // namespace base
-
-namespace blink {
-namespace scheduler {
-
-// TODO(scheduler-dev): Do not expose this class in Blink public API.
-class BLINK_PLATFORM_EXPORT WebThreadBase : public Thread {
- public:
- ~WebThreadBase() override;
-
- // CreateWorkerThread() may be called from a non-main thread.
- static std::unique_ptr<WebThreadBase> CreateWorkerThread(
- const ThreadCreationParams& params);
-
- static std::unique_ptr<WebThreadBase> CreateCompositorThread(
- const ThreadCreationParams& params);
-
- // Thread implementation.
- bool IsCurrentThread() const override;
- PlatformThreadId ThreadId() const override = 0;
-
- void AddTaskObserver(TaskObserver* observer) override;
- void RemoveTaskObserver(TaskObserver* observer) override;
-
- void AddTaskTimeObserver(
- base::sequence_manager::TaskTimeObserver* task_time_observer) override;
- void RemoveTaskTimeObserver(
- base::sequence_manager::TaskTimeObserver* task_time_observer) override;
-
- virtual void Init() = 0;
-
- protected:
- class TaskObserverAdapter;
-
- WebThreadBase();
-
- virtual void AddTaskObserverInternal(
- base::MessageLoop::TaskObserver* observer);
- virtual void RemoveTaskObserverInternal(
- base::MessageLoop::TaskObserver* observer);
-
- virtual void AddTaskTimeObserverInternal(
- base::sequence_manager::TaskTimeObserver*) {}
- virtual void RemoveTaskTimeObserverInternal(
- base::sequence_manager::TaskTimeObserver*) {}
-
- static void RunWebThreadIdleTask(Thread::IdleTask idle_task,
- base::TimeTicks deadline);
-
- private:
- typedef std::map<TaskObserver*, TaskObserverAdapter*> TaskObserverMap;
- TaskObserverMap task_observer_map_;
-};
-
-} // namespace scheduler
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_CHILD_WEBTHREAD_BASE_H_
diff --git a/chromium/third_party/blink/public/platform/scheduler/single_thread_idle_task_runner.h b/chromium/third_party/blink/public/platform/scheduler/single_thread_idle_task_runner.h
deleted file mode 100644
index 99190333206..00000000000
--- a/chromium/third_party/blink/public/platform/scheduler/single_thread_idle_task_runner.h
+++ /dev/null
@@ -1,112 +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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_SINGLE_THREAD_IDLE_TASK_RUNNER_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_SINGLE_THREAD_IDLE_TASK_RUNNER_H_
-
-#include <map>
-
-#include "base/bind.h"
-#include "base/callback.h"
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "base/single_thread_task_runner.h"
-#include "base/time/time.h"
-#include "base/trace_event/trace_event.h"
-#include "third_party/blink/public/platform/web_common.h"
-
-namespace base {
-namespace trace_event {
-class BlameContext;
-}
-} // namespace base
-
-namespace blink {
-namespace scheduler {
-class IdleHelper;
-
-// A SingleThreadIdleTaskRunner is a task runner for running idle tasks. Idle
-// tasks have an unbound argument which is bound to a deadline
-// (in base::TimeTicks) when they are run. The idle task is expected to
-// complete by this deadline.
-class SingleThreadIdleTaskRunner
- : public base::RefCountedThreadSafe<SingleThreadIdleTaskRunner> {
- public:
- using IdleTask = base::OnceCallback<void(base::TimeTicks)>;
-
- // Used to request idle task deadlines and signal posting of idle tasks.
- class BLINK_PLATFORM_EXPORT Delegate {
- public:
- Delegate();
- virtual ~Delegate();
-
- // Signals that an idle task has been posted. This will be called on the
- // posting thread, which may not be the same thread as the
- // SingleThreadIdleTaskRunner runs on.
- virtual void OnIdleTaskPosted() = 0;
-
- // Signals that a new idle task is about to be run and returns the deadline
- // for this idle task.
- virtual base::TimeTicks WillProcessIdleTask() = 0;
-
- // Signals that an idle task has finished being run.
- virtual void DidProcessIdleTask() = 0;
-
- // Returns the current time.
- virtual base::TimeTicks NowTicks() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Delegate);
- };
-
- // NOTE Category strings must have application lifetime (statics or
- // literals). They may not include " chars.
- SingleThreadIdleTaskRunner(
- scoped_refptr<base::SingleThreadTaskRunner> idle_priority_task_runner,
- Delegate* delegate);
-
- virtual void PostIdleTask(const base::Location& from_here,
- IdleTask idle_task);
-
- // |idle_task| is eligible to run after the next time an idle period starts
- // after |delay|. Note this has after wake-up semantics, i.e. unless
- // something else wakes the CPU up, this won't run.
- virtual void PostDelayedIdleTask(const base::Location& from_here,
- const base::TimeDelta delay,
- IdleTask idle_task);
-
- virtual void PostNonNestableIdleTask(const base::Location& from_here,
- IdleTask idle_task);
-
- bool RunsTasksInCurrentSequence() const;
-
- void SetBlameContext(base::trace_event::BlameContext* blame_context);
-
- protected:
- virtual ~SingleThreadIdleTaskRunner();
-
- private:
- friend class base::RefCountedThreadSafe<SingleThreadIdleTaskRunner>;
- friend class IdleHelper;
-
- void RunTask(IdleTask idle_task);
-
- void EnqueueReadyDelayedIdleTasks();
-
- using DelayedIdleTask = std::pair<const base::Location, base::OnceClosure>;
-
- scoped_refptr<base::SingleThreadTaskRunner> idle_priority_task_runner_;
- std::multimap<base::TimeTicks, DelayedIdleTask> delayed_idle_tasks_;
- Delegate* delegate_; // NOT OWNED
- base::trace_event::BlameContext* blame_context_; // Not owned.
- base::WeakPtr<SingleThreadIdleTaskRunner> weak_scheduler_ptr_;
- base::WeakPtrFactory<SingleThreadIdleTaskRunner> weak_factory_;
- DISALLOW_COPY_AND_ASSIGN(SingleThreadIdleTaskRunner);
-};
-
-} // namespace scheduler
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_SINGLE_THREAD_IDLE_TASK_RUNNER_H_
diff --git a/chromium/third_party/blink/public/platform/scheduler/renderer_process_type.h b/chromium/third_party/blink/public/platform/scheduler/web_renderer_process_type.h
index 2615fec6127..3e4804a4deb 100644
--- a/chromium/third_party/blink/public/platform/scheduler/renderer_process_type.h
+++ b/chromium/third_party/blink/public/platform/scheduler/web_renderer_process_type.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_RENDERER_PROCESS_TYPE_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_RENDERER_PROCESS_TYPE_H_
+#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_WEB_RENDERER_PROCESS_TYPE_H_
+#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_WEB_RENDERER_PROCESS_TYPE_H_
namespace blink {
namespace scheduler {
-enum class RendererProcessType {
+enum class WebRendererProcessType {
kExtensionRenderer,
kRenderer,
};
@@ -16,4 +16,4 @@ enum class RendererProcessType {
} // namespace scheduler
} // namespace blink
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_RENDERER_PROCESS_TYPE_H_
+#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_SCHEDULER_WEB_RENDERER_PROCESS_TYPE_H_
diff --git a/chromium/third_party/blink/public/platform/scheduler/web_thread_scheduler.h b/chromium/third_party/blink/public/platform/scheduler/web_thread_scheduler.h
index 53ae3001e16..c1485f8cab5 100644
--- a/chromium/third_party/blink/public/platform/scheduler/web_thread_scheduler.h
+++ b/chromium/third_party/blink/public/platform/scheduler/web_thread_scheduler.h
@@ -7,11 +7,11 @@
#include <memory>
#include "base/macros.h"
+#include "base/message_loop/message_pump.h"
#include "base/optional.h"
#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
#include "build/build_config.h"
-#include "third_party/blink/public/platform/scheduler/single_thread_idle_task_runner.h"
#include "third_party/blink/public/platform/scheduler/web_rail_mode_observer.h"
#include "third_party/blink/public/platform/scheduler/web_render_widget_scheduling_state.h"
#include "third_party/blink/public/platform/web_common.h"
@@ -22,7 +22,7 @@
namespace base {
namespace trace_event {
class BlameContext;
-}
+} // namespace trace_event
} // namespace base
namespace blink {
@@ -32,12 +32,12 @@ class WebInputEvent;
namespace viz {
struct BeginFrameArgs;
-}
+} // namespace viz
namespace blink {
namespace scheduler {
-enum class RendererProcessType;
+enum class WebRendererProcessType;
class BLINK_PLATFORM_EXPORT WebThreadScheduler {
public:
@@ -47,11 +47,6 @@ class BLINK_PLATFORM_EXPORT WebThreadScheduler {
//
// Functions below work on a scheduler instance on any thread.
- // Returns the idle task runner. Tasks posted to this runner may be reordered
- // relative to other task types and may be starved for an arbitrarily long
- // time if no idle time is available.
- virtual scoped_refptr<SingleThreadIdleTaskRunner> IdleTaskRunner() = 0;
-
// Shuts down the scheduler by dropping any remaining pending work in the work
// queues. After this call any work posted to the task runners will be
// silently dropped.
@@ -63,10 +58,13 @@ class BLINK_PLATFORM_EXPORT WebThreadScheduler {
// the main thread. They have default implementation that only does
// NOTREACHED(), and are overridden only by the main thread scheduler.
- // If |initial_virtual_time| is specified then the scheduler will be created
- // with virtual time enabled and paused, and base::Time will be overridden to
- // start at |initial_virtual_time|.
+ // If |message_pump| is null caller must have registered one using
+ // base::MessageLoop.
+ // If |initial_virtual_time| is specified then the
+ // scheduler will be created with virtual time enabled and paused, and
+ // base::Time will be overridden to start at |initial_virtual_time|.
static std::unique_ptr<WebThreadScheduler> CreateMainThreadScheduler(
+ std::unique_ptr<base::MessagePump> message_pump = nullptr,
base::Optional<base::Time> initial_virtual_time = base::nullopt);
// Returns compositor thread scheduler for the compositor thread
@@ -213,7 +211,7 @@ class BLINK_PLATFORM_EXPORT WebThreadScheduler {
// Sets the kind of renderer process. Should be called on the main thread
// once.
- virtual void SetRendererProcessType(RendererProcessType type);
+ virtual void SetRendererProcessType(WebRendererProcessType type);
// Returns a WebScopedVirtualTimePauser which can be used to vote for pausing
// virtual time. Virtual time will be paused if any WebScopedVirtualTimePauser
diff --git a/chromium/third_party/blink/public/platform/task_type.h b/chromium/third_party/blink/public/platform/task_type.h
index fb5425c7dfb..6589eb11cfc 100644
--- a/chromium/third_party/blink/public/platform/task_type.h
+++ b/chromium/third_party/blink/public/platform/task_type.h
@@ -181,6 +181,9 @@ enum class TaskType : unsigned {
// * //third_party/blink/renderer/core/workers
kInternalWorker = 36,
+ // Translation task that freezes when the frame is not visible.
+ kInternalTranslation = 55,
+
// Tasks used at IntersectionObserver.
kInternalIntersectionObserver = 44,
@@ -202,7 +205,7 @@ enum class TaskType : unsigned {
kWorkerThreadTaskQueueV8 = 47,
kWorkerThreadTaskQueueCompositor = 48,
- kCount = 55,
+ kCount = 56,
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_application_cache_host.h b/chromium/third_party/blink/public/platform/web_application_cache_host.h
index 722fbc2127d..50322fc1be1 100644
--- a/chromium/third_party/blink/public/platform/web_application_cache_host.h
+++ b/chromium/third_party/blink/public/platform/web_application_cache_host.h
@@ -100,7 +100,7 @@ class WebApplicationCacheHost {
// Called as the main resource is retrieved.
virtual void DidReceiveResponseForMainResource(const WebURLResponse&) {}
- virtual void DidReceiveDataForMainResource(const char* data, unsigned len) {}
+ virtual void DidReceiveDataForMainResource(const char* data, size_t len) {}
virtual void DidFinishLoadingMainResource(bool success) {}
// Called on behalf of the scriptable interface.
diff --git a/chromium/third_party/blink/public/platform/web_audio_device.h b/chromium/third_party/blink/public/platform/web_audio_device.h
index a485b486976..5bb6a8ab6cb 100644
--- a/chromium/third_party/blink/public/platform/web_audio_device.h
+++ b/chromium/third_party/blink/public/platform/web_audio_device.h
@@ -58,6 +58,16 @@ class WebAudioDevice {
virtual void Start() = 0;
virtual void Stop() = 0;
+
+ // Pause an audio device so that the device doesn't produce
+ // requests for audio frames. This is used when a web frame is
+ // frozen. This shouldn't be observable to the web application.
+ virtual void Pause() = 0;
+
+ // Resume an audio device that was previously paused. Used
+ // for frozen frames.
+ virtual void Resume() = 0;
+
virtual double SampleRate() = 0;
virtual int FramesPerBuffer() = 0;
};
diff --git a/chromium/third_party/blink/public/platform/web_audio_source_provider_client.h b/chromium/third_party/blink/public/platform/web_audio_source_provider_client.h
index a8a616141e1..1db41039913 100644
--- a/chromium/third_party/blink/public/platform/web_audio_source_provider_client.h
+++ b/chromium/third_party/blink/public/platform/web_audio_source_provider_client.h
@@ -29,7 +29,7 @@ namespace blink {
class WebAudioSourceProviderClient {
public:
- virtual void SetFormat(size_t number_of_channels, float sample_rate) = 0;
+ virtual void SetFormat(uint32_t number_of_channels, float sample_rate) = 0;
protected:
virtual ~WebAudioSourceProviderClient() = default;
diff --git a/chromium/third_party/blink/public/platform/web_canonical_cookie.h b/chromium/third_party/blink/public/platform/web_canonical_cookie.h
index 8fb3ea57f41..a19d999936e 100644
--- a/chromium/third_party/blink/public/platform/web_canonical_cookie.h
+++ b/chromium/third_party/blink/public/platform/web_canonical_cookie.h
@@ -10,8 +10,7 @@
#include "services/network/public/mojom/restricted_cookie_manager.mojom-shared.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
-#include "third_party/blink/renderer/platform/platform_export.h"
-#include "third_party/blink/renderer/platform/wtf/forward.h"
+#include "third_party/blink/renderer/platform/platform_export.h" // nogncheck
namespace blink {
@@ -60,9 +59,6 @@ class BLINK_PLATFORM_EXPORT WebCanonicalCookie {
const WebString& cookie_line,
base::Time creation_time);
- // Serializing, for the document.cookie API.
- static String BuildCookieLine(const Vector<WebCanonicalCookie>& cookies);
-
static constexpr const network::mojom::CookieSameSite kDefaultSameSiteMode =
network::mojom::CookieSameSite::NO_RESTRICTION;
static constexpr const network::mojom::CookiePriority kDefaultPriority =
diff --git a/chromium/third_party/blink/public/platform/web_coalesced_input_event.h b/chromium/third_party/blink/public/platform/web_coalesced_input_event.h
index 19653c81a6e..71cbb42710a 100644
--- a/chromium/third_party/blink/public/platform/web_coalesced_input_event.h
+++ b/chromium/third_party/blink/public/platform/web_coalesced_input_event.h
@@ -14,14 +14,17 @@
namespace blink {
-// This class is representing a polymorphic WebInputEvent structure with its
-// coalesced events. The event could be any events defined in WebInputEvent.h.
+// This class represents a polymorphic WebInputEvent structure with its
+// coalesced events. The event could be any event defined in web_input_event.h,
+// including those that cannot be coalesced.
class BLINK_PLATFORM_EXPORT WebCoalescedInputEvent {
public:
explicit WebCoalescedInputEvent(const WebInputEvent&);
WebCoalescedInputEvent(const WebInputEvent&,
+ const std::vector<const WebInputEvent*>&,
const std::vector<const WebInputEvent*>&);
WebCoalescedInputEvent(const WebPointerEvent&,
+ const std::vector<WebPointerEvent>&,
const std::vector<WebPointerEvent>&);
// Copy constructor to deep copy the event.
WebCoalescedInputEvent(const WebCoalescedInputEvent&);
@@ -33,9 +36,12 @@ class BLINK_PLATFORM_EXPORT WebCoalescedInputEvent {
const WebInputEvent& CoalescedEvent(size_t index) const;
std::vector<const WebInputEvent*> GetCoalescedEventsPointers() const;
+ void AddPredictedEvent(const blink::WebInputEvent&);
+ size_t PredictedEventSize() const;
+ const WebInputEvent& PredictedEvent(size_t index) const;
+ std::vector<const WebInputEvent*> GetPredictedEventsPointers() const;
+
private:
- // TODO(hans): Remove this once clang-cl knows to not inline dtors that
- // call operator(), https://crbug.com/691714
struct BLINK_PLATFORM_EXPORT WebInputEventDeleter {
void operator()(blink::WebInputEvent*) const;
};
@@ -47,6 +53,7 @@ class BLINK_PLATFORM_EXPORT WebCoalescedInputEvent {
WebScopedInputEvent event_;
std::vector<WebScopedInputEvent> coalesced_events_;
+ std::vector<WebScopedInputEvent> predicted_events_;
};
using WebScopedCoalescedInputEvent = std::unique_ptr<WebCoalescedInputEvent>;
diff --git a/chromium/third_party/blink/public/platform/web_content_decryption_module_access.h b/chromium/third_party/blink/public/platform/web_content_decryption_module_access.h
index 822294c5bdc..03190db426d 100644
--- a/chromium/third_party/blink/public/platform/web_content_decryption_module_access.h
+++ b/chromium/third_party/blink/public/platform/web_content_decryption_module_access.h
@@ -6,6 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CONTENT_DECRYPTION_MODULE_ACCESS_H_
#include "third_party/blink/public/platform/web_common.h"
+#include "third_party/blink/public/platform/web_string.h"
namespace blink {
@@ -18,6 +19,7 @@ class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleAccess {
virtual void CreateContentDecryptionModule(
WebContentDecryptionModuleResult) = 0;
virtual WebMediaKeySystemConfiguration GetConfiguration() = 0;
+ virtual WebString GetKeySystem() = 0;
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_content_settings_client.h b/chromium/third_party/blink/public/platform/web_content_settings_client.h
index 04a501dadac..3fff8c7196d 100644
--- a/chromium/third_party/blink/public/platform/web_content_settings_client.h
+++ b/chromium/third_party/blink/public/platform/web_content_settings_client.h
@@ -46,9 +46,7 @@ class WebContentSettingsClient {
}
// Controls whether access to Indexed DB are allowed for this frame.
- virtual bool AllowIndexedDB(const WebString& name, const WebSecurityOrigin&) {
- return true;
- }
+ virtual bool AllowIndexedDB(const WebSecurityOrigin&) { return true; }
// Controls whether scripts are allowed to execute for this frame.
virtual bool AllowScript(bool enabled_per_settings) {
diff --git a/chromium/third_party/blink/public/platform/web_cors.h b/chromium/third_party/blink/public/platform/web_cors.h
deleted file mode 100644
index ed45681c4b5..00000000000
--- a/chromium/third_party/blink/public/platform/web_cors.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CORS_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CORS_H_
-
-#include "base/optional.h"
-#include "services/network/public/cpp/cors/cors_error_status.h"
-#include "services/network/public/mojom/fetch_api.mojom-shared.h"
-#include "third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom-shared.h"
-#include "third_party/blink/public/platform/web_http_header_map.h"
-#include "third_party/blink/public/platform/web_http_header_set.h"
-#include "third_party/blink/public/platform/web_string.h"
-#include "third_party/blink/public/platform/web_url.h"
-
-namespace blink {
-
-class WebURLResponse;
-
-namespace WebCORS {
-
-BLINK_PLATFORM_EXPORT WebHTTPHeaderSet
-ExtractCorsExposedHeaderNamesList(network::mojom::FetchCredentialsMode,
- const WebURLResponse&);
-
-BLINK_PLATFORM_EXPORT bool IsOnAccessControlResponseHeaderWhitelist(
- const WebString&);
-
-// Checks whether request mode 'no-cors' is allowed for a certain context.
-BLINK_PLATFORM_EXPORT bool IsNoCORSAllowedContext(mojom::RequestContextType);
-
-} // namespace WebCORS
-
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_CORS_H_
diff --git a/chromium/third_party/blink/public/platform/web_crypto.h b/chromium/third_party/blink/public/platform/web_crypto.h
index 0bf7bc8f04c..f2f2dd4eb36 100644
--- a/chromium/third_party/blink/public/platform/web_crypto.h
+++ b/chromium/third_party/blink/public/platform/web_crypto.h
@@ -43,7 +43,7 @@
#if INSIDE_BLINK
#include "base/memory/scoped_refptr.h"
-#include "third_party/blink/renderer/platform/heap/handle.h"
+#include "third_party/blink/renderer/platform/heap/handle.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/platform/web_crypto_key_algorithm_params.h b/chromium/third_party/blink/public/platform/web_crypto_key_algorithm_params.h
index 8003222d279..fa6389b1caf 100644
--- a/chromium/third_party/blink/public/platform/web_crypto_key_algorithm_params.h
+++ b/chromium/third_party/blink/public/platform/web_crypto_key_algorithm_params.h
@@ -36,7 +36,7 @@
#include "third_party/blink/public/platform/web_vector.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/heap/handle.h"
+#include "third_party/blink/renderer/platform/heap/handle.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/platform/web_database_observer.h b/chromium/third_party/blink/public/platform/web_database_observer.h
index abe32e96351..7bd01496e67 100644
--- a/chromium/third_party/blink/public/platform/web_database_observer.h
+++ b/chromium/third_party/blink/public/platform/web_database_observer.h
@@ -48,35 +48,9 @@ class WebDatabaseObserver {
const WebString& database_name) = 0;
virtual void DatabaseClosed(const WebSecurityOrigin&,
const WebString& database_name) = 0;
- virtual void ReportOpenDatabaseResult(const WebSecurityOrigin&,
- const WebString& database_name,
- int error_site,
- int web_sql_error_code,
- int sqlite_error_code,
- base::TimeDelta call_time) {}
- virtual void ReportChangeVersionResult(const WebSecurityOrigin&,
- const WebString& database_name,
- int error_site,
- int web_sql_error_code,
- int sqlite_error_code) {}
- virtual void ReportStartTransactionResult(const WebSecurityOrigin&,
- const WebString& database_name,
- int error_site,
- int web_sql_error_code,
- int sqlite_error_code) {}
- virtual void ReportCommitTransactionResult(const WebSecurityOrigin&,
- const WebString& database_name,
- int error_site,
- int web_sql_error_code,
- int sqlite_error_code) {}
- virtual void ReportExecuteStatementResult(const WebSecurityOrigin&,
- const WebString& database_name,
- int error_site,
- int web_sql_error_code,
- int sqlite_error_code) {}
- virtual void ReportVacuumDatabaseResult(const WebSecurityOrigin&,
- const WebString& database_name,
- int sqlite_error_code) {}
+ virtual void ReportSqliteError(const blink::WebSecurityOrigin& origin,
+ const blink::WebString& database_name,
+ int error) = 0;
protected:
~WebDatabaseObserver() = default;
diff --git a/chromium/third_party/blink/public/platform/web_document_subresource_filter.h b/chromium/third_party/blink/public/platform/web_document_subresource_filter.h
index 614366e049a..17d20f8dfc4 100644
--- a/chromium/third_party/blink/public/platform/web_document_subresource_filter.h
+++ b/chromium/third_party/blink/public/platform/web_document_subresource_filter.h
@@ -36,8 +36,6 @@ class WebDocumentSubresourceFilter {
// console.
virtual bool ShouldLogToConsole() = 0;
- virtual bool GetIsAssociatedWithAdSubframe() const = 0;
-
// Report that the resource request corresponding to |request_id| was tagged
// as an ad.
virtual void ReportAdRequestId(int request_id) {}
diff --git a/chromium/third_party/blink/public/platform/web_double_point.h b/chromium/third_party/blink/public/platform/web_double_point.h
index 560fb9b4f13..587f91474ad 100644
--- a/chromium/third_party/blink/public/platform/web_double_point.h
+++ b/chromium/third_party/blink/public/platform/web_double_point.h
@@ -34,7 +34,7 @@
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/geometry/double_point.h"
+#include "third_party/blink/renderer/platform/geometry/double_point.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/platform/web_double_size.h b/chromium/third_party/blink/public/platform/web_double_size.h
index b28b2bfa25b..e8499d01952 100644
--- a/chromium/third_party/blink/public/platform/web_double_size.h
+++ b/chromium/third_party/blink/public/platform/web_double_size.h
@@ -8,7 +8,7 @@
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/geometry/double_size.h"
+#include "third_party/blink/renderer/platform/geometry/double_size.h" // nogncheck
#else
#include <ui/gfx/geometry/size_f.h>
#include <ui/gfx/geometry/vector2d_f.h>
diff --git a/chromium/third_party/blink/public/platform/web_feature.mojom b/chromium/third_party/blink/public/platform/web_feature.mojom
index 1ad5eea7144..a192b483503 100644
--- a/chromium/third_party/blink/public/platform/web_feature.mojom
+++ b/chromium/third_party/blink/public/platform/web_feature.mojom
@@ -1776,7 +1776,7 @@ enum WebFeature {
kCSSSelectorWebkitUnknownPseudo = 2319,
kFilterAsContainingBlockMayChangeOutput = 2320,
kDispatchMouseUpDownEventOnDisabledFormControl = 2321,
- kCSSSelectorPseudoMatches = 2322,
+ kCSSSelectorPseudoIs = 2322,
kV8RTCRtpSender_ReplaceTrack_Method = 2323,
kInputTypeFileSecureOriginOpenChooser = 2324,
kInputTypeFileInsecureOriginOpenChooser = 2325,
@@ -1884,7 +1884,7 @@ enum WebFeature {
kShapeOutsideMarginBox = 2428,
kPerformanceTimeline = 2429,
kUserTiming = 2430,
- kCSSSelectorPseudoIS = 2431,
+ kCSSSelectorPseudoWhere = 2431,
kKeyboardApiGetLayoutMap = 2432,
kPerformanceResourceTimingInitiatorType = 2434,
kV8ArraySortNoElementsProtector = 2436,
@@ -1985,7 +1985,6 @@ enum WebFeature {
kV8WasmSharedMemory = 2532,
kV8WasmThreadOpcodes = 2533,
kCacheStorageAddAllSuccessWithDuplicate = 2534,
- kLegendDelegateFocusOrAccessKey = 2535,
kFeaturePolicyReport = 2536,
kV8Window_WebkitRTCPeerConnection_ConstructorGetter = 2537,
kV8Window_WebkitMediaStream_ConstructorGetter = 2538,
@@ -2062,6 +2061,43 @@ enum WebFeature {
kV8AttemptOverrideReadOnlyOnPrototypeSloppy = 2609,
kV8AttemptOverrideReadOnlyOnPrototypeStrict = 2610,
kHTMLCanvasElementLowLatency = 2611,
+ kV8OptimizedFunctionWithOneShotBytecode = 2612,
+ kSVGGeometryPropertyHasNonZeroUnitlessValue = 2613,
+ kCSSValueAppearanceNoImplementationSkipBorder = 2614,
+ kInstantiateModuleScript = 2615,
+ kDynamicImportModuleScript = 2616,
+ kHistoryPushState = 2617,
+ kHistoryReplaceState = 2618,
+ kGetDisplayMedia = 2619,
+ kCursorImageGT64x64 = 2620,
+ kAdClick = 2621,
+ kUpdateWithoutShippingOptionOnShippingAddressChange = 2622,
+ kUpdateWithoutShippingOptionOnShippingOptionChange = 2623,
+ kCSSSelectorEmptyWhitespaceOnlyFail = 2624,
+ kActivatedImplicitRootScroller = 2625,
+ kCSSUnknownNamespacePrefixInSelector = 2626,
+ kPageLifeCycleFreeze = 2627,
+ kDefaultInCustomIdent = 2628,
+ kHTMLAnchorElementHrefTranslateAttribute = 2629,
+ kWebKitUserModifyEffective = 2630,
+ kPlainTextEditingEffective = 2631,
+ kNavigationDownloadInSandboxWithUserGesture = 2632,
+ kNavigationDownloadInSandboxWithoutUserGesture = 2633,
+ kLegacyTLSVersionInMainFrameResource = 2634,
+ kLegacyTLSVersionInSubresource = 2635,
+ kLegacyTLSVersionInSubframeMainResource = 2636,
+ kRTCMaxAudioBufferSize = 2637,
+ kWebKitUserModifyReadWriteEffective = 2638,
+ kWebKitUserModifyReadOnlyEffective = 2639,
+ kWebKitUserModifyPlainTextEffective = 2640,
+ kCSSAtRuleFontFeatureValues = 2641,
+ kFlexboxSingleLineAlignContent = 2642,
+ kSignedExchangeInnerResponseInMainFrame = 2643,
+ kSignedExchangeInnerResponseInSubFrame = 2644,
+ kCSSSelectorNotWithValidList = 2645,
+ kCSSSelectorNotWithInvalidList = 2646,
+ kCSSSelectorNotWithPartiallyValidList = 2647,
+
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
// Also, run update_use_counter_feature_enum.py in
diff --git a/chromium/third_party/blink/public/platform/web_float_point.h b/chromium/third_party/blink/public/platform/web_float_point.h
index 8f15eff4921..8e413cf7d57 100644
--- a/chromium/third_party/blink/public/platform/web_float_point.h
+++ b/chromium/third_party/blink/public/platform/web_float_point.h
@@ -34,7 +34,7 @@
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/geometry/float_point.h"
+#include "third_party/blink/renderer/platform/geometry/float_point.h" // nogncheck
#else
#include <ui/gfx/geometry/point_f.h>
#endif
diff --git a/chromium/third_party/blink/public/platform/web_float_point_3d.h b/chromium/third_party/blink/public/platform/web_float_point_3d.h
index e838075bc76..2e83986e268 100644
--- a/chromium/third_party/blink/public/platform/web_float_point_3d.h
+++ b/chromium/third_party/blink/public/platform/web_float_point_3d.h
@@ -8,7 +8,7 @@
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/geometry/float_point_3d.h"
+#include "third_party/blink/renderer/platform/geometry/float_point_3d.h" // nogncheck
#else
#include <ui/gfx/geometry/point3_f.h>
#endif
diff --git a/chromium/third_party/blink/public/platform/web_float_rect.h b/chromium/third_party/blink/public/platform/web_float_rect.h
index 0005616bbf7..430b169c3c1 100644
--- a/chromium/third_party/blink/public/platform/web_float_rect.h
+++ b/chromium/third_party/blink/public/platform/web_float_rect.h
@@ -34,7 +34,7 @@
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/geometry/float_rect.h"
+#include "third_party/blink/renderer/platform/geometry/float_rect.h" // nogncheck
#else
#include <algorithm>
#include <cmath>
diff --git a/chromium/third_party/blink/public/platform/web_float_size.h b/chromium/third_party/blink/public/platform/web_float_size.h
index e93bdc1eb3c..c5a384a7ce0 100644
--- a/chromium/third_party/blink/public/platform/web_float_size.h
+++ b/chromium/third_party/blink/public/platform/web_float_size.h
@@ -34,7 +34,7 @@
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/geometry/float_size.h"
+#include "third_party/blink/renderer/platform/geometry/float_size.h" // nogncheck
#else
#include <ui/gfx/geometry/size_f.h>
#include <ui/gfx/geometry/vector2d_f.h>
diff --git a/chromium/third_party/blink/public/platform/web_font_render_style.h b/chromium/third_party/blink/public/platform/web_font_render_style.h
index 0f48fb20e62..08e0ec124e0 100644
--- a/chromium/third_party/blink/public/platform/web_font_render_style.h
+++ b/chromium/third_party/blink/public/platform/web_font_render_style.h
@@ -35,12 +35,9 @@
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/skia/include/core/SkRefCnt.h"
+class SkFont;
class SkFontMgr;
-namespace cc {
-class PaintFont;
-} // namespace cc
-
namespace blink {
// WebFontRenderStyle describes the user's preferences for rendering a font at a
@@ -61,7 +58,7 @@ struct WebFontRenderStyle {
}
BLINK_PLATFORM_EXPORT static void SetSkiaFontManager(sk_sp<SkFontMgr>);
- BLINK_PLATFORM_EXPORT static void SetHinting(SkPaint::Hinting);
+ BLINK_PLATFORM_EXPORT static void SetHinting(SkFontHinting);
BLINK_PLATFORM_EXPORT static void SetAutoHint(bool);
BLINK_PLATFORM_EXPORT static void SetUseBitmaps(bool);
BLINK_PLATFORM_EXPORT static void SetAntiAlias(bool);
@@ -75,7 +72,8 @@ struct WebFontRenderStyle {
// kNoPreference in |other|.
void OverrideWith(const WebFontRenderStyle& other);
- void ApplyToPaintFont(cc::PaintFont&, float device_scale_factor) const;
+ void ApplyToSkPaint(SkPaint&, float device_scale_factor) const;
+ void ApplyToSkFont(SkFont*, float device_scale_factor) const;
// Each of the use* members below can take one of three values:
// 0: off
diff --git a/chromium/third_party/blink/public/platform/web_gesture_event.h b/chromium/third_party/blink/public/platform/web_gesture_event.h
index 4ac437350a6..ee14c58c440 100644
--- a/chromium/third_party/blink/public/platform/web_gesture_event.h
+++ b/chromium/third_party/blink/public/platform/web_gesture_event.h
@@ -11,7 +11,7 @@
namespace blink {
-// See WebInputEvent.h for details why this pack is here.
+// See web_input_event.h for details why this pack is here.
#pragma pack(push, 4)
// WebGestureEvent ---------------------------------------------------------
@@ -60,6 +60,9 @@ class WebGestureEvent : public WebInputEvent {
int tap_count;
float width;
float height;
+ // |needs_wheel_event| for touchpad GestureDoubleTap has the same
+ // semantics as |needs_wheel_event| for touchpad pinch described below.
+ bool needs_wheel_event;
} tap;
struct {
@@ -277,7 +280,16 @@ class WebGestureEvent : public WebInputEvent {
}
}
+ bool IsTouchpadZoomEvent() const {
+ // Touchpad GestureDoubleTap also causes a page scale change like a touchpad
+ // pinch gesture.
+ return source_device_ == WebGestureDevice::kWebGestureDeviceTouchpad &&
+ (WebInputEvent::IsPinchGestureEventType(type_) ||
+ type_ == kGestureDoubleTap);
+ }
+
bool NeedsWheelEvent() const {
+ DCHECK(IsTouchpadZoomEvent());
switch (type_) {
case kGesturePinchBegin:
return data.pinch_begin.needs_wheel_event;
@@ -285,6 +297,8 @@ class WebGestureEvent : public WebInputEvent {
return data.pinch_update.needs_wheel_event;
case kGesturePinchEnd:
return data.pinch_end.needs_wheel_event;
+ case kGestureDoubleTap:
+ return data.tap.needs_wheel_event;
default:
NOTREACHED();
return false;
@@ -292,8 +306,7 @@ class WebGestureEvent : public WebInputEvent {
}
void SetNeedsWheelEvent(bool needs_wheel_event) {
- DCHECK(!needs_wheel_event ||
- source_device_ == WebGestureDevice::kWebGestureDeviceTouchpad);
+ DCHECK(!needs_wheel_event || IsTouchpadZoomEvent());
switch (type_) {
case kGesturePinchBegin:
data.pinch_begin.needs_wheel_event = needs_wheel_event;
@@ -304,8 +317,11 @@ class WebGestureEvent : public WebInputEvent {
case kGesturePinchEnd:
data.pinch_end.needs_wheel_event = needs_wheel_event;
break;
+ case kGestureDoubleTap:
+ data.tap.needs_wheel_event = needs_wheel_event;
+ break;
default:
- NOTREACHED();
+ break;
}
}
};
diff --git a/chromium/third_party/blink/public/platform/web_graphics_context_3d_provider.h b/chromium/third_party/blink/public/platform/web_graphics_context_3d_provider.h
index 59f38511b6c..e60c111af46 100644
--- a/chromium/third_party/blink/public/platform/web_graphics_context_3d_provider.h
+++ b/chromium/third_party/blink/public/platform/web_graphics_context_3d_provider.h
@@ -77,7 +77,11 @@ class WebGraphicsContext3DProvider {
virtual void SetLostContextCallback(base::RepeatingClosure) = 0;
virtual void SetErrorMessageCallback(
base::RepeatingCallback<void(const char* msg, int32_t id)>) = 0;
- virtual cc::ImageDecodeCache* ImageDecodeCache(SkColorType) = 0;
+ // Return a static software image decode cache for a given color type and
+ // space.
+ virtual cc::ImageDecodeCache* ImageDecodeCache(
+ SkColorType color_type,
+ sk_sp<SkColorSpace> color_space) = 0;
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_input_event.h b/chromium/third_party/blink/public/platform/web_input_event.h
index 3f54e7b8680..1c09a6b7c6c 100644
--- a/chromium/third_party/blink/public/platform/web_input_event.h
+++ b/chromium/third_party/blink/public/platform/web_input_event.h
@@ -195,7 +195,7 @@ class WebInputEvent {
kPointerCausedUaAction,
kPointerTypeLast = kPointerCausedUaAction,
- kTypeLast = kTouchTypeLast
+ kTypeLast = kPointerTypeLast
};
// The modifier constants cannot change their values since pepper
diff --git a/chromium/third_party/blink/public/platform/web_keyboard_event.h b/chromium/third_party/blink/public/platform/web_keyboard_event.h
index 213f14d9d3d..93b7d8cd935 100644
--- a/chromium/third_party/blink/public/platform/web_keyboard_event.h
+++ b/chromium/third_party/blink/public/platform/web_keyboard_event.h
@@ -9,7 +9,7 @@
namespace blink {
-// See WebInputEvent.h for details why this pack is here.
+// See web_input_event.h for details why this pack is here.
#pragma pack(push, 4)
// WebKeyboardEvent -----------------------------------------------------------
diff --git a/chromium/third_party/blink/public/platform/web_layer_tree_view.h b/chromium/third_party/blink/public/platform/web_layer_tree_view.h
index 130a21fce17..3fae14b03cd 100644
--- a/chromium/third_party/blink/public/platform/web_layer_tree_view.h
+++ b/chromium/third_party/blink/public/platform/web_layer_tree_view.h
@@ -92,11 +92,6 @@ class WebLayerTreeView {
// Sets the background color for the viewport.
virtual void SetBackgroundColor(SkColor) {}
- // Sets whether this view is visible. In threaded mode, a view that is not
- // visible will not composite or trigger UpdateAnimations() or Layout() calls
- // until it becomes visible.
- virtual void SetVisible(bool) {}
-
// Sets the current page scale factor and minimum / maximum limits. Both
// limits are initially 1 (no page scale allowed).
virtual void SetPageScaleFactorAndLimits(float page_scale_factor,
@@ -157,8 +152,10 @@ class WebLayerTreeView {
// rasterization.
virtual void UpdateAllLifecyclePhasesAndCompositeForTesting(bool do_raster) {}
- // Prevents updates to layer tree from becoming visible.
- virtual std::unique_ptr<cc::ScopedDeferCommits> DeferCommits() {
+ // Prevents any updates to the input for the layer tree, and the layer tree
+ // itself, and the layer tree from becoming visible.
+ virtual std::unique_ptr<cc::ScopedDeferMainFrameUpdate>
+ DeferMainFrameUpdate() {
return nullptr;
}
@@ -217,6 +214,9 @@ class WebLayerTreeView {
// Toggles scroll bottleneck rects on the HUD layer
virtual void SetShowScrollBottleneckRects(bool) {}
+ // Toggles the hit-test borders on layers
+ virtual void SetShowHitTestBorders(bool) {}
+
// ReportTimeCallback is a callback that should be fired when the
// corresponding Swap completes (either with DidSwap or DidNotSwap).
virtual void NotifySwapTime(ReportTimeCallback callback) {}
@@ -225,6 +225,11 @@ class WebLayerTreeView {
virtual void RequestDecode(const cc::PaintImage& image,
base::OnceCallback<void(bool)> callback) {}
+
+ // Runs |callback| after a new frame has been submitted to the display
+ // compositor, and the display-compositor has displayed it on screen. Forces a
+ // redraw so that a new frame is submitted.
+ virtual void RequestPresentationCallback(base::OnceClosure callback) {}
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_loading_behavior_flag.h b/chromium/third_party/blink/public/platform/web_loading_behavior_flag.h
index a8ddf10780a..bbba88d0b86 100644
--- a/chromium/third_party/blink/public/platform/web_loading_behavior_flag.h
+++ b/chromium/third_party/blink/public/platform/web_loading_behavior_flag.h
@@ -34,7 +34,16 @@ enum WebLoadingBehaviorFlag {
kWebLoadingBehaviorDocumentWriteBlockDifferentScheme = 1 << 5,
// Indicates that a subresource on the page matched the subresource filtering
// rules.
- kWebLoadingBehaviorSubresourceFilterMatch = 1 << 6
+ kWebLoadingBehaviorSubresourceFilterMatch = 1 << 6,
+ // Indicates that a subresource on the page was a candidate for stale
+ // while revalidate and caused a network load.
+ kStaleWhileRevalidateResourceCandidateNetworkLoad = 1 << 7,
+ // Indicates that a subresource on the page was a candidate for stale
+ // while revalidate and caused a stale cache load.
+ kStaleWhileRevalidateResourceCandidateStaleCacheLoad = 1 << 8,
+ // Indicates that a subresource on the page was a candidate for stale
+ // while revalidate and caused a non-stale cache load.
+ kStaleWhileRevalidateResourceCandidateCacheLoad = 1 << 9,
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_media_constraints.h b/chromium/third_party/blink/public/platform/web_media_constraints.h
index 1edd3e10964..4f9dc52c7a8 100644
--- a/chromium/third_party/blink/public/platform/web_media_constraints.h
+++ b/chromium/third_party/blink/public/platform/web_media_constraints.h
@@ -53,7 +53,10 @@ class BLINK_PLATFORM_EXPORT BaseConstraint {
explicit BaseConstraint(const char* name);
virtual ~BaseConstraint();
virtual bool IsEmpty() const = 0;
- virtual bool HasMandatory() const = 0;
+ bool HasMandatory() const;
+ virtual bool HasMin() const { return false; }
+ virtual bool HasMax() const { return false; }
+ virtual bool HasExact() const = 0;
const char* GetName() const { return name_; }
virtual WebString ToString() const = 0;
@@ -89,13 +92,12 @@ class BLINK_PLATFORM_EXPORT LongConstraint : public BaseConstraint {
bool Matches(int32_t value) const;
bool IsEmpty() const override;
- bool HasMandatory() const override;
+ bool HasMin() const override { return has_min_; }
+ bool HasMax() const override { return has_max_; }
+ bool HasExact() const override { return has_exact_; }
WebString ToString() const override;
- bool HasMin() const { return has_min_; }
int32_t Min() const { return min_; }
- bool HasMax() const { return has_max_; }
int32_t Max() const { return max_; }
- bool HasExact() const { return has_exact_; }
int32_t Exact() const { return exact_; }
bool HasIdeal() const { return has_ideal_; }
int32_t Ideal() const { return ideal_; }
@@ -142,13 +144,12 @@ class BLINK_PLATFORM_EXPORT DoubleConstraint : public BaseConstraint {
bool Matches(double value) const;
bool IsEmpty() const override;
- bool HasMandatory() const override;
+ bool HasMin() const override { return has_min_; }
+ bool HasMax() const override { return has_max_; }
+ bool HasExact() const override { return has_exact_; }
WebString ToString() const override;
- bool HasMin() const { return has_min_; }
double Min() const { return min_; }
- bool HasMax() const { return has_max_; }
double Max() const { return max_; }
- bool HasExact() const { return has_exact_; }
double Exact() const { return exact_; }
bool HasIdeal() const { return has_ideal_; }
double Ideal() const { return ideal_; }
@@ -180,9 +181,8 @@ class BLINK_PLATFORM_EXPORT StringConstraint : public BaseConstraint {
bool Matches(WebString value) const;
bool IsEmpty() const override;
- bool HasMandatory() const override;
+ bool HasExact() const override { return !exact_.empty(); }
WebString ToString() const override;
- bool HasExact() const { return !exact_.empty(); }
bool HasIdeal() const { return !ideal_.empty(); }
const WebVector<WebString>& Exact() const;
const WebVector<WebString>& Ideal() const;
@@ -210,9 +210,8 @@ class BLINK_PLATFORM_EXPORT BooleanConstraint : public BaseConstraint {
bool Matches(bool value) const;
bool IsEmpty() const override;
- bool HasMandatory() const override;
+ bool HasExact() const override { return has_exact_; }
WebString ToString() const override;
- bool HasExact() const { return has_exact_; }
bool HasIdeal() const { return has_ideal_; }
private:
@@ -231,6 +230,7 @@ struct WebMediaTrackConstraintSet {
DoubleConstraint aspect_ratio;
DoubleConstraint frame_rate;
StringConstraint facing_mode;
+ StringConstraint resize_mode;
DoubleConstraint volume;
LongConstraint sample_rate;
LongConstraint sample_size;
@@ -291,6 +291,8 @@ struct WebMediaTrackConstraintSet {
BLINK_PLATFORM_EXPORT bool HasMandatoryOutsideSet(
const std::vector<std::string>&,
std::string&) const;
+ BLINK_PLATFORM_EXPORT bool HasMin() const;
+ BLINK_PLATFORM_EXPORT bool HasExact() const;
BLINK_PLATFORM_EXPORT WebString ToString() const;
private:
diff --git a/chromium/third_party/blink/public/platform/web_media_player.h b/chromium/third_party/blink/public/platform/web_media_player.h
index 131e916bf69..f22b491df7d 100644
--- a/chromium/third_party/blink/public/platform/web_media_player.h
+++ b/chromium/third_party/blink/public/platform/web_media_player.h
@@ -88,10 +88,10 @@ class WebMediaPlayer {
kPreloadAuto,
};
- enum CORSMode {
- kCORSModeUnspecified,
- kCORSModeAnonymous,
- kCORSModeUseCredentials,
+ enum CorsMode {
+ kCorsModeUnspecified,
+ kCorsModeAnonymous,
+ kCorsModeUseCredentials,
};
// Reported to UMA. Do not change existing values.
@@ -147,7 +147,7 @@ class WebMediaPlayer {
virtual ~WebMediaPlayer() = default;
- virtual LoadTiming Load(LoadType, const WebMediaPlayerSource&, CORSMode) = 0;
+ virtual LoadTiming Load(LoadType, const WebMediaPlayerSource&, CorsMode) = 0;
// Playback controls.
virtual void Play() = 0;
@@ -180,14 +180,8 @@ class WebMediaPlayer {
virtual WebTimeRanges Seekable() const = 0;
// Attempts to switch the audio output device.
- // Implementations of SetSinkId take ownership of the WebSetSinkCallbacks
- // object.
- // Note also that SetSinkId implementations must make sure that all
- // methods of the WebSetSinkCallbacks object, including constructors and
- // destructors, run in the same thread where the object is created
- // (i.e., the blink thread).
virtual void SetSinkId(const WebString& sink_id,
- WebSetSinkIdCallbacks*) = 0;
+ std::unique_ptr<WebSetSinkIdCallbacks>) = 0;
// True if the loaded media has a playable video/audio track.
virtual bool HasVideo() const = 0;
diff --git a/chromium/third_party/blink/public/platform/web_media_recorder_handler.h b/chromium/third_party/blink/public/platform/web_media_recorder_handler.h
index 3577b2648d5..a918cc3d661 100644
--- a/chromium/third_party/blink/public/platform/web_media_recorder_handler.h
+++ b/chromium/third_party/blink/public/platform/web_media_recorder_handler.h
@@ -9,7 +9,7 @@
#include "third_party/blink/public/platform/web_common.h"
-#include "third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_info.h"
+#include "third_party/blink/public/platform/modules/media_capabilities/web_media_capabilities_callbacks.h"
#include "third_party/blink/public/platform/web_string.h"
namespace blink {
@@ -54,7 +54,7 @@ class BLINK_PLATFORM_EXPORT WebMediaRecorderHandler {
// https://wicg.github.io/media-capabilities/#media-capabilities-interface
virtual void EncodingInfo(
const WebMediaConfiguration&,
- std::unique_ptr<blink::WebMediaCapabilitiesQueryCallbacks>) {}
+ std::unique_ptr<blink::WebMediaCapabilitiesEncodingInfoCallbacks>) {}
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_media_stream_source.h b/chromium/third_party/blink/public/platform/web_media_stream_source.h
index f4a25600cee..7d722ead856 100644
--- a/chromium/third_party/blink/public/platform/web_media_stream_source.h
+++ b/chromium/third_party/blink/public/platform/web_media_stream_source.h
@@ -37,7 +37,7 @@
#include "third_party/blink/public/platform/web_private_ptr.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/heap/handle.h"
+#include "third_party/blink/renderer/platform/heap/handle.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/platform/web_media_stream_track.h b/chromium/third_party/blink/public/platform/web_media_stream_track.h
index e65de4808d0..4c56f061b93 100644
--- a/chromium/third_party/blink/public/platform/web_media_stream_track.h
+++ b/chromium/third_party/blink/public/platform/web_media_stream_track.h
@@ -51,6 +51,9 @@ class WebMediaStreamTrack {
};
enum class CursorCaptureType { kNever, kAlways, kMotion };
+ BLINK_PLATFORM_EXPORT static const char kResizeModeNone[];
+ BLINK_PLATFORM_EXPORT static const char kResizeModeRescale[];
+
struct Settings {
bool HasFrameRate() const { return frame_rate >= 0.0; }
bool HasWidth() const { return width >= 0; }
@@ -76,6 +79,7 @@ class WebMediaStreamTrack {
WebString device_id;
WebString group_id;
FacingMode facing_mode = FacingMode::kNone;
+ WebString resize_mode;
base::Optional<bool> echo_cancellation;
base::Optional<bool> auto_gain_control;
base::Optional<bool> noise_supression;
diff --git a/chromium/third_party/blink/public/platform/web_mouse_event.h b/chromium/third_party/blink/public/platform/web_mouse_event.h
index d413a9df007..245b2469ce2 100644
--- a/chromium/third_party/blink/public/platform/web_mouse_event.h
+++ b/chromium/third_party/blink/public/platform/web_mouse_event.h
@@ -12,7 +12,7 @@ namespace blink {
class WebGestureEvent;
-// See WebInputEvent.h for details why this pack is here.
+// See web_input_event.h for details why this pack is here.
#pragma pack(push, 4)
// WebMouseEvent --------------------------------------------------------------
@@ -75,7 +75,6 @@ class WebMouseEvent : public WebInputEvent, public WebPointerProperties {
base::TimeTicks time_stamp_param,
PointerId id_param = kMousePointerId);
- BLINK_PLATFORM_EXPORT WebFloatPoint MovementInRootFrame() const;
BLINK_PLATFORM_EXPORT WebFloatPoint PositionInRootFrame() const;
// Sets any scaled values to be their computed values and sets |frame_scale_|
diff --git a/chromium/third_party/blink/public/platform/web_mouse_wheel_event.h b/chromium/third_party/blink/public/platform/web_mouse_wheel_event.h
index 974463994a5..de57f246761 100644
--- a/chromium/third_party/blink/public/platform/web_mouse_wheel_event.h
+++ b/chromium/third_party/blink/public/platform/web_mouse_wheel_event.h
@@ -9,7 +9,7 @@
namespace blink {
-// See WebInputEvent.h for details why this pack is here.
+// See web_input_event.h for details why this pack is here.
#pragma pack(push, 4)
// WebMouseWheelEvent ---------------------------------------------------------
@@ -70,10 +70,10 @@ class WebMouseWheelEvent : public WebMouseEvent {
// True when phase information is added in mouse_wheel_phase_handler based
// on its timer.
- bool has_synthetic_phase;
+ bool has_synthetic_phase = false;
- bool scroll_by_page;
- bool has_precise_scrolling_deltas;
+ bool scroll_by_page = false;
+ bool has_precise_scrolling_deltas = false;
RailsMode rails_mode;
@@ -99,8 +99,6 @@ class WebMouseWheelEvent : public WebMouseEvent {
resending_plugin_id(-1),
phase(kPhaseNone),
momentum_phase(kPhaseNone),
- scroll_by_page(false),
- has_precise_scrolling_deltas(false),
rails_mode(kRailsModeFree),
dispatch_type(kBlocking) {}
diff --git a/chromium/third_party/blink/public/platform/web_point.h b/chromium/third_party/blink/public/platform/web_point.h
index 287ae6b8695..43fff477115 100644
--- a/chromium/third_party/blink/public/platform/web_point.h
+++ b/chromium/third_party/blink/public/platform/web_point.h
@@ -35,7 +35,7 @@
#include "ui/gfx/geometry/point.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/geometry/int_point.h"
+#include "third_party/blink/renderer/platform/geometry/int_point.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/platform/web_pointer_event.h b/chromium/third_party/blink/public/platform/web_pointer_event.h
index d3e8d4bedd5..4d9b3cedec0 100644
--- a/chromium/third_party/blink/public/platform/web_pointer_event.h
+++ b/chromium/third_party/blink/public/platform/web_pointer_event.h
@@ -12,7 +12,7 @@
namespace blink {
-// See WebInputEvent.h for details why this pack is here.
+// See web_input_event.h for details why this pack is here.
#pragma pack(push, 4)
// WebPointerEvent
diff --git a/chromium/third_party/blink/public/platform/web_prerender.h b/chromium/third_party/blink/public/platform/web_prerender.h
index d2814cb2215..8f7ca350b4c 100644
--- a/chromium/third_party/blink/public/platform/web_prerender.h
+++ b/chromium/third_party/blink/public/platform/web_prerender.h
@@ -31,9 +31,9 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_PRERENDER_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_PRERENDER_H_
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_private_ptr.h"
-#include "third_party/blink/public/platform/web_referrer_policy.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
@@ -76,7 +76,8 @@ class WebPrerender {
BLINK_PLATFORM_EXPORT WebURL Url() const;
BLINK_PLATFORM_EXPORT WebString GetReferrer() const;
BLINK_PLATFORM_EXPORT unsigned RelTypes() const;
- BLINK_PLATFORM_EXPORT WebReferrerPolicy GetReferrerPolicy() const;
+ BLINK_PLATFORM_EXPORT network::mojom::ReferrerPolicy GetReferrerPolicy()
+ const;
BLINK_PLATFORM_EXPORT void SetExtraData(ExtraData*);
BLINK_PLATFORM_EXPORT const ExtraData* GetExtraData() const;
diff --git a/chromium/third_party/blink/public/platform/web_private_ptr.h b/chromium/third_party/blink/public/platform/web_private_ptr.h
index c83577a578f..546518b6343 100644
--- a/chromium/third_party/blink/public/platform/web_private_ptr.h
+++ b/chromium/third_party/blink/public/platform/web_private_ptr.h
@@ -36,9 +36,9 @@
#if INSIDE_BLINK
#include "base/memory/scoped_refptr.h"
-#include "third_party/blink/renderer/platform/heap/handle.h"
-#include "third_party/blink/renderer/platform/heap/persistent.h"
-#include "third_party/blink/renderer/platform/wtf/type_traits.h"
+#include "third_party/blink/renderer/platform/heap/handle.h" // nogncheck
+#include "third_party/blink/renderer/platform/heap/persistent.h" // nogncheck
+#include "third_party/blink/renderer/platform/wtf/type_traits.h" // nogncheck
#endif
namespace WTF {
diff --git a/chromium/third_party/blink/public/platform/web_rect.h b/chromium/third_party/blink/public/platform/web_rect.h
index 2edd0af315a..59aeaacfc32 100644
--- a/chromium/third_party/blink/public/platform/web_rect.h
+++ b/chromium/third_party/blink/public/platform/web_rect.h
@@ -35,7 +35,7 @@
#include "ui/gfx/geometry/rect.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/geometry/int_rect.h"
+#include "third_party/blink/renderer/platform/geometry/int_rect.h" // nogncheck
#else
#include <algorithm>
#include <cmath>
diff --git a/chromium/third_party/blink/public/platform/web_referrer_policy.h b/chromium/third_party/blink/public/platform/web_referrer_policy.h
deleted file mode 100644
index e2f14600a09..00000000000
--- a/chromium/third_party/blink/public/platform/web_referrer_policy.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_REFERRER_POLICY_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_REFERRER_POLICY_H_
-
-namespace blink {
-
-// These values are serialized and persisted, so do not remove values and add
-// new ones at the end.
-// A Java counterpart will be generated for this enum.
-// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.blink_public.web
-// GENERATED_JAVA_CLASS_NAME_OVERRIDE: WebReferrerPolicy
-enum WebReferrerPolicy {
- kWebReferrerPolicyAlways,
- kWebReferrerPolicyDefault,
- kWebReferrerPolicyNoReferrerWhenDowngrade,
- kWebReferrerPolicyNever,
- kWebReferrerPolicyOrigin,
- kWebReferrerPolicyOriginWhenCrossOrigin,
- // This policy corresponds to strict-origin-when-cross-origin.
- // TODO(estark): rename to match the spec.
- kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin,
- kWebReferrerPolicySameOrigin,
- kWebReferrerPolicyStrictOrigin,
- kWebReferrerPolicyLast = kWebReferrerPolicyStrictOrigin
-};
-
-} // namespace blink
-
-#endif
diff --git a/chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler.h b/chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler.h
index bba64b58bae..361665509e0 100644
--- a/chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler.h
+++ b/chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler.h
@@ -103,7 +103,8 @@ class WebRTCPeerConnectionHandler {
// Gets stats using the new stats collection API, see
// third_party/webrtc/api/stats/. These will replace the old stats collection
// API when the new API has matured enough.
- virtual void GetStats(std::unique_ptr<WebRTCStatsReportCallback>) = 0;
+ virtual void GetStats(std::unique_ptr<WebRTCStatsReportCallback>,
+ RTCStatsFilter) = 0;
virtual WebRTCDataChannelHandler* CreateDataChannel(
const WebString& label,
const WebRTCDataChannelInit&) = 0;
diff --git a/chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler_client.h b/chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler_client.h
index 49d72e040db..767dbf401c8 100644
--- a/chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler_client.h
+++ b/chromium/third_party/blink/public/platform/web_rtc_peer_connection_handler_client.h
@@ -46,33 +46,18 @@ class WebRTCRtpTransceiver;
class BLINK_PLATFORM_EXPORT WebRTCPeerConnectionHandlerClient {
public:
- enum ICEConnectionState {
- kICEConnectionStateNew = 1,
- kICEConnectionStateChecking = 2,
- kICEConnectionStateConnected = 3,
- kICEConnectionStateCompleted = 4,
- kICEConnectionStateFailed = 5,
- kICEConnectionStateDisconnected = 6,
- kICEConnectionStateClosed = 7,
-
- // DEPRECATED
- kICEConnectionStateStarting = 1,
- };
-
- enum ICEGatheringState {
- kICEGatheringStateNew = 1,
- kICEGatheringStateGathering = 2,
- kICEGatheringStateComplete = 3
- };
-
virtual ~WebRTCPeerConnectionHandlerClient();
virtual void NegotiationNeeded() = 0;
virtual void DidGenerateICECandidate(scoped_refptr<WebRTCICECandidate>) = 0;
virtual void DidChangeSignalingState(
webrtc::PeerConnectionInterface::SignalingState) = 0;
- virtual void DidChangeICEGatheringState(ICEGatheringState) = 0;
- virtual void DidChangeICEConnectionState(ICEConnectionState) = 0;
+ virtual void DidChangeIceGatheringState(
+ webrtc::PeerConnectionInterface::IceGatheringState) = 0;
+ virtual void DidChangeIceConnectionState(
+ webrtc::PeerConnectionInterface::IceConnectionState) = 0;
+ virtual void DidChangePeerConnectionState(
+ webrtc::PeerConnectionInterface::PeerConnectionState){};
virtual void DidAddReceiverPlanB(std::unique_ptr<WebRTCRtpReceiver>) = 0;
virtual void DidRemoveReceiverPlanB(std::unique_ptr<WebRTCRtpReceiver>) = 0;
virtual void DidModifyTransceivers(
diff --git a/chromium/third_party/blink/public/platform/web_rtc_rtp_receiver.h b/chromium/third_party/blink/public/platform/web_rtc_rtp_receiver.h
index de7375e84b4..72bcd4bfe80 100644
--- a/chromium/third_party/blink/public/platform/web_rtc_rtp_receiver.h
+++ b/chromium/third_party/blink/public/platform/web_rtc_rtp_receiver.h
@@ -32,7 +32,8 @@ class BLINK_PLATFORM_EXPORT WebRTCRtpReceiver {
virtual WebVector<WebString> StreamIds() const = 0;
virtual WebVector<std::unique_ptr<WebRTCRtpContributingSource>>
GetSources() = 0;
- virtual void GetStats(std::unique_ptr<blink::WebRTCStatsReportCallback>) = 0;
+ virtual void GetStats(std::unique_ptr<blink::WebRTCStatsReportCallback>,
+ RTCStatsFilter) = 0;
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_rtc_rtp_sender.h b/chromium/third_party/blink/public/platform/web_rtc_rtp_sender.h
index a2bcd8b6ba8..f1112ff6d51 100644
--- a/chromium/third_party/blink/public/platform/web_rtc_rtp_sender.h
+++ b/chromium/third_party/blink/public/platform/web_rtc_rtp_sender.h
@@ -40,7 +40,8 @@ class BLINK_PLATFORM_EXPORT WebRTCRtpSender {
virtual void SetParameters(blink::WebVector<webrtc::RtpEncodingParameters>,
webrtc::DegradationPreference,
WebRTCVoidRequest) = 0;
- virtual void GetStats(std::unique_ptr<blink::WebRTCStatsReportCallback>) = 0;
+ virtual void GetStats(std::unique_ptr<blink::WebRTCStatsReportCallback>,
+ RTCStatsFilter) = 0;
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_rtc_stats.h b/chromium/third_party/blink/public/platform/web_rtc_stats.h
index d41f8b243c1..abbd62d706c 100644
--- a/chromium/third_party/blink/public/platform/web_rtc_stats.h
+++ b/chromium/third_party/blink/public/platform/web_rtc_stats.h
@@ -34,6 +34,11 @@ enum WebRTCStatsMemberType {
kWebRTCStatsMemberTypeSequenceString, // WebVector<WebString>
};
+enum class RTCStatsFilter {
+ kIncludeOnlyStandardMembers,
+ kIncludeNonStandardMembers,
+};
+
class BLINK_PLATFORM_EXPORT WebRTCStatsReport {
public:
virtual ~WebRTCStatsReport();
diff --git a/chromium/third_party/blink/public/platform/web_runtime_features.h b/chromium/third_party/blink/public/platform/web_runtime_features.h
index a0eedbfd71c..5832c4dd38d 100644
--- a/chromium/third_party/blink/public/platform/web_runtime_features.h
+++ b/chromium/third_party/blink/public/platform/web_runtime_features.h
@@ -62,6 +62,10 @@ class WebRuntimeFeatures {
const std::string& name,
bool enable);
+ BLINK_PLATFORM_EXPORT static bool IsBlinkGenPropertyTreesEnabled();
+
+ BLINK_PLATFORM_EXPORT static bool IsFractionalScrollOffsetsEnabled();
+
BLINK_PLATFORM_EXPORT static void EnableCompositedSelectionUpdate(bool);
BLINK_PLATFORM_EXPORT static bool IsCompositedSelectionUpdateEnabled();
@@ -70,16 +74,24 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableOriginTrials(bool);
BLINK_PLATFORM_EXPORT static bool IsOriginTrialsEnabled();
+ BLINK_PLATFORM_EXPORT static bool IsSlimmingPaintV2Enabled();
+
BLINK_PLATFORM_EXPORT static void EnableAccelerated2dCanvas(bool);
BLINK_PLATFORM_EXPORT static void EnableAccessibilityObjectModel(bool);
BLINK_PLATFORM_EXPORT static void EnableAdTagging(bool);
BLINK_PLATFORM_EXPORT static void EnableAllowActivationDelegationAttr(bool);
BLINK_PLATFORM_EXPORT static void EnableAudioOutputDevices(bool);
BLINK_PLATFORM_EXPORT static void EnableBackgroundFetch(bool);
+ BLINK_PLATFORM_EXPORT static void EnableBackgroundFetchAccessActiveFetches(
+ bool);
+ BLINK_PLATFORM_EXPORT static void EnableBackgroundFetchUploads(bool);
BLINK_PLATFORM_EXPORT static void EnableBlinkHeapIncrementalMarking(bool);
+ BLINK_PLATFORM_EXPORT static void EnableBlinkHeapUnifiedGarbageCollection(
+ bool);
BLINK_PLATFORM_EXPORT static void EnableBloatedRendererDetection(bool);
BLINK_PLATFORM_EXPORT static void EnableCacheInlineScriptCode(bool);
BLINK_PLATFORM_EXPORT static void EnableIsolatedCodeCache(bool);
+ BLINK_PLATFORM_EXPORT static void EnableWasmCodeCache(bool);
BLINK_PLATFORM_EXPORT static void EnableCanvas2dImageChromium(bool);
BLINK_PLATFORM_EXPORT static void EnableCSSHexAlphaColor(bool);
BLINK_PLATFORM_EXPORT static void EnableCSSFragmentIdentifiers(bool);
@@ -89,12 +101,14 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableDisplayCutoutAPI(bool);
BLINK_PLATFORM_EXPORT static void EnableFastMobileScrolling(bool);
BLINK_PLATFORM_EXPORT static void EnableFileSystem(bool);
+ BLINK_PLATFORM_EXPORT static void EnableFirstContentfulPaintPlusPlus(bool);
BLINK_PLATFORM_EXPORT static void EnableForceTallerSelectPopup(bool);
BLINK_PLATFORM_EXPORT static void EnableGamepadExtensions(bool);
BLINK_PLATFORM_EXPORT static void EnableGamepadVibration(bool);
BLINK_PLATFORM_EXPORT static void EnableGenericSensor(bool);
BLINK_PLATFORM_EXPORT static void EnableGenericSensorExtraClasses(bool);
BLINK_PLATFORM_EXPORT static void EnableHeapCompaction(bool);
+ BLINK_PLATFORM_EXPORT static void EnableImplicitRootScroller(bool);
BLINK_PLATFORM_EXPORT static void EnableInputMultipleFieldsUI(bool);
BLINK_PLATFORM_EXPORT static void EnableJankTracking(bool);
BLINK_PLATFORM_EXPORT static void EnableLayeredAPI(bool);
@@ -107,10 +121,7 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableMediaSession(bool);
BLINK_PLATFORM_EXPORT static void EnableMiddleClickAutoscroll(bool);
BLINK_PLATFORM_EXPORT static void EnableModernMediaControls(bool);
- BLINK_PLATFORM_EXPORT static void EnableModuleScriptsDynamicImport(bool);
- BLINK_PLATFORM_EXPORT static void EnableModuleScriptsImportMetaUrl(bool);
BLINK_PLATFORM_EXPORT static void EnableNavigatorContentUtils(bool);
- BLINK_PLATFORM_EXPORT static void EnableNestedWorkers(bool);
BLINK_PLATFORM_EXPORT static void EnableNetInfoDownlinkMax(bool);
BLINK_PLATFORM_EXPORT static void EnableNetworkService(bool);
BLINK_PLATFORM_EXPORT static void EnableNoHoverAfterLayoutChange(bool);
@@ -122,7 +133,7 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableOrientationEvent(bool);
BLINK_PLATFORM_EXPORT static void EnableOverflowIconsForMediaControls(bool);
BLINK_PLATFORM_EXPORT static void EnableOverlayScrollbars(bool);
- BLINK_PLATFORM_EXPORT static void EnableOutOfBlinkCORS(bool);
+ BLINK_PLATFORM_EXPORT static void EnableOutOfBlinkCors(bool);
BLINK_PLATFORM_EXPORT static void EnablePageLifecycle(bool);
BLINK_PLATFORM_EXPORT static void EnablePagePopup(bool);
BLINK_PLATFORM_EXPORT static void EnablePassiveDocumentEventListeners(bool);
@@ -135,7 +146,6 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnablePictureInPictureAPI(bool);
BLINK_PLATFORM_EXPORT static void EnablePortals(bool);
BLINK_PLATFORM_EXPORT static void EnablePreciseMemoryInfo(bool);
- BLINK_PLATFORM_EXPORT static void EnablePreloadDefaultIsMetadata(bool);
BLINK_PLATFORM_EXPORT static void EnablePreloadImageSrcSetEnabled(bool);
BLINK_PLATFORM_EXPORT static void EnablePrintBrowser(bool);
BLINK_PLATFORM_EXPORT static void EnablePresentationAPI(bool);
@@ -144,18 +154,21 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableReducedReferrerGranularity(bool);
BLINK_PLATFORM_EXPORT static void EnableRemotePlaybackAPI(bool);
BLINK_PLATFORM_EXPORT static void EnableRenderingPipelineThrottling(bool);
- BLINK_PLATFORM_EXPORT static void EnableRequireCSSExtensionForFile(bool);
BLINK_PLATFORM_EXPORT static void EnableResourceLoadScheduler(bool);
- BLINK_PLATFORM_EXPORT static void EnableScriptedSpeech(bool);
+ BLINK_PLATFORM_EXPORT static void EnableRestrictLazyFrameLoadingToDataSaver(
+ bool);
+ BLINK_PLATFORM_EXPORT static void EnableRestrictLazyImageLoadingToDataSaver(
+ bool);
+ BLINK_PLATFORM_EXPORT static void EnableScriptedSpeechRecognition(bool);
+ BLINK_PLATFORM_EXPORT static void EnableScriptedSpeechSynthesis(bool);
BLINK_PLATFORM_EXPORT static void EnableScrollAnchorSerialization(bool);
BLINK_PLATFORM_EXPORT static void EnableSecMetadata(bool);
- BLINK_PLATFORM_EXPORT static void EnableServiceWorkerScriptFullCodeCache(
- bool);
BLINK_PLATFORM_EXPORT static void EnableSharedArrayBuffer(bool);
BLINK_PLATFORM_EXPORT static void EnableSharedWorker(bool);
BLINK_PLATFORM_EXPORT static void EnableSignedHTTPExchange(bool);
- BLINK_PLATFORM_EXPORT static void EnableSlimmingPaintV2(bool);
BLINK_PLATFORM_EXPORT static void EnableTouchEventFeatureDetection(bool);
+ BLINK_PLATFORM_EXPORT static void EnableUserActivationSameOriginVisibility(
+ bool);
BLINK_PLATFORM_EXPORT static void EnableUserActivationV2(bool);
BLINK_PLATFORM_EXPORT static void EnableV8IdleTasks(bool);
BLINK_PLATFORM_EXPORT static void EnableWebAuth(bool);
@@ -200,13 +213,14 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableAutomationControlled(bool);
BLINK_PLATFORM_EXPORT static void EnableWorkStealingInScriptRunner(bool);
BLINK_PLATFORM_EXPORT static void EnableScheduledScriptStreaming(bool);
- BLINK_PLATFORM_EXPORT static void EnablePWAFullCodeCache(bool);
- BLINK_PLATFORM_EXPORT static void EnableOffMainThreadWebSocket(bool);
+ BLINK_PLATFORM_EXPORT static void EnableScriptStreamingOnPreload(bool);
BLINK_PLATFORM_EXPORT static void EnableExperimentalProductivityFeatures(
bool);
BLINK_PLATFORM_EXPORT static void EnableAutoplayIgnoresWebAudio(bool);
BLINK_PLATFORM_EXPORT static void EnableMediaControlsExpandGesture(bool);
- BLINK_PLATFORM_EXPORT static void EnableHrefTranslate(bool);
+ BLINK_PLATFORM_EXPORT static void EnableTranslateService(bool);
+ BLINK_PLATFORM_EXPORT static void EnableMergeBlockingNonBlockingPools(bool);
+ BLINK_PLATFORM_EXPORT static void EnableGetDisplayMedia(bool);
private:
WebRuntimeFeatures();
diff --git a/chromium/third_party/blink/public/platform/web_scroll_into_view_params.h b/chromium/third_party/blink/public/platform/web_scroll_into_view_params.h
index 9c61ba48311..f8e4c1b1407 100644
--- a/chromium/third_party/blink/public/platform/web_scroll_into_view_params.h
+++ b/chromium/third_party/blink/public/platform/web_scroll_into_view_params.h
@@ -9,8 +9,8 @@
#include "third_party/blink/public/platform/web_float_rect.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/scroll/scroll_alignment.h"
-#include "third_party/blink/renderer/platform/scroll/scroll_types.h"
+#include "third_party/blink/renderer/platform/scroll/scroll_alignment.h" // nogncheck
+#include "third_party/blink/renderer/platform/scroll/scroll_types.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/platform/web_size.h b/chromium/third_party/blink/public/platform/web_size.h
index 6c9b193e4a8..d8aac052b76 100644
--- a/chromium/third_party/blink/public/platform/web_size.h
+++ b/chromium/third_party/blink/public/platform/web_size.h
@@ -36,7 +36,7 @@
#include "ui/gfx/geometry/vector2d.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/geometry/int_size.h"
+#include "third_party/blink/renderer/platform/geometry/int_size.h" // nogncheck
#else
#include <algorithm>
#include <cmath>
diff --git a/chromium/third_party/blink/public/platform/web_speech_synthesis_constants.h b/chromium/third_party/blink/public/platform/web_speech_synthesis_constants.h
index 3da80993b25..00fc0297681 100644
--- a/chromium/third_party/blink/public/platform/web_speech_synthesis_constants.h
+++ b/chromium/third_party/blink/public/platform/web_speech_synthesis_constants.h
@@ -8,12 +8,10 @@
namespace blink {
// Constants used in Text-to-Speech.
-namespace SpeechSynthesisConstants {
-const double kDefaultTextToSpeechRate = 1.0;
-const double kDefaultTextToSpeechPitch = 1.0;
-const double kDefaultTextToSpeechVolume = 1.0;
-const double kDoublePrefNotSet = -1.0;
-} // namespace SpeechSynthesisConstants
+const double kWebSpeechSynthesisDefaultTextToSpeechRate = 1.0;
+const double kWebSpeechSynthesisDefaultTextToSpeechPitch = 1.0;
+const double kWebSpeechSynthesisDefaultTextToSpeechVolume = 1.0;
+const double kWebSpeechSynthesisDoublePrefNotSet = -1.0;
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_string.h b/chromium/third_party/blink/public/platform/web_string.h
index a5b69040fba..ffd1da0bc8e 100644
--- a/chromium/third_party/blink/public/platform/web_string.h
+++ b/chromium/third_party/blink/public/platform/web_string.h
@@ -40,7 +40,7 @@
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/wtf/forward.h"
+#include "third_party/blink/renderer/platform/wtf/forward.h" // nogncheck
#endif
namespace WTF {
diff --git a/chromium/third_party/blink/public/platform/web_surface_layer_bridge.h b/chromium/third_party/blink/public/platform/web_surface_layer_bridge.h
index 2b3d981f7ec..91af2d4d858 100644
--- a/chromium/third_party/blink/public/platform/web_surface_layer_bridge.h
+++ b/chromium/third_party/blink/public/platform/web_surface_layer_bridge.h
@@ -7,6 +7,7 @@
#include <memory>
+#include "base/time/time.h"
#include "cc/layers/surface_layer.h"
#include "components/viz/common/surfaces/surface_id.h"
#include "third_party/blink/public/platform/web_common.h"
@@ -39,6 +40,7 @@ class BLINK_PLATFORM_EXPORT WebSurfaceLayerBridge {
virtual cc::Layer* GetCcLayer() const = 0;
virtual const viz::FrameSinkId& GetFrameSinkId() const = 0;
virtual const viz::SurfaceId& GetSurfaceId() const = 0;
+ virtual base::TimeTicks GetLocalSurfaceIdAllocationTime() const = 0;
virtual void ClearSurfaceId() = 0;
virtual void SetContentsOpaque(bool) = 0;
virtual void CreateSurfaceLayer() = 0;
diff --git a/chromium/third_party/blink/public/platform/web_thread_type.h b/chromium/third_party/blink/public/platform/web_thread_type.h
index 8439853f8e6..7f0cf644af2 100644
--- a/chromium/third_party/blink/public/platform/web_thread_type.h
+++ b/chromium/third_party/blink/public/platform/web_thread_type.h
@@ -15,7 +15,7 @@ enum class WebThreadType {
kCompositorThread = 2,
kDedicatedWorkerThread = 3,
kSharedWorkerThread = 4,
- kAnimationWorkletThread = 5,
+ kAnimationAndPaintWorkletThread = 5,
kServiceWorkerThread = 6,
kAudioWorkletThread = 7,
kFileThread = 8,
diff --git a/chromium/third_party/blink/public/platform/web_touch_event.h b/chromium/third_party/blink/public/platform/web_touch_event.h
index c076a1312e5..32d8adf06f3 100644
--- a/chromium/third_party/blink/public/platform/web_touch_event.h
+++ b/chromium/third_party/blink/public/platform/web_touch_event.h
@@ -9,7 +9,7 @@
namespace blink {
-// See WebInputEvent.h for details why this pack is here.
+// See web_input_event.h for details why this pack is here.
#pragma pack(push, 4)
// WebTouchEvent --------------------------------------------------------------
diff --git a/chromium/third_party/blink/public/platform/web_url_error.h b/chromium/third_party/blink/public/platform/web_url_error.h
index c2a176e560f..43995b5bad6 100644
--- a/chromium/third_party/blink/public/platform/web_url_error.h
+++ b/chromium/third_party/blink/public/platform/web_url_error.h
@@ -59,7 +59,7 @@ struct WebURLError {
HasCopyInCache,
IsWebSecurityViolation,
const WebURL&);
- BLINK_PLATFORM_EXPORT WebURLError(const network::CORSErrorStatus&,
+ BLINK_PLATFORM_EXPORT WebURLError(const network::CorsErrorStatus&,
HasCopyInCache,
const WebURL&);
@@ -68,7 +68,7 @@ struct WebURLError {
bool has_copy_in_cache() const { return has_copy_in_cache_; }
bool is_web_security_violation() const { return is_web_security_violation_; }
const WebURL& url() const { return url_; }
- const base::Optional<network::CORSErrorStatus> cors_error_status() const {
+ const base::Optional<network::CorsErrorStatus> cors_error_status() const {
return cors_error_status_;
}
@@ -91,7 +91,7 @@ struct WebURLError {
WebURL url_;
// Optional CORS error details.
- base::Optional<network::CORSErrorStatus> cors_error_status_;
+ base::Optional<network::CorsErrorStatus> cors_error_status_;
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/platform/web_url_loader_client.h b/chromium/third_party/blink/public/platform/web_url_loader_client.h
index 04d288509a9..96991bd5446 100644
--- a/chromium/third_party/blink/public/platform/web_url_loader_client.h
+++ b/chromium/third_party/blink/public/platform/web_url_loader_client.h
@@ -35,9 +35,9 @@
#include "base/time/time.h"
#include "mojo/public/cpp/system/data_pipe.h"
#include "services/network/public/cpp/cors/preflight_timing_info.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_data_consumer_handle.h"
-#include "third_party/blink/public/platform/web_referrer_policy.h"
#include "third_party/blink/public/platform/web_url_request.h"
namespace blink {
@@ -59,7 +59,7 @@ class BLINK_PLATFORM_EXPORT WebURLLoaderClient {
const WebURL& new_url,
const WebURL& new_site_for_cookies,
const WebString& new_referrer,
- WebReferrerPolicy new_referrer_policy,
+ network::mojom::ReferrerPolicy new_referrer_policy,
const WebString& new_method,
const WebURLResponse& passed_redirect_response,
bool& report_raw_headers) {
diff --git a/chromium/third_party/blink/public/platform/web_url_loader_mock_factory.h b/chromium/third_party/blink/public/platform/web_url_loader_mock_factory.h
index b72115bd6ec..85a0710fcca 100644
--- a/chromium/third_party/blink/public/platform/web_url_loader_mock_factory.h
+++ b/chromium/third_party/blink/public/platform/web_url_loader_mock_factory.h
@@ -70,7 +70,7 @@ class WebURLLoaderMockFactory {
// asynchronously from different threads (e.g. when HTML parser thread
// is being involved).
// DO NOT USE THIS for Frame loading; always use methods defined in
- // FrameTestHelpers instead.
+ // frame_test_helpers instead.
virtual void ServeAsynchronousRequests() = 0;
// Set a delegate that allows callbacks for all WebURLLoaderClients to be
diff --git a/chromium/third_party/blink/public/platform/web_url_request.h b/chromium/third_party/blink/public/platform/web_url_request.h
index 2b1af93f985..c19a945016d 100644
--- a/chromium/third_party/blink/public/platform/web_url_request.h
+++ b/chromium/third_party/blink/public/platform/web_url_request.h
@@ -35,13 +35,13 @@
#include "base/optional.h"
#include "base/time/time.h"
#include "base/unguessable_token.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom-shared.h"
#include "third_party/blink/public/platform/web_common.h"
-#include "third_party/blink/public/platform/web_referrer_policy.h"
namespace network {
namespace mojom {
-enum class CORSPreflightPolicy : int32_t;
+enum class CorsPreflightPolicy : int32_t;
enum class FetchCredentialsMode : int32_t;
enum class FetchRedirectMode : int32_t;
enum class FetchRequestMode : int32_t;
@@ -153,7 +153,7 @@ class WebURLRequest {
BLINK_PLATFORM_EXPORT void SetHTTPHeaderField(const WebString& name,
const WebString& value);
BLINK_PLATFORM_EXPORT void SetHTTPReferrer(const WebString& referrer,
- WebReferrerPolicy);
+ network::mojom::ReferrerPolicy);
BLINK_PLATFORM_EXPORT void AddHTTPHeaderField(const WebString& name,
const WebString& value);
BLINK_PLATFORM_EXPORT void ClearHTTPHeaderField(const WebString& name);
@@ -183,7 +183,8 @@ class WebURLRequest {
BLINK_PLATFORM_EXPORT void SetFrameType(
network::mojom::RequestContextFrameType);
- BLINK_PLATFORM_EXPORT WebReferrerPolicy GetReferrerPolicy() const;
+ BLINK_PLATFORM_EXPORT network::mojom::ReferrerPolicy GetReferrerPolicy()
+ const;
// Sets an HTTP origin header if it is empty and the HTTP method of the
// request requires it.
@@ -269,6 +270,11 @@ class WebURLRequest {
BLINK_PLATFORM_EXPORT ExtraData* GetExtraData() const;
BLINK_PLATFORM_EXPORT void SetExtraData(std::unique_ptr<ExtraData>);
+ // The request is downloaded to the network cache, but not rendered or
+ // executed.
+ BLINK_PLATFORM_EXPORT bool IsDownloadToNetworkCacheOnly() const;
+ BLINK_PLATFORM_EXPORT void SetDownloadToNetworkCacheOnly(bool);
+
BLINK_PLATFORM_EXPORT Priority GetPriority() const;
BLINK_PLATFORM_EXPORT void SetPriority(Priority);
@@ -278,8 +284,8 @@ class WebURLRequest {
// https://wicg.github.io/cors-rfc1918/#external-request
BLINK_PLATFORM_EXPORT bool IsExternalRequest() const;
- BLINK_PLATFORM_EXPORT network::mojom::CORSPreflightPolicy
- GetCORSPreflightPolicy() const;
+ BLINK_PLATFORM_EXPORT network::mojom::CorsPreflightPolicy
+ GetCorsPreflightPolicy() const;
BLINK_PLATFORM_EXPORT void SetNavigationStartTime(base::TimeTicks);
@@ -320,8 +326,14 @@ class WebURLRequest {
// Remembers 'X-Requested-With' header value. Blink should not set this header
// value until CORS checks are done to avoid running checks even against
// headers that are internally set.
- BLINK_PLATFORM_EXPORT const WebString GetRequestedWith() const;
- BLINK_PLATFORM_EXPORT void SetRequestedWith(const WebString&);
+ BLINK_PLATFORM_EXPORT const WebString GetRequestedWithHeader() const;
+ BLINK_PLATFORM_EXPORT void SetRequestedWithHeader(const WebString&);
+
+ // Remembers 'X-Client-Data' header value. Blink should not set this header
+ // value until CORS checks are done to avoid running checks even against
+ // headers that are internally set.
+ BLINK_PLATFORM_EXPORT const WebString GetClientDataHeader() const;
+ BLINK_PLATFORM_EXPORT void SetClientDataHeader(const WebString&);
// https://fetch.spec.whatwg.org/#concept-request-window
// See network::ResourceRequest::fetch_window_id for details.
diff --git a/chromium/third_party/blink/public/platform/web_url_response.h b/chromium/third_party/blink/public/platform/web_url_response.h
index 1b15b39489e..490b030d3dc 100644
--- a/chromium/third_party/blink/public/platform/web_url_response.h
+++ b/chromium/third_party/blink/public/platform/web_url_response.h
@@ -202,6 +202,7 @@ class WebURLResponse {
BLINK_PLATFORM_EXPORT void SetHasMajorCertificateErrors(bool);
BLINK_PLATFORM_EXPORT void SetCTPolicyCompliance(net::ct::CTPolicyCompliance);
BLINK_PLATFORM_EXPORT void SetIsLegacySymantecCert(bool);
+ BLINK_PLATFORM_EXPORT void SetIsLegacyTLSVersion(bool);
BLINK_PLATFORM_EXPORT void SetSecurityStyle(WebSecurityStyle);
@@ -209,6 +210,7 @@ class WebURLResponse {
BLINK_PLATFORM_EXPORT WebSecurityDetails SecurityDetailsForTesting();
BLINK_PLATFORM_EXPORT void SetAsyncRevalidationRequested(bool);
+ BLINK_PLATFORM_EXPORT void SetNetworkAccessed(bool);
#if INSIDE_BLINK
BLINK_PLATFORM_EXPORT const ResourceResponse& ToResourceResponse() const;
diff --git a/chromium/third_party/blink/public/platform/web_video_frame_submitter.h b/chromium/third_party/blink/public/platform/web_video_frame_submitter.h
index f2ff8aa3102..94bc7a5543c 100644
--- a/chromium/third_party/blink/public/platform/web_video_frame_submitter.h
+++ b/chromium/third_party/blink/public/platform/web_video_frame_submitter.h
@@ -7,13 +7,16 @@
#include "cc/layers/video_frame_provider.h"
#include "components/viz/common/surfaces/surface_id.h"
-#include "media/base/video_rotation.h"
#include "third_party/blink/public/platform/web_common.h"
namespace cc {
class LayerTreeSettings;
}
+namespace media {
+enum VideoRotation : int;
+}
+
namespace viz {
class ContextProvider;
} // namespace viz
@@ -53,9 +56,11 @@ class BLINK_PLATFORM_EXPORT WebVideoFrameSubmitter
virtual void SetIsOpaque(bool) = 0;
// Prepares the compositor frame sink to accept frames by providing
- // a SurfaceId. The callback is to be used when on context loss to prevent
- // the submitter from continuing to submit frames with invalid resources.
+ // a SurfaceId, with its associated allocation time. The callback is to be
+ // used when on context loss to prevent the submitter from continuing to
+ // submit frames with invalid resources.
virtual void EnableSubmission(viz::SurfaceId,
+ base::TimeTicks,
WebFrameSinkDestroyedCallback) = 0;
// Updates whether we should submit frames or not based on whether the video
diff --git a/chromium/third_party/blink/public/platform/web_worker_fetch_context.h b/chromium/third_party/blink/public/platform/web_worker_fetch_context.h
index 63eb6cb179c..1c6c2def226 100644
--- a/chromium/third_party/blink/public/platform/web_worker_fetch_context.h
+++ b/chromium/third_party/blink/public/platform/web_worker_fetch_context.h
@@ -7,6 +7,7 @@
#include <memory>
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_object.mojom-shared.h"
#include "third_party/blink/public/platform/code_cache_loader.h"
@@ -31,12 +32,23 @@ class WebDocumentSubresourceFilter;
// the worker thread by InitializeOnWorkerThread(). It contains information
// about the resource fetching context (ex: service worker provider id), and is
// used to create a new WebURLLoader instance in the worker thread.
-class WebWorkerFetchContext {
+//
+// A single WebWorkerFetchContext is used for both worker
+// subresource fetch (i.e. "insideSettings") and off-the-main-thread top-level
+// worker script fetch (i.e. fetch as "outsideSettings"), as they both should be
+// e.g. controlled by the same ServiceWorker (if any) and thus can share a
+// single WebURLLoaderFactory.
+//
+// Note that WebWorkerFetchContext and WorkerFetchContext do NOT correspond 1:1
+// as multiple WorkerFetchContext can be created after crbug.com/880027.
+class WebWorkerFetchContext : public base::RefCounted<WebWorkerFetchContext> {
public:
+ REQUIRE_ADOPTION_FOR_REFCOUNTED_TYPE();
+
virtual ~WebWorkerFetchContext() = default;
// Used to copy a worker fetch context between worker threads.
- virtual std::unique_ptr<WebWorkerFetchContext> CloneForNestedWorker() {
+ virtual scoped_refptr<WebWorkerFetchContext> CloneForNestedWorker() {
return nullptr;
}
@@ -48,9 +60,9 @@ class WebWorkerFetchContext {
virtual void InitializeOnWorkerThread() = 0;
- // Returns a new WebURLLoaderFactory which is associated with the worker
- // context. It can be called only once.
- virtual std::unique_ptr<WebURLLoaderFactory> CreateURLLoaderFactory() = 0;
+ // Returns a WebURLLoaderFactory which is associated with the worker context.
+ // The returned WebURLLoaderFactory is owned by |this|.
+ virtual WebURLLoaderFactory* GetURLLoaderFactory() = 0;
// Returns a new WebURLLoaderFactory that wraps the given
// network::mojom::URLLoaderFactory.
@@ -64,12 +76,10 @@ class WebWorkerFetchContext {
return nullptr;
};
- // Returns a new WebURLLoaderFactory for loading scripts in this worker
- // context. Unlike CreateURLLoaderFactory(), this may return nullptr even on
- // the first call.
- virtual std::unique_ptr<WebURLLoaderFactory> CreateScriptLoaderFactory() {
- return nullptr;
- }
+ // Returns a WebURLLoaderFactory for loading scripts in this worker context.
+ // Unlike GetURLLoaderFactory(), this may return nullptr.
+ // The returned WebURLLoaderFactory is owned by |this|.
+ virtual WebURLLoaderFactory* GetScriptLoaderFactory() { return nullptr; }
// Called when a request is about to be sent out to modify the request to
// handle the request correctly in the loading stack later. (Example: service