summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/public
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/public')
-rw-r--r--chromium/third_party/blink/public/BUILD.gn66
-rw-r--r--chromium/third_party/blink/public/README.md4
-rw-r--r--chromium/third_party/blink/public/blink_resources.grd16
-rw-r--r--chromium/third_party/blink/public/common/BUILD.gn23
-rw-r--r--chromium/third_party/blink/public/common/DEPS4
-rw-r--r--chromium/third_party/blink/public/common/associated_interfaces/associated_interface_provider.h2
-rw-r--r--chromium/third_party/blink/public/common/associated_interfaces/associated_interface_registry.h2
-rw-r--r--chromium/third_party/blink/public/common/blob/blob_utils.h2
-rw-r--r--chromium/third_party/blink/public/common/cache_storage/cache_storage_utils.h2
-rw-r--r--chromium/third_party/blink/public/common/client_hints/client_hints.h2
-rw-r--r--chromium/third_party/blink/public/common/common_export.h37
-rw-r--r--chromium/third_party/blink/public/common/device_memory/approximated_device_memory.h2
-rw-r--r--chromium/third_party/blink/public/common/dom_storage/session_storage_namespace_id.h2
-rw-r--r--chromium/third_party/blink/public/common/download/download_stats.h32
-rw-r--r--chromium/third_party/blink/public/common/dwrite_rasterizer_support/dwrite_rasterizer_support.h2
-rw-r--r--chromium/third_party/blink/public/common/experiments/memory_ablation_experiment.h2
-rw-r--r--chromium/third_party/blink/public/common/feature_policy/feature_policy.h19
-rw-r--r--chromium/third_party/blink/public/common/features.h16
-rw-r--r--chromium/third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h2
-rw-r--r--chromium/third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h2
-rw-r--r--chromium/third_party/blink/public/common/frame/frame_owner_element_type.h27
-rw-r--r--chromium/third_party/blink/public/common/frame/from_ad_state.h32
-rw-r--r--chromium/third_party/blink/public/common/frame/user_activation_state.h2
-rw-r--r--chromium/third_party/blink/public/common/frame/user_activation_update_type.h3
-rw-r--r--chromium/third_party/blink/public/common/indexeddb/OWNERS4
-rw-r--r--chromium/third_party/blink/public/common/indexeddb/indexed_db_default.typemap25
-rw-r--r--chromium/third_party/blink/public/common/indexeddb/indexed_db_default_mojom_traits.h (renamed from chromium/third_party/blink/public/common/indexeddb/indexeddb_struct_traits.h)105
-rw-r--r--chromium/third_party/blink/public/common/indexeddb/indexeddb.typemap29
-rw-r--r--chromium/third_party/blink/public/common/indexeddb/indexeddb_key.h8
-rw-r--r--chromium/third_party/blink/public/common/indexeddb/indexeddb_key_path.h2
-rw-r--r--chromium/third_party/blink/public/common/indexeddb/indexeddb_key_range.h2
-rw-r--r--chromium/third_party/blink/public/common/indexeddb/indexeddb_metadata.h2
-rw-r--r--chromium/third_party/blink/public/common/indexeddb/web_idb_types.h44
-rw-r--r--chromium/third_party/blink/public/common/manifest/manifest.h28
-rw-r--r--chromium/third_party/blink/public/common/manifest/manifest.typemap2
-rw-r--r--chromium/third_party/blink/public/common/manifest/manifest_mojom_traits.h101
-rw-r--r--chromium/third_party/blink/public/common/messaging/cloneable_message.h2
-rw-r--r--chromium/third_party/blink/public/common/messaging/cloneable_message_struct_traits.h52
-rw-r--r--chromium/third_party/blink/public/common/messaging/message_port_channel.h2
-rw-r--r--chromium/third_party/blink/public/common/messaging/string_message_codec.h5
-rw-r--r--chromium/third_party/blink/public/common/messaging/transferable_message.h4
-rw-r--r--chromium/third_party/blink/public/common/messaging/transferable_message_struct_traits.h59
-rw-r--r--chromium/third_party/blink/public/common/mime_util/mime_util.h2
-rw-r--r--chromium/third_party/blink/public/common/notifications/notification_resources.h2
-rw-r--r--chromium/third_party/blink/public/common/notifications/notification_struct_traits.h2
-rw-r--r--chromium/third_party/blink/public/common/notifications/platform_notification_data.h2
-rw-r--r--chromium/third_party/blink/public/common/origin_policy/origin_policy.h7
-rw-r--r--chromium/third_party/blink/public/common/origin_trials/trial_token.h2
-rw-r--r--chromium/third_party/blink/public/common/origin_trials/trial_token_validator.h2
-rw-r--r--chromium/third_party/blink/public/common/page/launching_process_state.h2
-rw-r--r--chromium/third_party/blink/public/common/privacy_preferences.h2
-rw-r--r--chromium/third_party/blink/public/common/sandbox_support/sandbox_support_mac.h43
-rw-r--r--chromium/third_party/blink/public/common/screen_orientation/OWNERS4
-rw-r--r--chromium/third_party/blink/public/common/screen_orientation/screen_orientation_lock_types.typemap2
-rw-r--r--chromium/third_party/blink/public/common/screen_orientation/web_screen_orientation_mojom_traits.h (renamed from chromium/third_party/blink/public/common/screen_orientation/web_screen_orientation_enum_traits.h)6
-rw-r--r--chromium/third_party/blink/public/common/service_worker/service_worker_status_code.h2
-rw-r--r--chromium/third_party/blink/public/common/service_worker/service_worker_type_converters.h2
-rw-r--r--chromium/third_party/blink/public/common/service_worker/service_worker_utils.h2
-rw-r--r--chromium/third_party/blink/public/mojom/BUILD.gn59
-rw-r--r--chromium/third_party/blink/public/mojom/choosers/file_chooser.mojom27
-rw-r--r--chromium/third_party/blink/public/mojom/feature_policy/feature_policy.mojom15
-rw-r--r--chromium/third_party/blink/public/mojom/indexeddb/indexeddb.mojom13
-rw-r--r--chromium/third_party/blink/public/mojom/loader/previews_resource_loading_hints.mojom3
-rw-r--r--chromium/third_party/blink/public/mojom/manifest/manifest.mojom36
-rw-r--r--chromium/third_party/blink/public/mojom/messaging/transferable_message.mojom2
-rw-r--r--chromium/third_party/blink/public/mojom/payments/payment_app.mojom10
-rw-r--r--chromium/third_party/blink/public/mojom/quota/quota_dispatcher_host.mojom3
-rw-r--r--chromium/third_party/blink/public/mojom/quota/quota_types.mojom10
-rw-r--r--chromium/third_party/blink/public/mojom/referrer.mojom16
-rw-r--r--chromium/third_party/blink/public/mojom/script/OWNERS7
-rw-r--r--chromium/third_party/blink/public/mojom/script/script_type.mojom11
-rw-r--r--chromium/third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom2
-rw-r--r--chromium/third_party/blink/public/mojom/service_worker/service_worker_registration.mojom12
-rw-r--r--chromium/third_party/blink/public/mojom/shared_worker/OWNERS2
-rw-r--r--chromium/third_party/blink/public/mojom/shared_worker/worker_main_script_load_params.mojom (renamed from chromium/third_party/blink/public/mojom/shared_worker/shared_worker_main_script_load_params.mojom)4
-rw-r--r--chromium/third_party/blink/public/mojom/usb/BUILD.gn2
-rw-r--r--chromium/third_party/blink/public/mojom/web_package/OWNERS10
-rw-r--r--chromium/third_party/blink/public/mojom/web_package/README.md2
-rw-r--r--chromium/third_party/blink/public/mojom/web_package/web_package_internals.mojom14
-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
-rw-r--r--chromium/third_party/blink/public/public_typemaps.gni3
-rw-r--r--chromium/third_party/blink/public/web/DEPS2
-rw-r--r--chromium/third_party/blink/public/web/devtools_agent.mojom23
-rw-r--r--chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h80
-rw-r--r--chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_proxy.h7
-rw-r--r--chromium/third_party/blink/public/web/web_associated_url_loader_options.h4
-rw-r--r--chromium/third_party/blink/public/web/web_ax_enums.h9
-rw-r--r--chromium/third_party/blink/public/web/web_ax_object.h4
-rw-r--r--chromium/third_party/blink/public/web/web_context_menu_data.h4
-rw-r--r--chromium/third_party/blink/public/web/web_document.h4
-rw-r--r--chromium/third_party/blink/public/web/web_dom_message_event.h2
-rw-r--r--chromium/third_party/blink/public/web/web_element_collection.h2
-rw-r--r--chromium/third_party/blink/public/web/web_embedded_worker_start_data.h2
-rw-r--r--chromium/third_party/blink/public/web/web_file_chooser_completion.h86
-rw-r--r--chromium/third_party/blink/public/web/web_file_chooser_params.h78
-rw-r--r--chromium/third_party/blink/public/web/web_frame_owner_properties.h2
-rw-r--r--chromium/third_party/blink/public/web/web_frame_widget.h7
-rw-r--r--chromium/third_party/blink/public/web/web_history_item.h7
-rw-r--r--chromium/third_party/blink/public/web/web_icon_url.h2
-rw-r--r--chromium/third_party/blink/public/web/web_ime_text_span.h1
-rw-r--r--chromium/third_party/blink/public/web/web_local_frame.h95
-rw-r--r--chromium/third_party/blink/public/web/web_local_frame_client.h118
-rw-r--r--chromium/third_party/blink/public/web/web_media_player_action.h13
-rw-r--r--chromium/third_party/blink/public/web/web_media_stream_registry.h48
-rw-r--r--chromium/third_party/blink/public/web/web_navigation_control.h147
-rw-r--r--chromium/third_party/blink/public/web/web_navigation_params.h89
-rw-r--r--chromium/third_party/blink/public/web/web_navigation_policy.h2
-rw-r--r--chromium/third_party/blink/public/web/web_origin_trials.h11
-rw-r--r--chromium/third_party/blink/public/web/web_performance.h6
-rw-r--r--chromium/third_party/blink/public/web/web_plugin.h2
-rw-r--r--chromium/third_party/blink/public/web/web_range.h4
-rw-r--r--chromium/third_party/blink/public/web/web_remote_frame.h9
-rw-r--r--chromium/third_party/blink/public/web/web_security_policy.h27
-rw-r--r--chromium/third_party/blink/public/web/web_settings.h29
-rw-r--r--chromium/third_party/blink/public/web/web_shared_worker_client.h2
-rw-r--r--chromium/third_party/blink/public/web/web_surrounding_text.h2
-rw-r--r--chromium/third_party/blink/public/web/web_text_direction.h2
-rw-r--r--chromium/third_party/blink/public/web/web_view.h59
-rw-r--r--chromium/third_party/blink/public/web/web_view_client.h31
-rw-r--r--chromium/third_party/blink/public/web/web_widget.h47
-rw-r--r--chromium/third_party/blink/public/web/web_widget_client.h19
-rw-r--r--chromium/third_party/blink/public/web/worker_content_settings_proxy.mojom2
230 files changed, 2044 insertions, 2193 deletions
diff --git a/chromium/third_party/blink/public/BUILD.gn b/chromium/third_party/blink/public/BUILD.gn
index d7e02532488..516058e0ca2 100644
--- a/chromium/third_party/blink/public/BUILD.gn
+++ b/chromium/third_party/blink/public/BUILD.gn
@@ -75,7 +75,6 @@ if (is_android) {
"./platform/modules/remoteplayback/web_remote_playback_availability.h",
"./platform/web_focus_type.h",
"./platform/web_input_event.h",
- "./platform/web_referrer_policy.h",
"./platform/web_text_input_mode.h",
"./platform/web_text_input_type.h",
"./web/web_context_menu_data.h",
@@ -90,6 +89,7 @@ if (is_android) {
android_library("blink_headers_java") {
deps = [
+ "//services/network/public/mojom:mojom_java",
"//third_party/android_deps:android_support_annotations_java",
]
srcjar_deps = [ ":blink_headers_java_enums_srcjar" ]
@@ -99,11 +99,12 @@ if (is_android) {
source_set("test_headers") {
testonly = true
sources = [
- "platform/scheduler/test/fake_renderer_scheduler.h",
- "platform/scheduler/test/mock_renderer_scheduler.h",
"platform/scheduler/test/renderer_scheduler_test_support.h",
+ "platform/scheduler/test/web_fake_thread_scheduler.h",
+ "platform/scheduler/test/web_mock_thread_scheduler.h",
]
deps = [
+ ":blink_headers",
"//base:base",
"//cc:cc",
"//testing/gmock:gmock",
@@ -119,7 +120,6 @@ source_set("blink_headers") {
sources = [
"platform/blame_context.h",
"platform/code_cache_loader.h",
- "platform/cors_status.h",
"platform/file_path_conversion.h",
"platform/interface_provider.h",
"platform/interface_registry.h",
@@ -128,24 +128,28 @@ source_set("blink_headers") {
"platform/mac/web_sandbox_support.h",
"platform/mac/web_scrollbar_theme.h",
"platform/modules/background_fetch/web_background_fetch_registration.h",
+ "platform/modules/indexeddb/indexed_db_key_builder.h",
"platform/modules/indexeddb/web_idb_callbacks.h",
- "platform/modules/indexeddb/web_idb_cursor.h",
- "platform/modules/indexeddb/web_idb_database.h",
"platform/modules/indexeddb/web_idb_database_callbacks.h",
"platform/modules/indexeddb/web_idb_database_error.h",
"platform/modules/indexeddb/web_idb_database_exception.h",
- "platform/modules/indexeddb/web_idb_factory.h",
"platform/modules/indexeddb/web_idb_key.h",
"platform/modules/indexeddb/web_idb_key_path.h",
"platform/modules/indexeddb/web_idb_key_range.h",
"platform/modules/indexeddb/web_idb_metadata.h",
+ "platform/modules/indexeddb/web_idb_name_and_version.h",
"platform/modules/indexeddb/web_idb_observation.h",
"platform/modules/indexeddb/web_idb_value.h",
"platform/modules/installedapp/web_related_application.h",
"platform/modules/installedapp/web_related_apps_fetcher.h",
"platform/modules/media_capabilities/web_audio_configuration.h",
+ "platform/modules/media_capabilities/web_media_capabilities_callbacks.h",
"platform/modules/media_capabilities/web_media_capabilities_client.h",
+ "platform/modules/media_capabilities/web_media_capabilities_decoding_info.h",
+ "platform/modules/media_capabilities/web_media_capabilities_info.h",
+ "platform/modules/media_capabilities/web_media_capabilities_key_system_configuration.h",
"platform/modules/media_capabilities/web_media_configuration.h",
+ "platform/modules/media_capabilities/web_media_decoding_configuration.h",
"platform/modules/media_capabilities/web_video_configuration.h",
"platform/modules/notifications/web_notification_action.h",
"platform/modules/notifications/web_notification_constants.h",
@@ -164,16 +168,13 @@ source_set("blink_headers") {
"platform/modules/remoteplayback/web_remote_playback_availability.h",
"platform/modules/remoteplayback/web_remote_playback_client.h",
"platform/modules/remoteplayback/web_remote_playback_state.h",
- "platform/modules/screen_orientation/web_screen_orientation_enum_traits.h",
- "platform/modules/service_worker/web_navigation_preload_state.h",
"platform/modules/service_worker/web_service_worker_clients_info.h",
"platform/modules/service_worker/web_service_worker_error.h",
"platform/modules/service_worker/web_service_worker_network_provider.h",
"platform/modules/service_worker/web_service_worker_object_info.h",
"platform/modules/service_worker/web_service_worker_provider.h",
"platform/modules/service_worker/web_service_worker_provider_client.h",
- "platform/modules/service_worker/web_service_worker_registration.h",
- "platform/modules/service_worker/web_service_worker_registration_proxy.h",
+ "platform/modules/service_worker/web_service_worker_registration_object_info.h",
"platform/modules/service_worker/web_service_worker_request.h",
"platform/modules/service_worker/web_service_worker_response.h",
"platform/modules/service_worker/web_service_worker_stream_handle.h",
@@ -181,11 +182,9 @@ source_set("blink_headers") {
"platform/modules/webmidi/web_midi_accessor_client.h",
"platform/platform.h",
"platform/pointer_properties.h",
- "platform/scheduler/child/webthread_base.h",
- "platform/scheduler/renderer_process_type.h",
- "platform/scheduler/single_thread_idle_task_runner.h",
"platform/scheduler/web_rail_mode_observer.h",
"platform/scheduler/web_render_widget_scheduling_state.h",
+ "platform/scheduler/web_renderer_process_type.h",
"platform/scheduler/web_resource_loading_task_runner_handle.h",
"platform/scheduler/web_thread_scheduler.h",
"platform/scoped_web_callbacks.h",
@@ -245,7 +244,6 @@ source_set("blink_headers") {
"platform/web_encrypted_media_request.h",
"platform/web_encrypted_media_types.h",
"platform/web_file_system_type.h",
- "platform/web_file_utilities.h",
"platform/web_float_point.h",
"platform/web_float_point_3d.h",
"platform/web_float_rect.h",
@@ -275,7 +273,6 @@ source_set("blink_headers") {
"platform/web_intrinsic_sizing_info.h",
"platform/web_isolated_world_ids.h",
"platform/web_keyboard_event.h",
- "platform/web_layer_scroll_client.h",
"platform/web_layer_tree_view.h",
"platform/web_loading_behavior_flag.h",
"platform/web_localized_string.h",
@@ -312,7 +309,6 @@ source_set("blink_headers") {
"platform/web_prescient_networking.h",
"platform/web_private_ptr.h",
"platform/web_rect.h",
- "platform/web_referrer_policy.h",
"platform/web_resource_timing_info.h",
"platform/web_rtc_answer_options.h",
"platform/web_rtc_api_name.h",
@@ -389,8 +385,8 @@ source_set("blink_headers") {
"web/blink.h",
"web/mac/web_substring_util.h",
"web/mac/web_substring_util.h",
- "web/modules/password_manager/web_form_element_observer.h",
- "web/modules/password_manager/web_form_element_observer_callback.h",
+ "web/modules/autofill/web_form_element_observer.h",
+ "web/modules/autofill/web_form_element_observer_callback.h",
"web/modules/service_worker/web_service_worker_context_client.h",
"web/modules/service_worker/web_service_worker_context_proxy.h",
"web/web_active_fling_parameters.h",
@@ -432,8 +428,6 @@ source_set("blink_headers") {
"web/web_embedded_worker_start_data.h",
"web/web_external_popup_menu.h",
"web/web_external_popup_menu_client.h",
- "web/web_file_chooser_completion.h",
- "web/web_file_chooser_params.h",
"web/web_form_control_element.h",
"web/web_form_element.h",
"web/web_frame.h",
@@ -461,10 +455,11 @@ source_set("blink_headers") {
"web/web_local_frame_client.h",
"web/web_meaningful_layout.h",
"web/web_media_player_action.h",
- "web/web_media_stream_registry.h",
"web/web_memory_statistics.h",
"web/web_menu_item_info.h",
"web/web_meta_element.h",
+ "web/web_navigation_control.h",
+ "web/web_navigation_params.h",
"web/web_navigation_policy.h",
"web/web_navigation_type.h",
"web/web_node.h",
@@ -529,16 +524,6 @@ source_set("blink_headers") {
"web/win/web_font_rendering.h",
]
- if (is_android) {
- # Android uses some Linux sources, put those back.
- set_sources_assignment_filter([])
- sources += [
- "platform/linux/web_font_render_style.h",
- "web/linux/web_font_rendering.h",
- ]
- set_sources_assignment_filter(sources_assignment_filter)
- }
-
public_configs = [
":blink_headers_config",
@@ -554,11 +539,13 @@ source_set("blink_headers") {
"//third_party/blink/public/common",
"//third_party/webrtc/api:libjingle_peerconnection_api",
"//third_party/webrtc/rtc_base:rtc_base",
+ "//ui/accessibility:ax_enums_mojo",
"//url",
]
deps = [
":generate_mojo_bindings",
+ ":mojo_bindings_blink_headers",
"//base:base",
"//cc:cc",
"//cc/paint:paint",
@@ -623,19 +610,6 @@ grit("image_resources") {
group("scaled_resources") {
public_deps = [
":image_resources",
- ":media_controls_resources_header",
- "//third_party/blink/renderer/modules/media_controls:media_controls_resources",
- ]
-}
-
-copy("media_controls_resources_header") {
- sources = [
- "$root_gen_dir/third_party/blink/renderer/modules/media_controls/resources/grit/media_controls_resources.h",
- ]
- outputs = [
- "$resources_out_dir/grit/media_controls_resources.h",
- ]
- deps = [
"//third_party/blink/renderer/modules/media_controls:media_controls_resources",
]
}
@@ -695,7 +669,6 @@ mojom("mojo_bindings") {
"platform/modules/webauthn/virtual_authenticator.mojom",
"platform/modules/webdatabase/web_database.mojom",
"platform/oom_intervention.mojom",
- "platform/referrer.mojom",
"platform/reporting.mojom",
"platform/site_engagement.mojom",
"platform/ukm.mojom",
@@ -761,6 +734,7 @@ mojom("android_mojo_bindings") {
]
public_deps = [
"//mojo/public/mojom/base",
+ "//services/media_session/public/mojom",
"//ui/gfx/geometry/mojo",
"//url/mojom:url_mojom_gurl",
]
diff --git a/chromium/third_party/blink/public/README.md b/chromium/third_party/blink/public/README.md
index b9c21cd1938..fa00f0fe0bd 100644
--- a/chromium/third_party/blink/public/README.md
+++ b/chromium/third_party/blink/public/README.md
@@ -31,13 +31,13 @@ runs. Rather than communicating directly with the underlying operating system,
Blink is designed to run in a sandbox and interacts with the operating system
via the platform API. The central interface in this part of the API is
Platform, which is a pure virtual interface from which Blink obtains many other
-interfaces. public/platform/ is implemented by WebKit/Source/platform/exported/.
+interfaces. public/platform/ is implemented by blink/renderer/platform/exported.
The public/web directory defines an interface to Blink's implementation of the
web platform, including the Document Object Model (DOM). The central interface
in this part of the API is WebView, which is a good starting point for
exploring the API. public/web/ is implemented by
-WebKit/Source/{core,modules,controller}/exported/.
+blink/renderer/{core,modules}/exported/.
Note that public/platform should not depend on public/web.
diff --git a/chromium/third_party/blink/public/blink_resources.grd b/chromium/third_party/blink/public/blink_resources.grd
index ec9af0adac1..42047241c0d 100644
--- a/chromium/third_party/blink/public/blink_resources.grd
+++ b/chromium/third_party/blink/public/blink_resources.grd
@@ -8,19 +8,19 @@
</outputs>
<release seq="1">
<includes>
- <!-- Source/core/css/html.css processed through minimize_css.py -->
+ <!-- renderer/core/html/resources/html.css processed through minimize_css.py -->
<include name="IDR_UASTYLE_HTML_CSS" file="${cwd}/${html_min_css}" type="BINDATA" compress="gzip"/>
- <include name="IDR_UASTYLE_QUIRKS_CSS" file="../renderer/core/css/quirks.css" type="BINDATA" compress="gzip"/>
+ <include name="IDR_UASTYLE_QUIRKS_CSS" file="../renderer/core/html/resources/quirks.css" type="BINDATA" compress="gzip"/>
<include name="IDR_UASTYLE_VIEW_SOURCE_CSS" file="../renderer/core/css/view-source.css" type="BINDATA" compress="gzip"/>
- <include name="IDR_UASTYLE_THEME_CHROMIUM_ANDROID_CSS" file="../renderer/core/css/themeChromiumAndroid.css" type="BINDATA" compress="gzip"/>
+ <include name="IDR_UASTYLE_THEME_CHROMIUM_ANDROID_CSS" file="../renderer/core/html/resources/android.css" type="BINDATA" compress="gzip"/>
<include name="IDR_UASTYLE_FULLSCREEN_ANDROID_CSS" file="../renderer/core/css/fullscreenAndroid.css" type="BINDATA" compress="gzip"/>
- <include name="IDR_UASTYLE_THEME_CHROMIUM_LINUX_CSS" file="../renderer/core/css/themeChromiumLinux.css" type="BINDATA" compress="gzip"/>
+ <include name="IDR_UASTYLE_THEME_CHROMIUM_LINUX_CSS" file="../renderer/core/html/resources/linux.css" type="BINDATA" compress="gzip"/>
<if expr="is_macosx">
- <include name="IDR_UASTYLE_THEME_MAC_CSS" file="../renderer/core/css/themeMac.css" type="BINDATA" compress="gzip"/>
+ <include name="IDR_UASTYLE_THEME_MAC_CSS" file="../renderer/core/html/resources/mac.css" type="BINDATA" compress="gzip"/>
</if>
- <include name="IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS" file="../renderer/core/css/themeInputMultipleFields.css" type="BINDATA" compress="gzip"/>
- <include name="IDR_UASTYLE_THEME_WIN_CSS" file="../renderer/core/css/themeWin.css" type="BINDATA" compress="gzip"/>
- <include name="IDR_UASTYLE_THEME_WIN_QUIRKS_CSS" file="../renderer/core/css/themeWinQuirks.css" type="BINDATA" compress="gzip"/>
+ <include name="IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS" file="../renderer/core/html/resources/input_multiple_fields.css" type="BINDATA" compress="gzip"/>
+ <include name="IDR_UASTYLE_THEME_WIN_CSS" file="../renderer/core/html/resources/win.css" type="BINDATA" compress="gzip"/>
+ <include name="IDR_UASTYLE_THEME_WIN_QUIRKS_CSS" file="../renderer/core/html/resources/win_quirks.css" type="BINDATA" compress="gzip"/>
<include name="IDR_UASTYLE_SVG_CSS" file="../renderer/core/css/svg.css" type="BINDATA" compress="gzip"/>
<include name="IDR_UASTYLE_MATHML_CSS" file="../renderer/core/css/mathml.css" type="BINDATA" compress="gzip"/>
<include name="IDR_UASTYLE_FULLSCREEN_CSS" file="../renderer/core/css/fullscreen.css" type="BINDATA" compress="gzip"/>
diff --git a/chromium/third_party/blink/public/common/BUILD.gn b/chromium/third_party/blink/public/common/BUILD.gn
index ffb29072ce9..6071b579b69 100644
--- a/chromium/third_party/blink/public/common/BUILD.gn
+++ b/chromium/third_party/blink/public/common/BUILD.gn
@@ -15,7 +15,7 @@ component("common") {
public_deps = [
"//third_party/blink/public/common:headers",
- "//third_party/blink/public/mojom:mojom_core",
+ "//third_party/blink/public/mojom:mojom_modules",
]
deps = [
"//third_party/blink/common",
@@ -38,29 +38,35 @@ source_set("headers") {
"blob/blob_utils.h",
"cache_storage/cache_storage_utils.h",
"client_hints/client_hints.h",
+ "common_export.h",
"device_memory/approximated_device_memory.h",
"dom_storage/session_storage_namespace_id.h",
+ "download/download_stats.h",
"experiments/memory_ablation_experiment.h",
"feature_policy/feature_policy.h",
"features.h",
+ "frame/frame_owner_element_type.h",
"frame/frame_policy.h",
+ "frame/from_ad_state.h",
"frame/sandbox_flags.h",
"frame/user_activation_state.h",
"frame/user_activation_update_source.h",
"frame/user_activation_update_type.h",
+ "indexeddb/indexed_db_default_mojom_traits.h",
"indexeddb/indexeddb_key.h",
"indexeddb/indexeddb_key_path.h",
"indexeddb/indexeddb_key_range.h",
"indexeddb/indexeddb_metadata.h",
- "indexeddb/indexeddb_struct_traits.h",
"indexeddb/web_idb_types.h",
"manifest/manifest.h",
"manifest/manifest_icon_selector.h",
"manifest/web_display_mode.h",
"messaging/cloneable_message.h",
+ "messaging/cloneable_message_struct_traits.h",
"messaging/message_port_channel.h",
"messaging/string_message_codec.h",
"messaging/transferable_message.h",
+ "messaging/transferable_message_struct_traits.h",
"mime_util/mime_util.h",
"notifications/notification_resources.h",
"notifications/notification_struct_traits.h",
@@ -73,7 +79,6 @@ source_set("headers") {
"page/launching_process_state.h",
"picture_in_picture/picture_in_picture_control_info.h",
"privacy_preferences.h",
- "screen_orientation/web_screen_orientation_enum_traits.h",
"screen_orientation/web_screen_orientation_lock_type.h",
"screen_orientation/web_screen_orientation_type.h",
"service_worker/service_worker_status_code.h",
@@ -83,12 +88,14 @@ source_set("headers") {
public_deps = [
"//skia",
- "//third_party/blink/public/mojom:mojom_core_headers",
+ "//third_party/blink/public/mojom:mojom_modules_headers",
]
deps = [
"//base",
+ "//mojo/public/cpp/bindings",
"//mojo/public/cpp/system",
+ "//mojo/public/mojom/base",
"//net",
]
@@ -105,9 +112,17 @@ source_set("headers") {
deps += [ ":font_unique_name_table_proto" ]
}
+ if (is_mac) {
+ sources += [ "sandbox_support/sandbox_support_mac.h" ]
+ }
+
if (is_win) {
sources += [ "dwrite_rasterizer_support/dwrite_rasterizer_support.h" ]
}
+
+ # common_export.h is an implementation detail of component builds,
+ # not part of the public API.
+ public = sources - [ "common_export.h" ]
}
if (is_android) {
diff --git a/chromium/third_party/blink/public/common/DEPS b/chromium/third_party/blink/public/common/DEPS
index 525437235f3..c28e08fe4f8 100644
--- a/chromium/third_party/blink/public/common/DEPS
+++ b/chromium/third_party/blink/public/common/DEPS
@@ -15,8 +15,4 @@ include_rules = [
"+third_party/blink/public/mojom",
"+ui/gfx/geometry",
"+url",
-
- # This file should not be included outside of blink, so it does not belong
- # in blink/public.
- "+third_party/blink/common/common_export.h",
]
diff --git a/chromium/third_party/blink/public/common/associated_interfaces/associated_interface_provider.h b/chromium/third_party/blink/public/common/associated_interfaces/associated_interface_provider.h
index 72eba5d2c5d..2606de7dbc8 100644
--- a/chromium/third_party/blink/public/common/associated_interfaces/associated_interface_provider.h
+++ b/chromium/third_party/blink/public/common/associated_interfaces/associated_interface_provider.h
@@ -14,7 +14,7 @@
#include "mojo/public/cpp/bindings/associated_interface_ptr.h"
#include "mojo/public/cpp/bindings/associated_interface_request.h"
#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/associated_interfaces/associated_interfaces.mojom.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/associated_interfaces/associated_interface_registry.h b/chromium/third_party/blink/public/common/associated_interfaces/associated_interface_registry.h
index 590786fa97a..4c526728e50 100644
--- a/chromium/third_party/blink/public/common/associated_interfaces/associated_interface_registry.h
+++ b/chromium/third_party/blink/public/common/associated_interfaces/associated_interface_registry.h
@@ -14,7 +14,7 @@
#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/bindings/associated_interface_request.h"
#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/blob/blob_utils.h b/chromium/third_party/blink/public/common/blob/blob_utils.h
index 93b165c3597..585d273aefe 100644
--- a/chromium/third_party/blink/public/common/blob/blob_utils.h
+++ b/chromium/third_party/blink/public/common/blob/blob_utils.h
@@ -9,7 +9,7 @@
#include <stdint.h>
#include <limits>
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/cache_storage/cache_storage_utils.h b/chromium/third_party/blink/public/common/cache_storage/cache_storage_utils.h
index c7234bae8d3..561b386cd4b 100644
--- a/chromium/third_party/blink/public/common/cache_storage/cache_storage_utils.h
+++ b/chromium/third_party/blink/public/common/cache_storage/cache_storage_utils.h
@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_CACHE_STORAGE_CACHE_STORAGE_UTILS_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_CACHE_STORAGE_CACHE_STORAGE_UTILS_H_
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
namespace cache_storage {
diff --git a/chromium/third_party/blink/public/common/client_hints/client_hints.h b/chromium/third_party/blink/public/common/client_hints/client_hints.h
index 6949e07b8f9..e3beead5a72 100644
--- a/chromium/third_party/blink/public/common/client_hints/client_hints.h
+++ b/chromium/third_party/blink/public/common/client_hints/client_hints.h
@@ -7,7 +7,7 @@
#include <stddef.h>
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/common_export.h b/chromium/third_party/blink/public/common/common_export.h
new file mode 100644
index 00000000000..e9891f899a4
--- /dev/null
+++ b/chromium/third_party/blink/public/common/common_export.h
@@ -0,0 +1,37 @@
+// 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_COMMON_COMMON_EXPORT_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_COMMON_EXPORT_H_
+
+// This file is NOT to be included directly by code outside blink. It
+// is an implementation detail of component builds.
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(BLINK_COMMON_IMPLEMENTATION)
+#define BLINK_COMMON_EXPORT __declspec(dllexport)
+#define BLINK_COMMON_EXPORT_PRIVATE __declspec(dllexport)
+#else
+#define BLINK_COMMON_EXPORT __declspec(dllimport)
+#define BLINK_COMMON_EXPORT_PRIVATE __declspec(dllimport)
+#endif // defined(BLINK_COMMON_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#if defined(BLINK_COMMON_IMPLEMENTATION)
+#define BLINK_COMMON_EXPORT __attribute__((visibility("default")))
+#define BLINK_COMMON_EXPORT_PRIVATE __attribute__((visibility("default")))
+#else
+#define BLINK_COMMON_EXPORT
+#define BLINK_COMMON_EXPORT_PRIVATE
+#endif
+#endif
+
+#else /// defined(COMPONENT_BUILD)
+#define BLINK_COMMON_EXPORT
+#define BLINK_COMMON_EXPORT_PRIVATE
+#endif
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_COMMON_EXPORT_H_
diff --git a/chromium/third_party/blink/public/common/device_memory/approximated_device_memory.h b/chromium/third_party/blink/public/common/device_memory/approximated_device_memory.h
index 193e059cb3c..2f1c8137121 100644
--- a/chromium/third_party/blink/public/common/device_memory/approximated_device_memory.h
+++ b/chromium/third_party/blink/public/common/device_memory/approximated_device_memory.h
@@ -7,7 +7,7 @@
#include <stdint.h>
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/dom_storage/session_storage_namespace_id.h b/chromium/third_party/blink/public/common/dom_storage/session_storage_namespace_id.h
index 5ac76358de3..10ea660ab8a 100644
--- a/chromium/third_party/blink/public/common/dom_storage/session_storage_namespace_id.h
+++ b/chromium/third_party/blink/public/common/dom_storage/session_storage_namespace_id.h
@@ -7,7 +7,7 @@
#include <string>
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/download/download_stats.h b/chromium/third_party/blink/public/common/download/download_stats.h
new file mode 100644
index 00000000000..ca9c012a259
--- /dev/null
+++ b/chromium/third_party/blink/public/common/download/download_stats.h
@@ -0,0 +1,32 @@
+// 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_COMMON_DOWNLOAD_DOWNLOAD_STATS_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_DOWNLOAD_DOWNLOAD_STATS_H_
+
+#include "base/macros.h"
+#include "third_party/blink/public/common/common_export.h"
+
+namespace blink {
+
+class BLINK_COMMON_EXPORT DownloadStats {
+ public:
+ // These values are used to construct an enum in UMA. They should never be
+ // changed.
+ static constexpr unsigned kGestureBit = 0x1 << 0;
+ static constexpr unsigned kAdBit = 0x1 << 1;
+ static constexpr unsigned kCrossOriginBit = 0x1 << 2;
+ static constexpr unsigned kSandboxBit = 0x1 << 3;
+ static constexpr unsigned kCountSandboxOriginAdGesture = 16;
+
+ static void RecordMainFrameHasGesture(bool gesture);
+ static void RecordSubframeSandboxOriginAdGesture(unsigned value);
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(DownloadStats);
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_DOWNLOAD_DOWNLOAD_STATS_H_
diff --git a/chromium/third_party/blink/public/common/dwrite_rasterizer_support/dwrite_rasterizer_support.h b/chromium/third_party/blink/public/common/dwrite_rasterizer_support/dwrite_rasterizer_support.h
index c71262b2c3a..55e138dce1d 100644
--- a/chromium/third_party/blink/public/common/dwrite_rasterizer_support/dwrite_rasterizer_support.h
+++ b/chromium/third_party/blink/public/common/dwrite_rasterizer_support/dwrite_rasterizer_support.h
@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_DWRITE_RASTERIZER_SUPPORT_DWRITE_RASTERIZER_SUPPORT_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_DWRITE_RASTERIZER_SUPPORT_DWRITE_RASTERIZER_SUPPORT_H_
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/experiments/memory_ablation_experiment.h b/chromium/third_party/blink/public/common/experiments/memory_ablation_experiment.h
index 2a973b892a9..0159ebdcc00 100644
--- a/chromium/third_party/blink/public/common/experiments/memory_ablation_experiment.h
+++ b/chromium/third_party/blink/public/common/experiments/memory_ablation_experiment.h
@@ -9,7 +9,7 @@
#include "base/feature_list.h"
#include "base/memory/ref_counted.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace base {
class SequencedTaskRunner;
diff --git a/chromium/third_party/blink/public/common/feature_policy/feature_policy.h b/chromium/third_party/blink/public/common/feature_policy/feature_policy.h
index 0df3efdef16..0359048c071 100644
--- a/chromium/third_party/blink/public/common/feature_policy/feature_policy.h
+++ b/chromium/third_party/blink/public/common/feature_policy/feature_policy.h
@@ -9,9 +9,10 @@
#include <memory>
#include <vector>
+#include "base/containers/flat_set.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom.h"
#include "url/origin.h"
@@ -92,6 +93,7 @@ struct BLINK_COMMON_EXPORT ParsedFeaturePolicyDeclaration {
ParsedFeaturePolicyDeclaration(mojom::FeaturePolicyFeature feature,
bool matches_all_origins,
bool matches_opaque_src,
+ mojom::FeaturePolicyDisposition disposition,
std::vector<url::Origin> origins);
ParsedFeaturePolicyDeclaration(const ParsedFeaturePolicyDeclaration& rhs);
ParsedFeaturePolicyDeclaration& operator=(
@@ -106,6 +108,8 @@ struct BLINK_COMMON_EXPORT ParsedFeaturePolicyDeclaration {
// of the iframe to be present in |origins|, but for sandboxed iframes, this
// flag is set instead.
bool matches_opaque_src;
+ mojom::FeaturePolicyDisposition disposition;
+ // An alphabetically sorted list of all the origins allowed.
std::vector<url::Origin> origins;
};
@@ -114,6 +118,13 @@ using ParsedFeaturePolicy = std::vector<ParsedFeaturePolicyDeclaration>;
bool BLINK_COMMON_EXPORT operator==(const ParsedFeaturePolicyDeclaration& lhs,
const ParsedFeaturePolicyDeclaration& rhs);
+// ParsedFeaturePolicy objects can contain directives of both enforcing and
+// report-only dispositions. This utility function will extract just the items
+// of one disposition or the other.
+BLINK_COMMON_EXPORT std::unique_ptr<ParsedFeaturePolicy>
+DirectivesWithDisposition(mojom::FeaturePolicyDisposition disposition,
+ const ParsedFeaturePolicy& policy);
+
class BLINK_COMMON_EXPORT FeaturePolicy {
public:
// Represents a collection of origins which make up an allowlist in a feature
@@ -138,12 +149,12 @@ class BLINK_COMMON_EXPORT FeaturePolicy {
// Returns true if the allowlist matches all origins.
bool MatchesAll() const;
- // Returns list of origins in the allowlist.
- const std::vector<url::Origin>& Origins() const;
+ // Returns set of origins in the allowlist.
+ const base::flat_set<url::Origin>& Origins() const;
private:
bool matches_all_origins_;
- std::vector<url::Origin> origins_;
+ base::flat_set<url::Origin> origins_;
};
// The FeaturePolicy::FeatureDefault enum defines the default enable state for
diff --git a/chromium/third_party/blink/public/common/features.h b/chromium/third_party/blink/public/common/features.h
index f5712d6cc3e..3d4abd02b5c 100644
--- a/chromium/third_party/blink/public/common/features.h
+++ b/chromium/third_party/blink/public/common/features.h
@@ -6,7 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FEATURES_H_
#include "base/feature_list.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
namespace features {
@@ -14,11 +14,19 @@ namespace features {
BLINK_COMMON_EXPORT extern const base::Feature kAutofillPreviewStyleExperiment;
BLINK_COMMON_EXPORT extern const base::Feature
kEagerCacheStorageSetupForServiceWorkers;
+BLINK_COMMON_EXPORT extern const base::Feature
+ kEnableGpuRasterizationViewportRestriction;
+BLINK_COMMON_EXPORT extern const base::Feature kFirstContentfulPaintPlusPlus;
+BLINK_COMMON_EXPORT extern const base::Feature kImplicitRootScroller;
+BLINK_COMMON_EXPORT extern const base::Feature kJankTracking;
+BLINK_COMMON_EXPORT extern const base::Feature kBlinkGenPropertyTrees;
BLINK_COMMON_EXPORT extern const base::Feature kLayoutNG;
+BLINK_COMMON_EXPORT extern const base::Feature kMixedContentAutoupgrade;
BLINK_COMMON_EXPORT extern const base::Feature kMojoBlobURLs;
-BLINK_COMMON_EXPORT extern const base::Feature kNestedWorkers;
BLINK_COMMON_EXPORT extern const base::Feature kOnionSoupDOMStorage;
BLINK_COMMON_EXPORT extern const base::Feature kPortals;
+BLINK_COMMON_EXPORT extern const base::Feature kRTCGetDisplayMedia;
+BLINK_COMMON_EXPORT extern const base::Feature kRTCUnifiedPlanByDefault;
BLINK_COMMON_EXPORT extern const base::Feature kRecordAnchorMetricsClicked;
BLINK_COMMON_EXPORT extern const base::Feature kRecordAnchorMetricsVisible;
BLINK_COMMON_EXPORT extern const base::Feature
@@ -28,10 +36,8 @@ BLINK_COMMON_EXPORT extern const base::Feature
BLINK_COMMON_EXPORT extern const base::Feature kServiceWorkerServicification;
BLINK_COMMON_EXPORT extern const base::Feature kStopInBackground;
BLINK_COMMON_EXPORT extern const base::Feature kStopNonTimersInBackground;
+BLINK_COMMON_EXPORT extern const base::Feature kWasmCodeCache;
BLINK_COMMON_EXPORT extern const base::Feature kWritableFilesAPI;
-BLINK_COMMON_EXPORT extern const base::Feature kMixedContentAutoupgrade;
-BLINK_COMMON_EXPORT extern const base::Feature kJankTracking;
-BLINK_COMMON_EXPORT extern const base::Feature kRTCUnifiedPlanByDefault;
BLINK_COMMON_EXPORT extern const char
kAutofillPreviewStyleExperimentBgColorParameterName[];
diff --git a/chromium/third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h b/chromium/third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h
index 290f6c045f1..b29a0867ad7 100644
--- a/chromium/third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h
+++ b/chromium/third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h
@@ -6,7 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FONT_UNIQUE_NAME_LOOKUP_FONT_TABLE_MATCHER_H_
#include "base/memory/read_only_shared_memory_region.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/font_unique_name_lookup/font_unique_name_table.pb.h"
#include <stddef.h>
diff --git a/chromium/third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h b/chromium/third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h
index 86c943894ca..0ea2aa0f4b7 100644
--- a/chromium/third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h
+++ b/chromium/third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h
@@ -6,7 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FONT_UNIQUE_NAME_LOOKUP_ICU_FOLD_CASE_UTIL_H_
#include <string>
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/frame/frame_owner_element_type.h b/chromium/third_party/blink/public/common/frame/frame_owner_element_type.h
new file mode 100644
index 00000000000..d0cbf3c6d77
--- /dev/null
+++ b/chromium/third_party/blink/public/common/frame/frame_owner_element_type.h
@@ -0,0 +1,27 @@
+// 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_COMMON_FRAME_FRAME_OWNER_ELEMENT_TYPE_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FRAME_FRAME_OWNER_ELEMENT_TYPE_H_
+
+#include "third_party/blink/public/common/common_export.h"
+
+namespace blink {
+
+// The type of the frame owner element for a frame. In cross-process frames,
+// this would be the type of the HTMLFrameOwnerElement for the remote frame in
+// the parent process.
+enum class FrameOwnerElementType {
+ kNone = 0 /* For a main frame */,
+ kIframe,
+ kObject,
+ kEmbed,
+ kFrame,
+ kPortal,
+ kMaxValue = kPortal
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_FRAME_FRAME_OWNER_ELEMENT_TYPE_H_
diff --git a/chromium/third_party/blink/public/common/frame/from_ad_state.h b/chromium/third_party/blink/public/common/frame/from_ad_state.h
new file mode 100644
index 00000000000..4fbd474dcfb
--- /dev/null
+++ b/chromium/third_party/blink/public/common/frame/from_ad_state.h
@@ -0,0 +1,32 @@
+// 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_COMMON_FRAME_FROM_AD_STATE_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FRAME_FROM_AD_STATE_H_
+
+#include "third_party/blink/public/common/common_export.h"
+
+namespace blink {
+
+// This enum is the cross product of two ad related status of an event: whether
+// the event occurs on an ad frame, and whether it occurs with an ad script in
+// the stack.
+enum class FromAdState {
+ // This is used for a UMA histogram. Please never alter existing values, only
+ // append new ones and make sure to update enums.xml.
+ kAdScriptAndAdFrame = 0,
+ kNonAdScriptAndAdFrame = 1,
+ kAdScriptAndNonAdFrame = 2,
+ kNonAdScriptAndNonAdFrame = 3,
+ kMaxValue = kNonAdScriptAndNonAdFrame,
+};
+
+// Returns the FromAdState corresponded to the cross product of |is_ad_subframe|
+// and |is_ad_script_in_stack|.
+FromAdState BLINK_COMMON_EXPORT GetFromAdState(bool is_ad_subframe,
+ bool is_ad_script_in_stack);
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_FRAME_FROM_AD_STATE_H_
diff --git a/chromium/third_party/blink/public/common/frame/user_activation_state.h b/chromium/third_party/blink/public/common/frame/user_activation_state.h
index 9cd138bc7d2..6d0558e1b50 100644
--- a/chromium/third_party/blink/public/common/frame/user_activation_state.h
+++ b/chromium/third_party/blink/public/common/frame/user_activation_state.h
@@ -6,7 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FRAME_USER_ACTIVATION_STATE_H_
#include "base/time/time_override.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/frame/user_activation_update_type.h b/chromium/third_party/blink/public/common/frame/user_activation_update_type.h
index 22f88573171..d252380d7b5 100644
--- a/chromium/third_party/blink/public/common/frame/user_activation_update_type.h
+++ b/chromium/third_party/blink/public/common/frame/user_activation_update_type.h
@@ -12,7 +12,8 @@ namespace blink {
enum class UserActivationUpdateType {
kNotifyActivation,
kConsumeTransientActivation,
- kMaxValue = kConsumeTransientActivation
+ kClearActivation,
+ kMaxValue = kClearActivation
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/common/indexeddb/OWNERS b/chromium/third_party/blink/public/common/indexeddb/OWNERS
index 3b5f7f58e91..4d50d635c42 100644
--- a/chromium/third_party/blink/public/common/indexeddb/OWNERS
+++ b/chromium/third_party/blink/public/common/indexeddb/OWNERS
@@ -1,7 +1,7 @@
file://content/browser/indexed_db/OWNERS
-per-file *_struct_traits*.*=set noparent
-per-file *_struct_traits*.*=file://ipc/SECURITY_OWNERS
+per-file *_mojom_traits*.*=set noparent
+per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
diff --git a/chromium/third_party/blink/public/common/indexeddb/indexed_db_default.typemap b/chromium/third_party/blink/public/common/indexeddb/indexed_db_default.typemap
new file mode 100644
index 00000000000..a0777f0f495
--- /dev/null
+++ b/chromium/third_party/blink/public/common/indexeddb/indexed_db_default.typemap
@@ -0,0 +1,25 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+mojom = "//third_party/blink/public/mojom/indexeddb/indexeddb.mojom"
+public_headers = [
+ "//third_party/blink/public/common/indexeddb/indexeddb_key.h",
+ "//third_party/blink/public/common/indexeddb/indexeddb_key_path.h",
+ "//third_party/blink/public/common/indexeddb/indexeddb_key_range.h",
+ "//third_party/blink/public/common/indexeddb/indexeddb_metadata.h",
+ "//third_party/blink/public/common/indexeddb/web_idb_types.h",
+]
+traits_headers = [
+ "//mojo/public/cpp/bindings/array_traits_span.h",
+ "//third_party/blink/public/common/indexeddb/indexed_db_default_mojom_traits.h",
+]
+type_mappings = [
+ "blink.mojom.IDBDatabaseMetadata=::blink::IndexedDBDatabaseMetadata",
+ "blink.mojom.IDBIndexKeys=::blink::IndexedDBIndexKeys",
+ "blink.mojom.IDBIndexMetadata=::blink::IndexedDBIndexMetadata",
+ "blink.mojom.IDBKey=::blink::IndexedDBKey",
+ "blink.mojom.IDBKeyPath=::blink::IndexedDBKeyPath",
+ "blink.mojom.IDBKeyRange=::blink::IndexedDBKeyRange",
+ "blink.mojom.IDBObjectStoreMetadata=::blink::IndexedDBObjectStoreMetadata",
+]
diff --git a/chromium/third_party/blink/public/common/indexeddb/indexeddb_struct_traits.h b/chromium/third_party/blink/public/common/indexeddb/indexed_db_default_mojom_traits.h
index 8e29eeae342..3954fbb0f27 100644
--- a/chromium/third_party/blink/public/common/indexeddb/indexeddb_struct_traits.h
+++ b/chromium/third_party/blink/public/common/indexeddb/indexed_db_default_mojom_traits.h
@@ -2,10 +2,11 @@
// 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_COMMON_INDEXEDDB_INDEXEDDB_STRUCT_TRAITS_H_
-#define THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXEDDB_STRUCT_TRAITS_H_
+#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXED_DB_DEFAULT_MOJOM_TRAITS_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXED_DB_DEFAULT_MOJOM_TRAITS_H_
-#include "third_party/blink/common/common_export.h"
+#include "base/containers/span.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/indexeddb/indexeddb_key.h"
#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom.h"
@@ -13,29 +14,13 @@ namespace mojo {
template <>
struct BLINK_COMMON_EXPORT
- EnumTraits<blink::mojom::IDBCursorDirection, blink::WebIDBCursorDirection> {
- static blink::mojom::IDBCursorDirection ToMojom(
- blink::WebIDBCursorDirection input);
- static bool FromMojom(blink::mojom::IDBCursorDirection input,
- blink::WebIDBCursorDirection* output);
-};
-
-template <>
-struct BLINK_COMMON_EXPORT
- EnumTraits<blink::mojom::IDBDataLoss, blink::WebIDBDataLoss> {
- static blink::mojom::IDBDataLoss ToMojom(blink::WebIDBDataLoss input);
- static bool FromMojom(blink::mojom::IDBDataLoss input,
- blink::WebIDBDataLoss* output);
-};
-
-template <>
-struct BLINK_COMMON_EXPORT
StructTraits<blink::mojom::IDBDatabaseMetadataDataView,
blink::IndexedDBDatabaseMetadata> {
static int64_t id(const blink::IndexedDBDatabaseMetadata& metadata) {
return metadata.id;
}
- static base::string16 name(const blink::IndexedDBDatabaseMetadata& metadata) {
+ static const base::string16& name(
+ const blink::IndexedDBDatabaseMetadata& metadata) {
return metadata.name;
}
static int64_t version(const blink::IndexedDBDatabaseMetadata& metadata) {
@@ -73,7 +58,8 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::IDBIndexMetadataDataView,
static int64_t id(const blink::IndexedDBIndexMetadata& metadata) {
return metadata.id;
}
- static base::string16 name(const blink::IndexedDBIndexMetadata& metadata) {
+ static const base::string16& name(
+ const blink::IndexedDBIndexMetadata& metadata) {
return metadata.name;
}
static const blink::IndexedDBKeyPath& key_path(
@@ -92,8 +78,43 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::IDBIndexMetadataDataView,
template <>
struct BLINK_COMMON_EXPORT
+ UnionTraits<blink::mojom::IDBKeyDataDataView, blink::IndexedDBKey> {
+ static blink::mojom::IDBKeyDataDataView::Tag GetTag(
+ const blink::IndexedDBKey& key);
+ static bool Read(blink::mojom::IDBKeyDataDataView data,
+ blink::IndexedDBKey* out);
+ static const std::vector<blink::IndexedDBKey>& key_array(
+ const blink::IndexedDBKey& key) {
+ return key.array();
+ }
+ static base::span<const uint8_t> binary(const blink::IndexedDBKey& key) {
+ return base::make_span(
+ reinterpret_cast<const uint8_t*>(key.binary().data()),
+ key.binary().size());
+ }
+ static const base::string16& string(const blink::IndexedDBKey& key) {
+ return key.string();
+ }
+ static double date(const blink::IndexedDBKey& key) { return key.date(); }
+ static double number(const blink::IndexedDBKey& key) { return key.number(); }
+ static blink::mojom::IDBDatalessKeyType other(
+ const blink::IndexedDBKey& key) {
+ switch (key.type()) {
+ case blink::kWebIDBKeyTypeInvalid:
+ return blink::mojom::IDBDatalessKeyType::Invalid;
+ case blink::kWebIDBKeyTypeNull:
+ return blink::mojom::IDBDatalessKeyType::Null;
+ default:
+ NOTREACHED();
+ return blink::mojom::IDBDatalessKeyType::Invalid;
+ }
+ }
+};
+
+template <>
+struct BLINK_COMMON_EXPORT
StructTraits<blink::mojom::IDBKeyDataView, blink::IndexedDBKey> {
- static blink::mojom::IDBKeyDataPtr data(const blink::IndexedDBKey& key);
+ static const blink::IndexedDBKey& data(const blink::IndexedDBKey& key);
static bool Read(blink::mojom::IDBKeyDataView data, blink::IndexedDBKey* out);
};
@@ -134,7 +155,7 @@ struct BLINK_COMMON_EXPORT
static int64_t id(const blink::IndexedDBObjectStoreMetadata& metadata) {
return metadata.id;
}
- static base::string16 name(
+ static const base::string16& name(
const blink::IndexedDBObjectStoreMetadata& metadata) {
return metadata.name;
}
@@ -158,40 +179,6 @@ struct BLINK_COMMON_EXPORT
blink::IndexedDBObjectStoreMetadata* out);
};
-template <>
-struct BLINK_COMMON_EXPORT
- EnumTraits<blink::mojom::IDBOperationType, blink::WebIDBOperationType> {
- static blink::mojom::IDBOperationType ToMojom(
- blink::WebIDBOperationType input);
- static bool FromMojom(blink::mojom::IDBOperationType input,
- blink::WebIDBOperationType* output);
-};
-
-template <>
-struct BLINK_COMMON_EXPORT
- EnumTraits<blink::mojom::IDBPutMode, blink::WebIDBPutMode> {
- static blink::mojom::IDBPutMode ToMojom(blink::WebIDBPutMode input);
- static bool FromMojom(blink::mojom::IDBPutMode input,
- blink::WebIDBPutMode* output);
-};
-
-template <>
-struct BLINK_COMMON_EXPORT
- EnumTraits<blink::mojom::IDBTaskType, blink::WebIDBTaskType> {
- static blink::mojom::IDBTaskType ToMojom(blink::WebIDBTaskType input);
- static bool FromMojom(blink::mojom::IDBTaskType input,
- blink::WebIDBTaskType* output);
-};
-
-template <>
-struct BLINK_COMMON_EXPORT
- EnumTraits<blink::mojom::IDBTransactionMode, blink::WebIDBTransactionMode> {
- static blink::mojom::IDBTransactionMode ToMojom(
- blink::WebIDBTransactionMode input);
- static bool FromMojom(blink::mojom::IDBTransactionMode input,
- blink::WebIDBTransactionMode* output);
-};
-
} // namespace mojo
-#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXEDDB_STRUCT_TRAITS_H_
+#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXED_DB_DEFAULT_MOJOM_TRAITS_H_
diff --git a/chromium/third_party/blink/public/common/indexeddb/indexeddb.typemap b/chromium/third_party/blink/public/common/indexeddb/indexeddb.typemap
deleted file mode 100644
index 85223b65638..00000000000
--- a/chromium/third_party/blink/public/common/indexeddb/indexeddb.typemap
+++ /dev/null
@@ -1,29 +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/mojom/indexeddb/indexeddb.mojom"
-public_headers = [
- "//third_party/blink/public/common/indexeddb/indexeddb_key.h",
- "//third_party/blink/public/common/indexeddb/indexeddb_key_path.h",
- "//third_party/blink/public/common/indexeddb/indexeddb_key_range.h",
- "//third_party/blink/public/common/indexeddb/indexeddb_metadata.h",
- "//third_party/blink/public/common/indexeddb/web_idb_types.h",
-]
-traits_headers =
- [ "//third_party/blink/public/common/indexeddb/indexeddb_struct_traits.h" ]
-type_mappings = [
- "blink.mojom.IDBCursorDirection=blink::WebIDBCursorDirection",
- "blink.mojom.IDBDataLoss=blink::WebIDBDataLoss",
- "blink.mojom.IDBDatabaseMetadata=blink::IndexedDBDatabaseMetadata",
- "blink.mojom.IDBIndexKeys=blink::IndexedDBIndexKeys",
- "blink.mojom.IDBIndexMetadata=blink::IndexedDBIndexMetadata",
- "blink.mojom.IDBKey=blink::IndexedDBKey",
- "blink.mojom.IDBKeyPath=blink::IndexedDBKeyPath",
- "blink.mojom.IDBKeyRange=blink::IndexedDBKeyRange",
- "blink.mojom.IDBObjectStoreMetadata=blink::IndexedDBObjectStoreMetadata",
- "blink.mojom.IDBOperationType=blink::WebIDBOperationType",
- "blink.mojom.IDBPutMode=blink::WebIDBPutMode",
- "blink.mojom.IDBTaskType=blink::WebIDBTaskType",
- "blink.mojom.IDBTransactionMode=blink::WebIDBTransactionMode",
-]
diff --git a/chromium/third_party/blink/public/common/indexeddb/indexeddb_key.h b/chromium/third_party/blink/public/common/indexeddb/indexeddb_key.h
index 78e891e3171..1b8dea4ffa9 100644
--- a/chromium/third_party/blink/public/common/indexeddb/indexeddb_key.h
+++ b/chromium/third_party/blink/public/common/indexeddb/indexeddb_key.h
@@ -12,7 +12,7 @@
#include "base/logging.h"
#include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/indexeddb/web_idb_types.h"
namespace blink {
@@ -23,9 +23,9 @@ class BLINK_COMMON_EXPORT IndexedDBKey {
IndexedDBKey(); // Defaults to blink::WebIDBKeyTypeInvalid.
explicit IndexedDBKey(blink::WebIDBKeyType); // must be Null or Invalid
- explicit IndexedDBKey(const KeyArray& array);
- explicit IndexedDBKey(const std::string& binary);
- explicit IndexedDBKey(const base::string16& string);
+ explicit IndexedDBKey(KeyArray array);
+ explicit IndexedDBKey(std::string binary);
+ explicit IndexedDBKey(base::string16 string);
IndexedDBKey(double number,
blink::WebIDBKeyType type); // must be date or number
IndexedDBKey(const IndexedDBKey& other);
diff --git a/chromium/third_party/blink/public/common/indexeddb/indexeddb_key_path.h b/chromium/third_party/blink/public/common/indexeddb/indexeddb_key_path.h
index cce15fd4a1e..e007115e5f5 100644
--- a/chromium/third_party/blink/public/common/indexeddb/indexeddb_key_path.h
+++ b/chromium/third_party/blink/public/common/indexeddb/indexeddb_key_path.h
@@ -10,7 +10,7 @@
#include "base/logging.h"
#include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/indexeddb/web_idb_types.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/indexeddb/indexeddb_key_range.h b/chromium/third_party/blink/public/common/indexeddb/indexeddb_key_range.h
index e78f733d187..4af170f0819 100644
--- a/chromium/third_party/blink/public/common/indexeddb/indexeddb_key_range.h
+++ b/chromium/third_party/blink/public/common/indexeddb/indexeddb_key_range.h
@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXEDDB_KEY_RANGE_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXEDDB_KEY_RANGE_H_
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/indexeddb/indexeddb_key.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/indexeddb/indexeddb_metadata.h b/chromium/third_party/blink/public/common/indexeddb/indexeddb_metadata.h
index c4aa60771f7..3abdadf44ef 100644
--- a/chromium/third_party/blink/public/common/indexeddb/indexeddb_metadata.h
+++ b/chromium/third_party/blink/public/common/indexeddb/indexeddb_metadata.h
@@ -11,7 +11,7 @@
#include <string>
#include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/indexeddb/indexeddb_key_path.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/indexeddb/web_idb_types.h b/chromium/third_party/blink/public/common/indexeddb/web_idb_types.h
index 2728e86e5e6..ff2b2fb53f1 100644
--- a/chromium/third_party/blink/public/common/indexeddb/web_idb_types.h
+++ b/chromium/third_party/blink/public/common/indexeddb/web_idb_types.h
@@ -26,6 +26,8 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_WEB_IDB_TYPES_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_WEB_IDB_TYPES_H_
+#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom-shared.h"
+
namespace blink {
// TODO(cmp): Deprecate these in favor of the blink.mojom.IDB* enum types.
@@ -47,42 +49,12 @@ enum WebIDBKeyPathType {
kWebIDBKeyPathTypeArray,
};
-enum WebIDBDataLoss {
- kWebIDBDataLossNone = 0,
- kWebIDBDataLossTotal,
-};
-
-enum WebIDBCursorDirection {
- kWebIDBCursorDirectionNext = 0,
- kWebIDBCursorDirectionNextNoDuplicate = 1,
- kWebIDBCursorDirectionPrev = 2,
- kWebIDBCursorDirectionPrevNoDuplicate = 3,
-};
-
-enum WebIDBTaskType {
- kWebIDBTaskTypeNormal = 0,
- kWebIDBTaskTypePreemptive,
-};
-
-enum WebIDBPutMode {
- kWebIDBPutModeAddOrUpdate,
- kWebIDBPutModeAddOnly,
- kWebIDBPutModeCursorUpdate,
-};
-
-enum WebIDBOperationType {
- kWebIDBAdd = 0,
- kWebIDBPut,
- kWebIDBDelete,
- kWebIDBClear,
- kWebIDBOperationTypeCount,
-};
-
-enum WebIDBTransactionMode {
- kWebIDBTransactionModeReadOnly = 0,
- kWebIDBTransactionModeReadWrite,
- kWebIDBTransactionModeVersionChange,
-};
+// kIDBOperationTypeCount corresponds to the number of mojom::IDBOperationType
+// enum values that exist. Mojo provides kMaxValue which corresponds to the
+// value of the last item in the enum list. To get the total number, we have
+// to increment the max value by 1.
+static const uint32_t kIDBOperationTypeCount =
+ static_cast<uint32_t>(blink::mojom::IDBOperationType::kMaxValue) + 1;
} // namespace blink
diff --git a/chromium/third_party/blink/public/common/manifest/manifest.h b/chromium/third_party/blink/public/common/manifest/manifest.h
index 079a81dee72..01f78a83974 100644
--- a/chromium/third_party/blink/public/common/manifest/manifest.h
+++ b/chromium/third_party/blink/public/common/manifest/manifest.h
@@ -13,7 +13,7 @@
#include "base/optional.h"
#include "base/strings/nullable_string16.h"
#include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/manifest/web_display_mode.h"
#include "third_party/blink/public/common/screen_orientation/web_screen_orientation_lock_type.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -32,7 +32,8 @@ struct BLINK_COMMON_EXPORT Manifest {
enum class Purpose {
ANY = 0,
BADGE,
- IMAGE_RESOURCE_PURPOSE_LAST = BADGE,
+ MASKABLE,
+ IMAGE_RESOURCE_PURPOSE_LAST = MASKABLE,
};
ImageResource();
@@ -61,6 +62,11 @@ struct BLINK_COMMON_EXPORT Manifest {
std::vector<Purpose> purpose;
};
+ struct BLINK_COMMON_EXPORT ShareTargetFile {
+ base::string16 name;
+ std::vector<base::string16> accept;
+ };
+
// Structure representing a Web Share target's query parameter keys.
struct BLINK_COMMON_EXPORT ShareTargetParams {
ShareTargetParams();
@@ -69,16 +75,34 @@ struct BLINK_COMMON_EXPORT Manifest {
base::NullableString16 title;
base::NullableString16 text;
base::NullableString16 url;
+ std::vector<ShareTargetFile> files;
};
// Structure representing how a Web Share target handles an incoming share.
struct BLINK_COMMON_EXPORT ShareTarget {
+ enum class Method {
+ kGet,
+ kPost,
+ };
+
+ enum class Enctype {
+ kApplication,
+ kMultipart,
+ };
+
ShareTarget();
~ShareTarget();
// The URL used for sharing. Query parameters are added to this comprised of
// keys from |params| and values from the shared data.
GURL action;
+
+ // The HTTP request method for the web share target.
+ Method method;
+
+ // The way that share data is encoded in "POST" request.
+ Enctype enctype;
+
ShareTargetParams params;
};
diff --git a/chromium/third_party/blink/public/common/manifest/manifest.typemap b/chromium/third_party/blink/public/common/manifest/manifest.typemap
index e23fd69b086..3fffe797f43 100644
--- a/chromium/third_party/blink/public/common/manifest/manifest.typemap
+++ b/chromium/third_party/blink/public/common/manifest/manifest.typemap
@@ -5,7 +5,7 @@
mojom = "//third_party/blink/public/mojom/manifest/manifest.mojom"
public_headers = [
"//third_party/blink/public/common/manifest/manifest.h",
- "//third_party/blink/common/common_export.h",
+ "//third_party/blink/public/common/common_export.h",
]
traits_headers =
[ "//third_party/blink/public/common/manifest/manifest_mojom_traits.h" ]
diff --git a/chromium/third_party/blink/public/common/manifest/manifest_mojom_traits.h b/chromium/third_party/blink/public/common/manifest/manifest_mojom_traits.h
index dce58314c94..fb5015512c0 100644
--- a/chromium/third_party/blink/public/common/manifest/manifest_mojom_traits.h
+++ b/chromium/third_party/blink/public/common/manifest/manifest_mojom_traits.h
@@ -8,7 +8,7 @@
#include "third_party/blink/public/common/manifest/manifest.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/manifest/manifest.mojom.h"
namespace mojo {
@@ -167,6 +167,29 @@ struct BLINK_COMMON_EXPORT
template <>
struct BLINK_COMMON_EXPORT
+ StructTraits<blink::mojom::ManifestShareTargetFileDataView,
+ ::blink::Manifest::ShareTargetFile> {
+ static base::StringPiece16 name(
+ const ::blink::Manifest::ShareTargetFile& share_target_file) {
+ return internal::TruncateString16(share_target_file.name);
+ }
+
+ static const std::vector<base::StringPiece16> accept(
+ const ::blink::Manifest::ShareTargetFile& share_target_file) {
+ std::vector<base::StringPiece16> accept_types;
+
+ for (const base::string16& accept_type : share_target_file.accept)
+ accept_types.push_back(internal::TruncateString16(accept_type));
+
+ return accept_types;
+ }
+
+ static bool Read(blink::mojom::ManifestShareTargetFileDataView data,
+ ::blink::Manifest::ShareTargetFile* out);
+};
+
+template <>
+struct BLINK_COMMON_EXPORT
StructTraits<blink::mojom::ManifestShareTargetParamsDataView,
::blink::Manifest::ShareTargetParams> {
static const base::Optional<base::StringPiece16> text(
@@ -181,6 +204,11 @@ struct BLINK_COMMON_EXPORT
const ::blink::Manifest::ShareTargetParams& share_target_params) {
return internal::TruncateNullableString16(share_target_params.url);
}
+ static const std::vector<blink::Manifest::ShareTargetFile>& files(
+ const ::blink::Manifest::ShareTargetParams& share_target_params) {
+ return share_target_params.files;
+ }
+
static bool Read(blink::mojom::ManifestShareTargetParamsDataView data,
::blink::Manifest::ShareTargetParams* out);
};
@@ -193,6 +221,14 @@ struct BLINK_COMMON_EXPORT
const ::blink::Manifest::ShareTarget& share_target) {
return share_target.action;
}
+ static ::blink::Manifest::ShareTarget::Method method(
+ const ::blink::Manifest::ShareTarget& share_target) {
+ return share_target.method;
+ }
+ static ::blink::Manifest::ShareTarget::Enctype enctype(
+ const ::blink::Manifest::ShareTarget& share_target) {
+ return share_target.enctype;
+ }
static const ::blink::Manifest::ShareTargetParams& params(
const ::blink::Manifest::ShareTarget& share_target) {
return share_target.params;
@@ -212,6 +248,8 @@ struct BLINK_COMMON_EXPORT
return blink::mojom::ManifestImageResource_Purpose::ANY;
case ::blink::Manifest::ImageResource::Purpose::BADGE:
return blink::mojom::ManifestImageResource_Purpose::BADGE;
+ case ::blink::Manifest::ImageResource::Purpose::MASKABLE:
+ return blink::mojom::ManifestImageResource_Purpose::MASKABLE;
}
NOTREACHED();
return blink::mojom::ManifestImageResource_Purpose::ANY;
@@ -225,6 +263,67 @@ struct BLINK_COMMON_EXPORT
case blink::mojom::ManifestImageResource_Purpose::BADGE:
*out = ::blink::Manifest::ImageResource::Purpose::BADGE;
return true;
+ case blink::mojom::ManifestImageResource_Purpose::MASKABLE:
+ *out = ::blink::Manifest::ImageResource::Purpose::MASKABLE;
+ return true;
+ }
+
+ return false;
+ }
+};
+
+template <>
+struct BLINK_COMMON_EXPORT EnumTraits<blink::mojom::ManifestShareTarget_Method,
+ ::blink::Manifest::ShareTarget::Method> {
+ static blink::mojom::ManifestShareTarget_Method ToMojom(
+ ::blink::Manifest::ShareTarget::Method method) {
+ switch (method) {
+ case ::blink::Manifest::ShareTarget::Method::kGet:
+ return blink::mojom::ManifestShareTarget_Method::kGet;
+ case ::blink::Manifest::ShareTarget::Method::kPost:
+ return blink::mojom::ManifestShareTarget_Method::kPost;
+ }
+ NOTREACHED();
+ return blink::mojom::ManifestShareTarget_Method::kGet;
+ }
+ static bool FromMojom(blink::mojom::ManifestShareTarget_Method input,
+ ::blink::Manifest::ShareTarget::Method* out) {
+ switch (input) {
+ case blink::mojom::ManifestShareTarget_Method::kGet:
+ *out = ::blink::Manifest::ShareTarget::Method::kGet;
+ return true;
+ case blink::mojom::ManifestShareTarget_Method::kPost:
+ *out = ::blink::Manifest::ShareTarget::Method::kPost;
+ return true;
+ }
+
+ return false;
+ }
+};
+
+template <>
+struct BLINK_COMMON_EXPORT EnumTraits<blink::mojom::ManifestShareTarget_Enctype,
+ ::blink::Manifest::ShareTarget::Enctype> {
+ static blink::mojom::ManifestShareTarget_Enctype ToMojom(
+ ::blink::Manifest::ShareTarget::Enctype enctype) {
+ switch (enctype) {
+ case ::blink::Manifest::ShareTarget::Enctype::kApplication:
+ return blink::mojom::ManifestShareTarget_Enctype::kApplication;
+ case ::blink::Manifest::ShareTarget::Enctype::kMultipart:
+ return blink::mojom::ManifestShareTarget_Enctype::kMultipart;
+ }
+ NOTREACHED();
+ return blink::mojom::ManifestShareTarget_Enctype::kApplication;
+ }
+ static bool FromMojom(blink::mojom::ManifestShareTarget_Enctype input,
+ ::blink::Manifest::ShareTarget::Enctype* out) {
+ switch (input) {
+ case blink::mojom::ManifestShareTarget_Enctype::kApplication:
+ *out = ::blink::Manifest::ShareTarget::Enctype::kApplication;
+ return true;
+ case blink::mojom::ManifestShareTarget_Enctype::kMultipart:
+ *out = ::blink::Manifest::ShareTarget::Enctype::kMultipart;
+ return true;
}
return false;
diff --git a/chromium/third_party/blink/public/common/messaging/cloneable_message.h b/chromium/third_party/blink/public/common/messaging/cloneable_message.h
index 81f93d301f7..c1bac3bac04 100644
--- a/chromium/third_party/blink/public/common/messaging/cloneable_message.h
+++ b/chromium/third_party/blink/public/common/messaging/cloneable_message.h
@@ -12,7 +12,7 @@
#include "base/optional.h"
#include "base/unguessable_token.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/blob/serialized_blob.mojom.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/messaging/cloneable_message_struct_traits.h b/chromium/third_party/blink/public/common/messaging/cloneable_message_struct_traits.h
new file mode 100644
index 00000000000..d1bb17878d5
--- /dev/null
+++ b/chromium/third_party/blink/public/common/messaging/cloneable_message_struct_traits.h
@@ -0,0 +1,52 @@
+// 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_COMMON_MESSAGING_CLONEABLE_MESSAGE_STRUCT_TRAITS_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_MESSAGING_CLONEABLE_MESSAGE_STRUCT_TRAITS_H_
+
+#include "mojo/public/cpp/base/big_buffer.h"
+#include "mojo/public/cpp/base/unguessable_token_mojom_traits.h"
+#include "third_party/blink/public/common/messaging/cloneable_message.h"
+#include "third_party/blink/public/mojom/messaging/cloneable_message.mojom.h"
+
+namespace mojo {
+
+template <>
+struct BLINK_COMMON_EXPORT
+ StructTraits<blink::mojom::CloneableMessage::DataView,
+ blink::CloneableMessage> {
+ static mojo_base::BigBufferView encoded_message(
+ blink::CloneableMessage& input);
+
+ static std::vector<blink::mojom::SerializedBlobPtr>& blobs(
+ blink::CloneableMessage& input) {
+ return input.blobs;
+ }
+
+ static uint64_t stack_trace_id(const blink::CloneableMessage& input) {
+ return input.stack_trace_id;
+ }
+
+ static int64_t stack_trace_debugger_id_first(
+ const blink::CloneableMessage& input) {
+ return input.stack_trace_debugger_id_first;
+ }
+
+ static int64_t stack_trace_debugger_id_second(
+ const blink::CloneableMessage& input) {
+ return input.stack_trace_debugger_id_second;
+ }
+
+ static const base::Optional<base::UnguessableToken>& locked_agent_cluster_id(
+ const blink::CloneableMessage& input) {
+ return input.locked_agent_cluster_id;
+ }
+
+ static bool Read(blink::mojom::CloneableMessage::DataView data,
+ blink::CloneableMessage* out);
+};
+
+} // namespace mojo
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_MESSAGING_CLONEABLE_MESSAGE_STRUCT_TRAITS_H_
diff --git a/chromium/third_party/blink/public/common/messaging/message_port_channel.h b/chromium/third_party/blink/public/common/messaging/message_port_channel.h
index 4a09ab3f485..de0900f982f 100644
--- a/chromium/third_party/blink/public/common/messaging/message_port_channel.h
+++ b/chromium/third_party/blink/public/common/messaging/message_port_channel.h
@@ -11,7 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "mojo/public/cpp/system/message_pipe.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/messaging/string_message_codec.h b/chromium/third_party/blink/public/common/messaging/string_message_codec.h
index b052d5e8218..cea9d363566 100644
--- a/chromium/third_party/blink/public/common/messaging/string_message_codec.h
+++ b/chromium/third_party/blink/public/common/messaging/string_message_codec.h
@@ -6,8 +6,9 @@
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_MESSAGING_STRING_MESSAGE_CODEC_H_
#include <vector>
+#include "base/containers/span.h"
#include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
@@ -25,7 +26,7 @@ BLINK_COMMON_EXPORT std::vector<uint8_t> EncodeStringMessage(
const base::string16& data);
BLINK_COMMON_EXPORT bool DecodeStringMessage(
- const std::vector<uint8_t>& encoded_data,
+ base::span<const uint8_t> encoded_data,
base::string16* result);
} // namespace blink
diff --git a/chromium/third_party/blink/public/common/messaging/transferable_message.h b/chromium/third_party/blink/public/common/messaging/transferable_message.h
index 6b61c13233d..e58a41ae4ef 100644
--- a/chromium/third_party/blink/public/common/messaging/transferable_message.h
+++ b/chromium/third_party/blink/public/common/messaging/transferable_message.h
@@ -9,7 +9,7 @@
#include "base/containers/span.h"
#include "base/macros.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/messaging/cloneable_message.h"
#include "third_party/blink/public/common/messaging/message_port_channel.h"
#include "third_party/blink/public/mojom/array_buffer/array_buffer_contents.mojom.h"
@@ -28,6 +28,8 @@ struct BLINK_COMMON_EXPORT TransferableMessage : public CloneableMessage {
// Any ports being transferred as part of this message.
std::vector<MessagePortChannel> ports;
+ // Channels used by transferred WHATWG streams (eg. ReadableStream).
+ std::vector<MessagePortChannel> stream_channels;
// The contents of any ArrayBuffers being transferred as part of this message.
std::vector<mojom::SerializedArrayBufferContentsPtr>
array_buffer_contents_array;
diff --git a/chromium/third_party/blink/public/common/messaging/transferable_message_struct_traits.h b/chromium/third_party/blink/public/common/messaging/transferable_message_struct_traits.h
new file mode 100644
index 00000000000..a6ad220d377
--- /dev/null
+++ b/chromium/third_party/blink/public/common/messaging/transferable_message_struct_traits.h
@@ -0,0 +1,59 @@
+// 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_COMMON_MESSAGING_TRANSFERABLE_MESSAGE_STRUCT_TRAITS_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_MESSAGING_TRANSFERABLE_MESSAGE_STRUCT_TRAITS_H_
+
+#include "skia/public/interfaces/bitmap_skbitmap_struct_traits.h"
+#include "third_party/blink/public/common/messaging/cloneable_message_struct_traits.h"
+#include "third_party/blink/public/common/messaging/transferable_message.h"
+#include "third_party/blink/public/mojom/messaging/transferable_message.mojom.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+
+namespace mojo {
+
+template <>
+struct BLINK_COMMON_EXPORT
+ StructTraits<blink::mojom::TransferableMessage::DataView,
+ blink::TransferableMessage> {
+ static blink::CloneableMessage& message(blink::TransferableMessage& input) {
+ return input;
+ }
+
+ static std::vector<mojo::ScopedMessagePipeHandle> ports(
+ blink::TransferableMessage& input) {
+ return blink::MessagePortChannel::ReleaseHandles(input.ports);
+ }
+
+ static std::vector<mojo::ScopedMessagePipeHandle> stream_channels(
+ blink::TransferableMessage& input) {
+ return blink::MessagePortChannel::ReleaseHandles(input.stream_channels);
+ }
+
+ static std::vector<blink::mojom::SerializedArrayBufferContentsPtr>
+ array_buffer_contents_array(blink::TransferableMessage& input) {
+ return std::move(input.array_buffer_contents_array);
+ }
+
+ static const std::vector<SkBitmap>& image_bitmap_contents_array(
+ blink::TransferableMessage& input) {
+ return input.image_bitmap_contents_array;
+ }
+
+ static bool has_user_gesture(blink::TransferableMessage& input) {
+ return input.has_user_gesture;
+ }
+
+ static const blink::mojom::UserActivationSnapshotPtr& user_activation(
+ blink::TransferableMessage& input) {
+ return input.user_activation;
+ }
+
+ static bool Read(blink::mojom::TransferableMessage::DataView data,
+ blink::TransferableMessage* out);
+};
+
+} // namespace mojo
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_MESSAGING_TRANSFERABLE_MESSAGE_STRUCT_TRAITS_H_
diff --git a/chromium/third_party/blink/public/common/mime_util/mime_util.h b/chromium/third_party/blink/public/common/mime_util/mime_util.h
index c8bbca6604b..814f5c46a29 100644
--- a/chromium/third_party/blink/public/common/mime_util/mime_util.h
+++ b/chromium/third_party/blink/public/common/mime_util/mime_util.h
@@ -6,7 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_MIME_UTIL_MIME_UTIL_H_
#include <string>
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/notifications/notification_resources.h b/chromium/third_party/blink/public/common/notifications/notification_resources.h
index 6f6b71bba9f..3494f5c47b7 100644
--- a/chromium/third_party/blink/public/common/notifications/notification_resources.h
+++ b/chromium/third_party/blink/public/common/notifications/notification_resources.h
@@ -7,7 +7,7 @@
#include <vector>
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/skia/include/core/SkBitmap.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/notifications/notification_struct_traits.h b/chromium/third_party/blink/public/common/notifications/notification_struct_traits.h
index d642c87ac01..142e67cffe4 100644
--- a/chromium/third_party/blink/public/common/notifications/notification_struct_traits.h
+++ b/chromium/third_party/blink/public/common/notifications/notification_struct_traits.h
@@ -10,7 +10,7 @@
#include "mojo/public/cpp/base/string16_mojom_traits.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "skia/public/interfaces/bitmap_skbitmap_struct_traits.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/notifications/platform_notification_data.h"
#include "third_party/blink/public/mojom/notifications/notification.mojom.h"
#include "url/gurl.h"
diff --git a/chromium/third_party/blink/public/common/notifications/platform_notification_data.h b/chromium/third_party/blink/public/common/notifications/platform_notification_data.h
index c6131b27a4b..06727e6fc08 100644
--- a/chromium/third_party/blink/public/common/notifications/platform_notification_data.h
+++ b/chromium/third_party/blink/public/common/notifications/platform_notification_data.h
@@ -11,7 +11,7 @@
#include "base/strings/nullable_string16.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "url/gurl.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/origin_policy/origin_policy.h b/chromium/third_party/blink/public/common/origin_policy/origin_policy.h
index 48c39f4a808..5c4583fb10e 100644
--- a/chromium/third_party/blink/public/common/origin_policy/origin_policy.h
+++ b/chromium/third_party/blink/public/common/origin_policy/origin_policy.h
@@ -9,7 +9,7 @@
#include <string>
#include "base/strings/string_piece.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
@@ -28,12 +28,17 @@ class BLINK_COMMON_EXPORT OriginPolicy {
};
const std::vector<CSP>& GetContentSecurityPolicies() const { return csp_; }
+ const std::vector<std::string>& GetFeaturePolicies() const {
+ return features_;
+ }
+
private:
friend class OriginPolicyParser;
OriginPolicy();
std::vector<CSP> csp_;
+ std::vector<std::string> features_;
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/common/origin_trials/trial_token.h b/chromium/third_party/blink/public/common/origin_trials/trial_token.h
index 154e56dbba3..68d65468348 100644
--- a/chromium/third_party/blink/public/common/origin_trials/trial_token.h
+++ b/chromium/third_party/blink/public/common/origin_trials/trial_token.h
@@ -10,7 +10,7 @@
#include "base/strings/string_piece.h"
#include "base/time/time.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "url/origin.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
diff --git a/chromium/third_party/blink/public/common/origin_trials/trial_token_validator.h b/chromium/third_party/blink/public/common/origin_trials/trial_token_validator.h
index 6a7b164ef2e..188ce4de051 100644
--- a/chromium/third_party/blink/public/common/origin_trials/trial_token_validator.h
+++ b/chromium/third_party/blink/public/common/origin_trials/trial_token_validator.h
@@ -12,7 +12,7 @@
#include "base/callback.h"
#include "base/strings/string_piece.h"
#include "base/time/time.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "url/origin.h"
namespace net {
diff --git a/chromium/third_party/blink/public/common/page/launching_process_state.h b/chromium/third_party/blink/public/common/page/launching_process_state.h
index 52e46cc0736..0b07d18e9ad 100644
--- a/chromium/third_party/blink/public/common/page/launching_process_state.h
+++ b/chromium/third_party/blink/public/common/page/launching_process_state.h
@@ -6,7 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_PAGE_LAUNCHING_PROCESS_STATE_H_
#include "build/build_config.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/privacy_preferences.h b/chromium/third_party/blink/public/common/privacy_preferences.h
index 15df81e4949..efcaddee50e 100644
--- a/chromium/third_party/blink/public/common/privacy_preferences.h
+++ b/chromium/third_party/blink/public/common/privacy_preferences.h
@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_PRIVACY_PREFERENCES_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_PRIVACY_PREFERENCES_H_
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/sandbox_support/sandbox_support_mac.h b/chromium/third_party/blink/public/common/sandbox_support/sandbox_support_mac.h
new file mode 100644
index 00000000000..9123ccef117
--- /dev/null
+++ b/chromium/third_party/blink/public/common/sandbox_support/sandbox_support_mac.h
@@ -0,0 +1,43 @@
+// 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_COMMON_SANDBOX_SUPPORT_SANDBOX_SUPPORT_MAC_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_SANDBOX_SUPPORT_SANDBOX_SUPPORT_MAC_H_
+
+namespace blink {
+
+// Named Mac system colors. Each of these corresponds to a selector on
+// NSColor.
+enum class MacSystemColorID {
+ kAlternateSelectedControl,
+ kControlBackground,
+ kControlDarkShadow,
+ kControlHighlight,
+ kControlLightHighlight,
+ kControlShadow,
+ kControlText,
+ kDisabledControlText,
+ kHeader,
+ kHighlight,
+ kKeyboardFocusIndicator,
+ kMenuBackground,
+ kScrollBar,
+ kSecondarySelectedControl,
+ kSelectedMenuItemText,
+ kSelectedText,
+ kSelectedTextBackground,
+ kShadow,
+ kText,
+ kWindowBackground,
+ kWindowFrame,
+ kWindowFrameText,
+ kCount,
+};
+
+constexpr size_t kMacSystemColorIDCount =
+ static_cast<size_t>(MacSystemColorID::kCount);
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_SANDBOX_SUPPORT_SANDBOX_SUPPORT_MAC_H_
diff --git a/chromium/third_party/blink/public/common/screen_orientation/OWNERS b/chromium/third_party/blink/public/common/screen_orientation/OWNERS
index 3dc1051593d..107f97c491c 100644
--- a/chromium/third_party/blink/public/common/screen_orientation/OWNERS
+++ b/chromium/third_party/blink/public/common/screen_orientation/OWNERS
@@ -3,7 +3,7 @@ mlamouri@chromium.org
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
-per-file *enum_traits*.*=set noparent
-per-file *enum_traits*.*=file://ipc/SECURITY_OWNERS
+per-file *_mojom_traits*.*=set noparent
+per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
# COMPONENT: Blink>ScreenOrientation
diff --git a/chromium/third_party/blink/public/common/screen_orientation/screen_orientation_lock_types.typemap b/chromium/third_party/blink/public/common/screen_orientation/screen_orientation_lock_types.typemap
index 27e516c2278..a262ea5fc6c 100644
--- a/chromium/third_party/blink/public/common/screen_orientation/screen_orientation_lock_types.typemap
+++ b/chromium/third_party/blink/public/common/screen_orientation/screen_orientation_lock_types.typemap
@@ -4,5 +4,5 @@
mojom = "//services/device/public/mojom/screen_orientation_lock_types.mojom"
public_headers = [ "//third_party/blink/public/common/screen_orientation/web_screen_orientation_lock_type.h" ]
-traits_headers = [ "//third_party/blink/public/common/screen_orientation/web_screen_orientation_enum_traits.h" ]
+traits_headers = [ "//third_party/blink/public/common/screen_orientation/web_screen_orientation_mojom_traits.h" ]
type_mappings = [ "device.mojom.ScreenOrientationLockType=::blink::WebScreenOrientationLockType" ]
diff --git a/chromium/third_party/blink/public/common/screen_orientation/web_screen_orientation_enum_traits.h b/chromium/third_party/blink/public/common/screen_orientation/web_screen_orientation_mojom_traits.h
index 0f58d67cde4..05d523feff5 100644
--- a/chromium/third_party/blink/public/common/screen_orientation/web_screen_orientation_enum_traits.h
+++ b/chromium/third_party/blink/public/common/screen_orientation/web_screen_orientation_mojom_traits.h
@@ -2,8 +2,8 @@
// 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_COMMON_SCREEN_ORIENTATION_WEB_SCREEN_ORIENTATION_ENUM_TRAITS_H_
-#define THIRD_PARTY_BLINK_PUBLIC_COMMON_SCREEN_ORIENTATION_WEB_SCREEN_ORIENTATION_ENUM_TRAITS_H_
+#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_SCREEN_ORIENTATION_WEB_SCREEN_ORIENTATION_MOJOM_TRAITS_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_SCREEN_ORIENTATION_WEB_SCREEN_ORIENTATION_MOJOM_TRAITS_H_
#include "services/device/public/mojom/screen_orientation_lock_types.mojom-shared.h"
#include "third_party/blink/public/common/screen_orientation/web_screen_orientation_lock_type.h"
@@ -77,4 +77,4 @@ struct EnumTraits<::device::mojom::ScreenOrientationLockType,
} // namespace mojo
-#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_SCREEN_ORIENTATION_WEB_SCREEN_ORIENTATION_ENUM_TRAITS_H_
+#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_SCREEN_ORIENTATION_WEB_SCREEN_ORIENTATION_MOJOM_TRAITS_H_
diff --git a/chromium/third_party/blink/public/common/service_worker/service_worker_status_code.h b/chromium/third_party/blink/public/common/service_worker/service_worker_status_code.h
index 31baf1c1a6b..04143137bbf 100644
--- a/chromium/third_party/blink/public/common/service_worker/service_worker_status_code.h
+++ b/chromium/third_party/blink/public/common/service_worker/service_worker_status_code.h
@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/common/service_worker/service_worker_type_converters.h b/chromium/third_party/blink/public/common/service_worker/service_worker_type_converters.h
index cb3f431b57d..a316bdd5993 100644
--- a/chromium/third_party/blink/public/common/service_worker/service_worker_type_converters.h
+++ b/chromium/third_party/blink/public/common/service_worker/service_worker_type_converters.h
@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom.h"
diff --git a/chromium/third_party/blink/public/common/service_worker/service_worker_utils.h b/chromium/third_party/blink/public/common/service_worker/service_worker_utils.h
index 2acc4338bf7..00e5cc1a4d5 100644
--- a/chromium/third_party/blink/public/common/service_worker/service_worker_utils.h
+++ b/chromium/third_party/blink/public/common/service_worker/service_worker_utils.h
@@ -5,7 +5,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
namespace blink {
diff --git a/chromium/third_party/blink/public/mojom/BUILD.gn b/chromium/third_party/blink/public/mojom/BUILD.gn
index 3a669053aa1..65335492728 100644
--- a/chromium/third_party/blink/public/mojom/BUILD.gn
+++ b/chromium/third_party/blink/public/mojom/BUILD.gn
@@ -5,8 +5,8 @@
import("//mojo/public/tools/bindings/mojom.gni")
# This target includes all mojom interfaces which can be used from
-# Source/platform. In particular these mojom interfaces can't use types that
-# are typemapped to a type in Source/core.
+# renderer/platform. In particular these mojom interfaces can't use types that
+# are typemapped to a type in renderer/core.
mojom("mojom_platform") {
sources = [
"array_buffer/array_buffer_contents.mojom",
@@ -31,7 +31,6 @@ mojom("mojom_platform") {
"filesystem/file_writer.mojom",
"frame/find_in_page.mojom",
"frame/navigation_initiator.mojom",
- "indexeddb/indexeddb.mojom",
"leak_detector/leak_detector.mojom",
"loader/code_cache.mojom",
"loader/navigation_predictor.mojom",
@@ -49,6 +48,8 @@ mojom("mojom_platform") {
"presentation/presentation.mojom",
"quota/quota_dispatcher_host.mojom",
"quota/quota_types.mojom",
+ "referrer.mojom",
+ "script/script_type.mojom",
"service_worker/dispatch_fetch_event_params.mojom",
"service_worker/navigation_preload_state.mojom",
"service_worker/service_worker_client.mojom",
@@ -60,13 +61,12 @@ mojom("mojom_platform") {
"service_worker/service_worker_state.mojom",
"service_worker/service_worker_stream_handle.mojom",
"shared_worker/shared_worker_creation_context_type.mojom",
- "shared_worker/shared_worker_main_script_load_params.mojom",
+ "shared_worker/worker_main_script_load_params.mojom",
"speech/speech_recognition_error.mojom",
"speech/speech_recognition_grammar.mojom",
"speech/speech_recognition_result.mojom",
"speech/speech_recognizer.mojom",
"use_counter/css_property_id.mojom",
- "web_package/web_package_internals.mojom",
"webaudio/audio_context_manager.mojom",
]
@@ -78,10 +78,6 @@ mojom("mojom_platform") {
"//mojo/public/mojom/base",
"//services/device/public/mojom",
"//services/network/public/mojom",
-
- # TODO(https://crbug.com/822804): Remove when mojom bindings deps checks
- # get fixed.
- "//services/network/public/mojom:data_pipe_interfaces",
"//skia/public/interfaces",
"//third_party/blink/public/mojom/usb",
"//ui/gfx/geometry/mojo",
@@ -91,7 +87,7 @@ mojom("mojom_platform") {
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
- export_header = "third_party/blink/common/common_export.h"
+ export_header = "third_party/blink/public/common/common_export.h"
export_class_attribute_blink = "PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
@@ -111,7 +107,7 @@ mojom("android_mojo_bindings") {
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
- export_header = "third_party/blink/common/common_export.h"
+ export_header = "third_party/blink/public/common/common_export.h"
export_class_attribute_blink = "PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
@@ -127,8 +123,8 @@ mojom("speech_recognition_error_code") {
}
# This target can include mojom interfaces which do use types that are
-# typemapped to a type in Source/core. This also means these interfaces are not
-# available from Source/platform.
+# typemapped to a type in renderer/core. This also means these interfaces are
+# not available from renderer/platform.
# Note that service_worker_object.mojom and service_worker.mojom depend
# on transferable_message.mojom, and service_worker_registration.mojom depends
# on service_worker_object.mojom, so we put these three service worker
@@ -159,9 +155,44 @@ mojom("mojom_core") {
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
- export_header = "third_party/blink/common/common_export.h"
+ export_header = "third_party/blink/public/common/common_export.h"
export_class_attribute_blink = "CORE_EXPORT"
export_define_blink = "BLINK_CORE_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/core/core_export.h"
}
+
+# This target can include mojom interfaces which use types that are typemapped
+# to a type in renderer/modules. This also means these interfaces are not
+# available from renderer/platform or renderer/core.
+mojom("mojom_modules") {
+ sources = [
+ "indexeddb/indexeddb.mojom",
+ ]
+
+ public_deps = [
+ ":mojom_core",
+
+ # TODO(https://crbug.com/822804): Remove when mojom bindings deps checks
+ # get fixed.
+ ":mojom_platform",
+ "//mojo/public/mojom/base",
+ "//skia/public/interfaces",
+ "//url/mojom:url_mojom_gurl",
+ "//url/mojom:url_mojom_origin",
+ ]
+
+ overridden_deps_blink = [
+ ":mojom_core",
+ ":mojom_platform",
+ ]
+ component_deps_blink = [ "//third_party/blink/renderer/core" ]
+
+ export_class_attribute = "BLINK_COMMON_EXPORT"
+ export_define = "BLINK_COMMON_IMPLEMENTATION=1"
+ export_header = "third_party/blink/public/common/common_export.h"
+
+ export_class_attribute_blink = "MODULES_EXPORT"
+ export_define_blink = "BLINK_MODULES_IMPLEMENTATION=1"
+ export_header_blink = "third_party/blink/renderer/modules/modules_export.h"
+}
diff --git a/chromium/third_party/blink/public/mojom/choosers/file_chooser.mojom b/chromium/third_party/blink/public/mojom/choosers/file_chooser.mojom
index f4ef09c9e08..c37feac51b4 100644
--- a/chromium/third_party/blink/public/mojom/choosers/file_chooser.mojom
+++ b/chromium/third_party/blink/public/mojom/choosers/file_chooser.mojom
@@ -86,5 +86,28 @@ union FileChooserFileInfo {
FileSystemFileInfo file_system;
};
-// TODO(tkent): Add FileChooserFactory, FileChooser, and FileChooseClient.
-// crbug.com/869257
+// Represents the result of FileChooser::OpenFileChooser() or
+// EnumerateChosenDirectory().
+struct FileChooserResult {
+ // Selected files.
+ array<FileChooserFileInfo> files;
+
+ // Requested base directory.
+ // This is a user-chosen path in a case of OpenFileChooser() with
+ // mode=kUploadFolder.
+ // This is |directory_path| in a case of EnumerateChosenDirectory().
+ // Otherwise, it's an empty FilePath.
+ mojo_base.mojom.FilePath base_directory;
+};
+
+// An interface to receive file chooser requests.
+interface FileChooser {
+ // Ask a user to choose files interactively. Null |result| is returned if the
+ // user canceled a dialog, or the request is not accepted.
+ OpenFileChooser(FileChooserParams params) => (FileChooserResult? result);
+
+ // Ask to enumerate files which are descendants of the specified directory.
+ // Null |result| is returned if the enumeration request is not accepted.
+ EnumerateChosenDirectory(mojo_base.mojom.FilePath directory_path)
+ => (FileChooserResult? result);
+};
diff --git a/chromium/third_party/blink/public/mojom/feature_policy/feature_policy.mojom b/chromium/third_party/blink/public/mojom/feature_policy/feature_policy.mojom
index 96d2e2ad46f..63d4b44c4e4 100644
--- a/chromium/third_party/blink/public/mojom/feature_policy/feature_policy.mojom
+++ b/chromium/third_party/blink/public/mojom/feature_policy/feature_policy.mojom
@@ -83,11 +83,10 @@ enum FeaturePolicyFeature {
// Controls which image formats are allowed to be used in the document.
kLegacyImageFormats = 22,
// When disallowed, requires images to have a reasonable byte-to-pixel ratio.
- kImageCompression = 23,
- kAnimations = 24,
+ kUnoptimizedImages = 23,
// When disallowed, restricts source image size to be no more 2x larger than
// the image's containing block.
- kMaxDownscalingImage = 25,
+ kOversizedImages = 25,
// Controls access to Picture-in-Picture.
kPictureInPicture = 26,
// Controls the ability to block and interfere with vertical scrolling.
@@ -98,12 +97,21 @@ enum FeaturePolicyFeature {
kDocumentWrite = 28,
// Used to enforce lazyloading for a frame and any nested <iframe> or image.
kLazyLoad = 29,
+ // Restricts the usage of layout-causing animations in a document.
+ kLayoutAnimations = 30,
// Don't change assigned numbers of any item, and don't reuse removed slots.
// Also, run update_feature_policy_enum.py in
// chromium/src/tools/metrics/histograms/ to update the UMA mapping.
};
+// This enum is used to distinguish between report-only directives and enforcing
+// directives.
+enum FeaturePolicyDisposition {
+ kEnforce,
+ kReport,
+};
+
// This struct holds feature policy allowlist data that needs to be replicated
// between a RenderFrame and any of its associated RenderFrameProxies. A list of
// these form a ParsedFeaturePolicy.
@@ -111,5 +119,6 @@ enum FeaturePolicyFeature {
struct ParsedFeaturePolicyDeclaration {
FeaturePolicyFeature feature;
bool matches_all_origins;
+ FeaturePolicyDisposition disposition;
array<url.mojom.Origin> origins;
};
diff --git a/chromium/third_party/blink/public/mojom/indexeddb/indexeddb.mojom b/chromium/third_party/blink/public/mojom/indexeddb/indexeddb.mojom
index 8de66ed3dd2..024a53d6eda 100644
--- a/chromium/third_party/blink/public/mojom/indexeddb/indexeddb.mojom
+++ b/chromium/third_party/blink/public/mojom/indexeddb/indexeddb.mojom
@@ -131,6 +131,11 @@ struct IDBDatabaseMetadata {
array<IDBObjectStoreMetadata> object_stores;
};
+struct IDBNameAndVersion {
+ mojo_base.mojom.String16 name;
+ int64 version;
+};
+
struct IDBIndexKeys {
int64 index_id;
array<IDBKey> index_keys;
@@ -151,7 +156,7 @@ struct IDBBlobInfo {
};
struct IDBValue {
- string bits;
+ array<uint8> bits;
array<IDBBlobInfo> blob_or_file_info;
};
@@ -188,6 +193,9 @@ struct IDBObserverChanges {
interface IDBCallbacks {
Error(int32 code, mojo_base.mojom.String16 message);
+ // Factory::GetDatabaseInfo
+ SuccessNamesAndVersionsList(array<IDBNameAndVersion> value);
+
// Factory::GetDatabaseNames
SuccessStringList(array<mojo_base.mojom.String16> value);
@@ -277,7 +285,7 @@ interface IDBDatabase {
bool include_transaction,
bool no_records,
bool values,
- uint16 operation_types);
+ uint32 operation_types);
RemoveObservers(array<int32> observers);
Get(int64 transaction_id,
int64 object_store_id,
@@ -345,6 +353,7 @@ interface IDBDatabase {
};
interface IDBFactory {
+ GetDatabaseInfo(associated IDBCallbacks callbacks, url.mojom.Origin origin);
GetDatabaseNames(associated IDBCallbacks callbacks, url.mojom.Origin origin);
Open(associated IDBCallbacks callbacks,
associated IDBDatabaseCallbacks database_callbacks,
diff --git a/chromium/third_party/blink/public/mojom/loader/previews_resource_loading_hints.mojom b/chromium/third_party/blink/public/mojom/loader/previews_resource_loading_hints.mojom
index ef7f815b8c3..728e4c500b7 100644
--- a/chromium/third_party/blink/public/mojom/loader/previews_resource_loading_hints.mojom
+++ b/chromium/third_party/blink/public/mojom/loader/previews_resource_loading_hints.mojom
@@ -9,6 +9,9 @@ module blink.mojom;
// hints are provided to the renderer and aid in optimizing the loading of
// resources.
struct PreviewsResourceLoadingHints {
+ // SourceId to use when recording UKM for the resource loading hints. This
+ // is based on the browser NavigationHandle's navigation id.
+ int64 ukm_source_id;
// List of subresources to block. The list contains the URL patterns of
// subresources to block.
// TODO(tbansal): https://crbug.com/856243. Update the mojom message below
diff --git a/chromium/third_party/blink/public/mojom/manifest/manifest.mojom b/chromium/third_party/blink/public/mojom/manifest/manifest.mojom
index 74f2afb9bd7..4818501cb7e 100644
--- a/chromium/third_party/blink/public/mojom/manifest/manifest.mojom
+++ b/chromium/third_party/blink/public/mojom/manifest/manifest.mojom
@@ -63,6 +63,7 @@ struct ManifestImageResource {
enum Purpose {
ANY = 0,
BADGE,
+ MASKABLE,
};
// MUST be a valid url. If an icon doesn't have a valid URL, it will not be
@@ -82,6 +83,14 @@ struct ManifestImageResource {
array<Purpose> purpose;
};
+// Structure representing a share target file.
+struct ManifestShareTargetFile {
+ mojo_base.mojom.String16? name;
+
+ // A sequence of accepted MIME types.
+ array<mojo_base.mojom.String16> accept;
+};
+
// Structure representing a related application.
struct ManifestRelatedApplication {
// The platform on which the application can be found. This can be any
@@ -105,12 +114,39 @@ struct ManifestShareTargetParams {
mojo_base.mojom.String16? title;
mojo_base.mojom.String16? text;
mojo_base.mojom.String16? url;
+
+ // An array of share target files, which is represented by two members:
+ // name and accept.
+ array<ManifestShareTargetFile>? files;
};
// Structure representing how a Web Share target handles an incoming share.
struct ManifestShareTarget {
+ // This enum corresponds to HTTP methods, where kGet corresponds to GET
+ // and kPost corresponds to POST.
+ enum Method {
+ kGet,
+ kPost,
+ };
+
+ // This enum corresponds to HTTP enctype, where kApplication corresponds
+ // to application/x-www-url-encoded and kMultipart corresponds to
+ // multipart/form-data.
+ enum Enctype {
+ kApplication,
+ kMultipart,
+ };
+
// The URL that will be opened when the share target is invoked.
url.mojom.Url action;
+
+ // The method that specifies the HTTP request method for web share target.
+ Method method;
+
+ // The enctype that specifies how share data is encoded in a POST request.
+ // It is ignored when method is "GET".
+ Enctype enctype;
+
ManifestShareTargetParams params;
};
diff --git a/chromium/third_party/blink/public/mojom/messaging/transferable_message.mojom b/chromium/third_party/blink/public/mojom/messaging/transferable_message.mojom
index f660019a1f9..e382d4e6d05 100644
--- a/chromium/third_party/blink/public/mojom/messaging/transferable_message.mojom
+++ b/chromium/third_party/blink/public/mojom/messaging/transferable_message.mojom
@@ -24,6 +24,8 @@ struct TransferableMessage {
CloneableMessage message;
// Any ports being transferred as part of this message.
array<handle<message_pipe>> ports;
+ // Channels used to transfer WHATWG streams (eg. ReadableStream).
+ array<handle<message_pipe>> stream_channels;
// Any ArrayBuffers being transferred as part of this message.
array<SerializedArrayBufferContents> array_buffer_contents_array;
// Any ImageBitmaps being transferred as part of this message.
diff --git a/chromium/third_party/blink/public/mojom/payments/payment_app.mojom b/chromium/third_party/blink/public/mojom/payments/payment_app.mojom
index df97086bb11..49c95cf2ece 100644
--- a/chromium/third_party/blink/public/mojom/payments/payment_app.mojom
+++ b/chromium/third_party/blink/public/mojom/payments/payment_app.mojom
@@ -12,7 +12,6 @@ import "url/mojom/url.mojom";
enum PaymentHandlerStatus {
SUCCESS,
- NOT_IMPLEMENTED,
NOT_FOUND,
NO_ACTIVE_WORKER,
STORAGE_OPERATION_FAILED,
@@ -89,10 +88,7 @@ struct PaymentHandlerResponse {
// This interface is provided to pass a payment handler response from payment
// request event in renderer side to browser side by calling respondWith().
interface PaymentHandlerResponseCallback {
- OnResponseForAbortPayment(bool payment_aborted,
- mojo_base.mojom.TimeTicks dispatch_event_time);
- OnResponseForCanMakePayment(bool can_make_payment,
- mojo_base.mojom.TimeTicks dispatch_event_time);
- OnResponseForPaymentRequest(PaymentHandlerResponse response,
- mojo_base.mojom.TimeTicks dispatch_event_time);
+ OnResponseForAbortPayment(bool payment_aborted);
+ OnResponseForCanMakePayment(bool can_make_payment);
+ OnResponseForPaymentRequest(PaymentHandlerResponse response);
};
diff --git a/chromium/third_party/blink/public/mojom/quota/quota_dispatcher_host.mojom b/chromium/third_party/blink/public/mojom/quota/quota_dispatcher_host.mojom
index 26b04e4c343..e778a80bd23 100644
--- a/chromium/third_party/blink/public/mojom/quota/quota_dispatcher_host.mojom
+++ b/chromium/third_party/blink/public/mojom/quota/quota_dispatcher_host.mojom
@@ -23,7 +23,8 @@ interface QuotaDispatcherHost {
blink.mojom.StorageType storage_type) =>
(blink.mojom.QuotaStatusCode error,
int64 current_usage,
- int64 current_quota);
+ int64 current_quota,
+ UsageBreakdown usage_breakdown);
// Renderer process requests a new quota size for the origin's storage from
// the browser process. |requested_size| indicates how much storage space (in
diff --git a/chromium/third_party/blink/public/mojom/quota/quota_types.mojom b/chromium/third_party/blink/public/mojom/quota/quota_types.mojom
index c000867a495..77f41e0aaf6 100644
--- a/chromium/third_party/blink/public/mojom/quota/quota_types.mojom
+++ b/chromium/third_party/blink/public/mojom/quota/quota_types.mojom
@@ -21,3 +21,13 @@ enum QuotaStatusCode {
kErrorAbort = 20, // ABORT_ERR
kUnknown = -1,
};
+
+struct UsageBreakdown {
+ int64 fileSystem = 0;
+ int64 webSql = 0;
+ int64 appcache = 0;
+ int64 indexedDatabase = 0;
+ int64 serviceWorkerCache = 0;
+ int64 serviceWorker = 0;
+ int64 backgroundFetch = 0;
+};
diff --git a/chromium/third_party/blink/public/mojom/referrer.mojom b/chromium/third_party/blink/public/mojom/referrer.mojom
new file mode 100644
index 00000000000..8f3aba5ac0e
--- /dev/null
+++ b/chromium/third_party/blink/public/mojom/referrer.mojom
@@ -0,0 +1,16 @@
+// 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";
+import "services/network/public/mojom/referrer_policy.mojom";
+
+// 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;
+ network.mojom.ReferrerPolicy policy;
+};
diff --git a/chromium/third_party/blink/public/mojom/script/OWNERS b/chromium/third_party/blink/public/mojom/script/OWNERS
new file mode 100644
index 00000000000..e34e6a1ecaa
--- /dev/null
+++ b/chromium/third_party/blink/public/mojom/script/OWNERS
@@ -0,0 +1,7 @@
+file://third_party/blink/renderer/core/script/OWNERS
+
+per-file *.mojom=set noparent
+per-file *.mojom=file://ipc/SECURITY_OWNERS
+
+# TEAM: module-dev@chromium.org
+# COMPONENT: Blink>HTML>Script
diff --git a/chromium/third_party/blink/public/mojom/script/script_type.mojom b/chromium/third_party/blink/public/mojom/script/script_type.mojom
new file mode 100644
index 00000000000..c067347c3ca
--- /dev/null
+++ b/chromium/third_party/blink/public/mojom/script/script_type.mojom
@@ -0,0 +1,11 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be found
+// in the LICENSE file.
+
+module blink.mojom;
+
+// https://html.spec.whatwg.org/multipage/webappapis.html#definitions-2
+enum ScriptType {
+ kClassic,
+ kModule,
+};
diff --git a/chromium/third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom b/chromium/third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom
index d6fb06632c2..9fe0fc93c2a 100644
--- a/chromium/third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom
+++ b/chromium/third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom
@@ -45,7 +45,7 @@ enum ServiceWorkerResponseError {
// kForeignFetchMismatchedOrigin = 13, // obsolete
kRedirectedResponseForNotFollowRequest = 14,
kDataPipeCreationFailed = 15,
- kResponseTypeCORSForRequestModeSameOrigin = 16,
+ kResponseTypeCorsForRequestModeSameOrigin = 16,
kResponseBodyBroken = 17,
// Add a new type here, then update enums.xml.
};
diff --git a/chromium/third_party/blink/public/mojom/service_worker/service_worker_registration.mojom b/chromium/third_party/blink/public/mojom/service_worker/service_worker_registration.mojom
index d4c110e1df0..ec05b660f29 100644
--- a/chromium/third_party/blink/public/mojom/service_worker/service_worker_registration.mojom
+++ b/chromium/third_party/blink/public/mojom/service_worker/service_worker_registration.mojom
@@ -4,6 +4,7 @@
module blink.mojom;
+import "third_party/blink/public/mojom/script/script_type.mojom";
import "third_party/blink/public/mojom/service_worker/navigation_preload_state.mojom";
import "third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom";
import "third_party/blink/public/mojom/service_worker/service_worker_object.mojom";
@@ -11,17 +12,6 @@ import "url/mojom/url.mojom";
const int64 kInvalidServiceWorkerRegistrationId = -1;
-// Represents ScriptType enum for ServiceWorkerRegistrationOptions:
-// https://w3c.github.io/ServiceWorker/#dom-registrationoptions-type
-// https://html.spec.whatwg.org/multipage/workers.html#workertype
-// TODO(asamidoi, nhiroki): Move this enum to blink/public/mojom/script or
-// somewhere else, and replace the duplicate enum in
-// third_party/blink/renderer/core/script/script.h.
-enum ScriptType {
- kClassic,
- kModule,
-};
-
// Represents ServiceWorkerUpdateViaCache enum for ServiceWorkerRegistrationOptions:
// https://w3c.github.io/ServiceWorker/#enumdef-serviceworkerupdateviacache
enum ServiceWorkerUpdateViaCache {
diff --git a/chromium/third_party/blink/public/mojom/shared_worker/OWNERS b/chromium/third_party/blink/public/mojom/shared_worker/OWNERS
index a9e7183024b..e1abbf3d0d8 100644
--- a/chromium/third_party/blink/public/mojom/shared_worker/OWNERS
+++ b/chromium/third_party/blink/public/mojom/shared_worker/OWNERS
@@ -1,4 +1,4 @@
-file://content/browser/shared_worker/OWNERS
+file://content/browser/worker_host/OWNERS
per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
diff --git a/chromium/third_party/blink/public/mojom/shared_worker/shared_worker_main_script_load_params.mojom b/chromium/third_party/blink/public/mojom/shared_worker/worker_main_script_load_params.mojom
index 22e5f0bc2a7..f88aa4563db 100644
--- a/chromium/third_party/blink/public/mojom/shared_worker/shared_worker_main_script_load_params.mojom
+++ b/chromium/third_party/blink/public/mojom/shared_worker/worker_main_script_load_params.mojom
@@ -7,9 +7,9 @@ module blink.mojom;
import "services/network/public/mojom/url_loader.mojom";
// NetworkService (PlzWorker):
-// Used for passing the shared worker main script pre-requested by the browser
+// Used for passing the web worker main script pre-requested by the browser
// process and its redirect information.
-struct SharedWorkerMainScriptLoadParams {
+struct WorkerMainScriptLoadParams {
// Used for loading the pre-requested main script in the renderer process.
network.mojom.URLResponseHead response_head;
network.mojom.URLLoaderClientEndpoints? url_loader_client_endpoints;
diff --git a/chromium/third_party/blink/public/mojom/usb/BUILD.gn b/chromium/third_party/blink/public/mojom/usb/BUILD.gn
index 0e8769dfb28..cfa109c1f96 100644
--- a/chromium/third_party/blink/public/mojom/usb/BUILD.gn
+++ b/chromium/third_party/blink/public/mojom/usb/BUILD.gn
@@ -28,7 +28,7 @@ mojom("usb") {
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
- export_header = "third_party/blink/common/common_export.h"
+ export_header = "third_party/blink/public/common/common_export.h"
export_class_attribute_blink = "PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
diff --git a/chromium/third_party/blink/public/mojom/web_package/OWNERS b/chromium/third_party/blink/public/mojom/web_package/OWNERS
deleted file mode 100644
index 21080e39c20..00000000000
--- a/chromium/third_party/blink/public/mojom/web_package/OWNERS
+++ /dev/null
@@ -1,10 +0,0 @@
-per-file *.mojom=set noparent
-per-file *.mojom=file://ipc/SECURITY_OWNERS
-
-kinuko@chromium.org
-kouhei@chromium.org
-horo@chromium.org
-ksakamoto@chromium.org
-
-# TEAM: loading-dev@chromium.org
-# COMPONENT: Blink>Loader
diff --git a/chromium/third_party/blink/public/mojom/web_package/README.md b/chromium/third_party/blink/public/mojom/web_package/README.md
deleted file mode 100644
index 7930614f9e2..00000000000
--- a/chromium/third_party/blink/public/mojom/web_package/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-Public mojom files that are referenced both from browser-side and renderer-side
-for LayoutTest of [WebPackage](https://github.com/WICG/webpackage).
diff --git a/chromium/third_party/blink/public/mojom/web_package/web_package_internals.mojom b/chromium/third_party/blink/public/mojom/web_package/web_package_internals.mojom
deleted file mode 100644
index 9ee53cdfd79..00000000000
--- a/chromium/third_party/blink/public/mojom/web_package/web_package_internals.mojom
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-module blink.test.mojom;
-
-import "mojo/public/mojom/base/time.mojom";
-
-// An interface to change the internal state of WebPackage loading logic for
-// LayoutTests.
-interface WebPackageInternals {
- // Changes the time which will be used to verify SignedHTTPExchange.
- SetSignedExchangeVerificationTime(mojo_base.mojom.Time time) => ();
-};
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
diff --git a/chromium/third_party/blink/public/public_typemaps.gni b/chromium/third_party/blink/public/public_typemaps.gni
index ba1ef5cc4bd..d59930b8015 100644
--- a/chromium/third_party/blink/public/public_typemaps.gni
+++ b/chromium/third_party/blink/public/public_typemaps.gni
@@ -5,8 +5,7 @@
# These are typemaps which are exposed by Blink to its embedder.
typemaps = [
"//third_party/blink/public/platform/content_security_policy.typemap",
- "//third_party/blink/public/platform/referrer_policy.typemap",
- "//third_party/blink/public/common/indexeddb/indexeddb.typemap",
+ "//third_party/blink/public/common/indexeddb/indexed_db_default.typemap",
"//third_party/blink/public/common/manifest/display_mode.typemap",
"//third_party/blink/public/common/manifest/manifest.typemap",
"//third_party/blink/public/common/notifications/notification_types.typemap",
diff --git a/chromium/third_party/blink/public/web/DEPS b/chromium/third_party/blink/public/web/DEPS
index e4d5f0669de..6d1ee56973c 100644
--- a/chromium/third_party/blink/public/web/DEPS
+++ b/chromium/third_party/blink/public/web/DEPS
@@ -12,6 +12,8 @@ include_rules = [
"+cc/paint/paint_flags.h",
"+mojo/public",
"+services/network/public/mojom/cors.mojom-shared.h",
+ "+services/network/public/mojom/cors_origin_pattern.mojom-shared.h",
+ "+services/network/public/mojom/referrer_policy.mojom-shared.h",
"+services/service_manager/public",
# Enforce to use mojom-shared.h in blink/public so that it can compile
# inside and outside Blink.
diff --git a/chromium/third_party/blink/public/web/devtools_agent.mojom b/chromium/third_party/blink/public/web/devtools_agent.mojom
index 06a578d1771..b866ac2f5b8 100644
--- a/chromium/third_party/blink/public/web/devtools_agent.mojom
+++ b/chromium/third_party/blink/public/web/devtools_agent.mojom
@@ -5,7 +5,9 @@
module blink.mojom;
import "mojo/public/mojom/base/big_string.mojom";
+import "mojo/public/mojom/base/unguessable_token.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
+import "url/mojom/url.mojom";
// Debugging interactions are defined in Remote Debugging Protocol.
// See https://chromedevtools.github.io/devtools-protocol/ for more
@@ -74,11 +76,28 @@ interface DevToolsAgent {
// by itself, and has no effect unless a debugging session is
// or will be attached.
InspectElement(gfx.mojom.Point point);
+
+ // Instructs agent to start/stop reporting child workers to the host.
+ // |wait_for_debugger| controls whether the worker should be paused
+ // on start waiting for debugger to connect.
+ // See ChildWorkerCreated in DevToolsAgentHost for details.
+ ReportChildWorkers(bool report, bool wait_for_debugger);
};
-// This interface is implemented in browser.
-// TODO(dgozman): add methods.
+// This interface is implemented in browser and is notified by DevToolsAgent
+// when new child worker is available for future debugging.
interface DevToolsAgentHost {
+ // Informs the host about new child worker and gives its DevToolsAgent
+ // for debugging.
+ // |devtools_worker_token| is a unique token identifying this worker.
+ // |waiting_for_debugger| is true if worker was paused on startup and
+ // should be resumed by debugger to actually start.
+ ChildWorkerCreated(
+ DevToolsAgent worker_devtools_agent,
+ DevToolsAgentHost& worker_devtools_agent_host,
+ url.mojom.Url url,
+ mojo_base.mojom.UnguessableToken devtools_worker_token,
+ bool waiting_for_debugger);
};
// Represents an attached session which exposes remote debugging protocol.
diff --git a/chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h b/chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
index a99c1327550..da9863c746a 100644
--- a/chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
+++ b/chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
@@ -71,8 +71,12 @@ class WebServiceWorkerContextClient {
virtual void WorkerContextFailedToStart() {}
// The worker started but it could not execute because loading the
- // installed script failed.
- virtual void FailedToLoadInstalledScript() {}
+ // installed classic script failed.
+ virtual void FailedToLoadInstalledClassicScript() {}
+
+ // The worker started but it could not execute because fetching module script
+ // failed.
+ virtual void FailedToFetchModuleScript() {}
// The worker script successfully loaded. Called on the main thread when the
// script is served from ResourceLoader or on the worker thread when the
@@ -141,39 +145,31 @@ class WebServiceWorkerContextClient {
// Called after an 'activate' event completed.
virtual void DidHandleActivateEvent(int event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
// Called after Background Fetch events (dispatched via
// WebServiceWorkerContextProxy) are handled by the service worker.
virtual void DidHandleBackgroundFetchAbortEvent(
int event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
virtual void DidHandleBackgroundFetchClickEvent(
int event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
virtual void DidHandleBackgroundFetchFailEvent(
int event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
virtual void DidHandleBackgroundFetchSuccessEvent(
int event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
// Called after 'cookiechange' events are handled by the service worker.
virtual void DidHandleCookieChangeEvent(int event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {
- }
+ mojom::ServiceWorkerEventStatus) {}
// Called after ExtendableMessageEvent was handled by the service worker.
virtual void DidHandleExtendableMessageEvent(
int event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
// RespondToFetchEvent* will be called after the service worker returns a
// response to a FetchEvent, and DidHandleFetchEvent will be called after the
@@ -200,71 +196,56 @@ class WebServiceWorkerContextClient {
base::TimeTicks event_dispatch_time,
base::TimeTicks respond_with_settled_time) {}
virtual void DidHandleFetchEvent(int fetch_event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
// Called after InstallEvent (dispatched via WebServiceWorkerContextProxy) is
// handled by the service worker.
virtual void DidHandleInstallEvent(int install_event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
// Called after NotificationClickEvent (dispatched via
// WebServiceWorkerContextProxy) is handled by the service worker.
virtual void DidHandleNotificationClickEvent(
int event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
// Called after NotificationCloseEvent (dispatched via
// WebServiceWorkerContextProxy) is handled by the service worker.
virtual void DidHandleNotificationCloseEvent(
int event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
// Called after PushEvent (dispatched via WebServiceWorkerContextProxy) is
// handled by the service worker.
virtual void DidHandlePushEvent(int push_event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
// Called after SyncEvent (dispatched via WebServiceWorkerContextProxy) is
// handled by the service worker.
virtual void DidHandleSyncEvent(int sync_event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ mojom::ServiceWorkerEventStatus) {}
// RespondToAbortPaymentEvent will be called after the service worker
// returns a response to a AbortPaymentEvent, and DidHandleAbortPaymentEvent
// will be called after the end of AbortPaymentEvent's lifecycle.
// |event_id| is the id that was passed to DispatchAbortPaymentEvent.
- virtual void RespondToAbortPaymentEvent(int event_id,
- bool abort_payment,
- base::TimeTicks event_dispatch_time) {
- }
+ virtual void RespondToAbortPaymentEvent(int event_id, bool abort_payment) {}
// Called after AbortPaymentEvent (dispatched
// via WebServiceWorkerContextProxy) is handled by the service worker.
virtual void DidHandleAbortPaymentEvent(int abort_payment_event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {
- }
+ mojom::ServiceWorkerEventStatus) {}
// RespondToCanMakePaymentEvent will be called after the service worker
// returns a response to a CanMakePaymentEvent, and
// DidHandleCanMakePaymentEvent will be called after the end of
// CanMakePaymentEvent's lifecycle. |event_id| is the id that was passed
// to DispatchCanMakePaymentEvent.
- virtual void RespondToCanMakePaymentEvent(
- int event_id,
- bool can_make_payment,
- base::TimeTicks event_dispatch_time) {}
+ virtual void RespondToCanMakePaymentEvent(int event_id,
+ bool can_make_payment) {}
// Called after CanMakePaymentEvent (dispatched
// via WebServiceWorkerContextProxy) is handled by the service worker.
- virtual void DidHandleCanMakePaymentEvent(
- int payment_request_event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ virtual void DidHandleCanMakePaymentEvent(int payment_request_event_id,
+ mojom::ServiceWorkerEventStatus) {}
// RespondToPaymentRequestEvent will be called after the service worker
// returns a response to a PaymentRequestEvent, and
@@ -273,14 +254,11 @@ class WebServiceWorkerContextClient {
// to DispatchPaymentRequestEvent.
virtual void RespondToPaymentRequestEvent(
int event_id,
- const WebPaymentHandlerResponse& response,
- base::TimeTicks event_dispatch_time) {}
+ const WebPaymentHandlerResponse& response) {}
// Called after PaymentRequestEvent (dispatched via
// WebServiceWorkerContextProxy) is handled by the service worker.
- virtual void DidHandlePaymentRequestEvent(
- int payment_request_event_id,
- mojom::ServiceWorkerEventStatus,
- base::TimeTicks event_dispatch_time) {}
+ virtual void DidHandlePaymentRequestEvent(int payment_request_event_id,
+ mojom::ServiceWorkerEventStatus) {}
// Called on the main thread.
virtual std::unique_ptr<WebServiceWorkerNetworkProvider>
@@ -288,7 +266,7 @@ class WebServiceWorkerContextClient {
// Creates a WebWorkerFetchContext for a service worker. This is called on the
// main thread.
- virtual std::unique_ptr<blink::WebWorkerFetchContext>
+ virtual scoped_refptr<blink::WebWorkerFetchContext>
CreateServiceWorkerFetchContext(WebServiceWorkerNetworkProvider*) {
return nullptr;
}
diff --git a/chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_proxy.h b/chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_proxy.h
index 7ca96a4f428..3e1026f9f9c 100644
--- a/chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_proxy.h
+++ b/chromium/third_party/blink/public/web/modules/service_worker/web_service_worker_context_proxy.h
@@ -36,8 +36,6 @@
#include "third_party/blink/public/common/messaging/transferable_message.h"
#include "third_party/blink/public/platform/modules/background_fetch/background_fetch.mojom-shared.h"
#include "third_party/blink/public/platform/modules/background_fetch/web_background_fetch_registration.h"
-#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h"
-#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_registration.h"
#include "third_party/blink/public/platform/web_canonical_cookie.h"
#include <memory>
@@ -52,6 +50,8 @@ struct WebNotificationData;
struct WebPaymentRequestEventData;
struct WebServiceWorkerClientInfo;
struct WebServiceWorkerError;
+struct WebServiceWorkerObjectInfo;
+struct WebServiceWorkerRegistrationObjectInfo;
class WebURLResponse;
// A proxy interface to talk to the worker's GlobalScope implementation.
@@ -63,8 +63,7 @@ class WebServiceWorkerContextProxy {
virtual void BindServiceWorkerHost(
mojo::ScopedInterfaceEndpointHandle service_worker_host) = 0;
- virtual void SetRegistration(
- std::unique_ptr<WebServiceWorkerRegistration::Handle>) = 0;
+ virtual void SetRegistration(WebServiceWorkerRegistrationObjectInfo) = 0;
// Script evaluation does not start until this function is called.
virtual void ReadyToEvaluateScript() = 0;
diff --git a/chromium/third_party/blink/public/web/web_associated_url_loader_options.h b/chromium/third_party/blink/public/web/web_associated_url_loader_options.h
index 120995c6ae0..cd727b6e254 100644
--- a/chromium/third_party/blink/public/web/web_associated_url_loader_options.h
+++ b/chromium/third_party/blink/public/web/web_associated_url_loader_options.h
@@ -47,8 +47,8 @@ struct WebAssociatedURLLoaderOptions {
// When true, omit origin related checks. USE WITH CARE.
bool grant_universal_access = false;
- network::mojom::CORSPreflightPolicy preflight_policy =
- network::mojom::CORSPreflightPolicy::kConsiderPreflight;
+ network::mojom::CorsPreflightPolicy preflight_policy =
+ network::mojom::CorsPreflightPolicy::kConsiderPreflight;
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/web/web_ax_enums.h b/chromium/third_party/blink/public/web/web_ax_enums.h
index b8cdcff3dcf..0475dca03c3 100644
--- a/chromium/third_party/blink/public/web/web_ax_enums.h
+++ b/chromium/third_party/blink/public/web/web_ax_enums.h
@@ -33,15 +33,6 @@
namespace blink {
-// Used for exposing text attributes.
-enum WebAXTextStyle {
- kWebAXTextStyleNone = 0,
- kWebAXTextStyleBold = 1 << 0,
- kWebAXTextStyleItalic = 1 << 1,
- kWebAXTextStyleUnderline = 1 << 2,
- kWebAXTextStyleLineThrough = 1 << 3
-};
-
// Expanded State.
// These values must match blink::AccessibilityExpanded values.
// Enforced in AssertMatchingEnums.cpp.
diff --git a/chromium/third_party/blink/public/web/web_ax_object.h b/chromium/third_party/blink/public/web/web_ax_object.h
index 8c35f1464dc..58d439ea7cf 100644
--- a/chromium/third_party/blink/public/web/web_ax_object.h
+++ b/chromium/third_party/blink/public/web/web_ax_object.h
@@ -122,6 +122,7 @@ class WebAXObject {
BLINK_EXPORT bool IsCheckable() const;
BLINK_EXPORT bool IsClickable() const;
BLINK_EXPORT bool IsControl() const;
+ BLINK_EXPORT bool IsDefault() const;
BLINK_EXPORT WebAXExpanded IsExpanded() const;
BLINK_EXPORT bool IsFocused() const;
BLINK_EXPORT bool IsHovered() const;
@@ -177,7 +178,8 @@ class WebAXObject {
BLINK_EXPORT WebString StringValue() const;
BLINK_EXPORT ax::mojom::TextDirection GetTextDirection() const;
BLINK_EXPORT ax::mojom::TextPosition GetTextPosition() const;
- BLINK_EXPORT WebAXTextStyle TextStyle() const;
+ // Bitmask from ax::mojom::TextStyle.
+ BLINK_EXPORT int32_t TextStyle() const;
BLINK_EXPORT WebURL Url() const;
// Retrieves the accessible name of the object, an enum indicating where the
diff --git a/chromium/third_party/blink/public/web/web_context_menu_data.h b/chromium/third_party/blink/public/web/web_context_menu_data.h
index ef52428299b..0d3d133bffe 100644
--- a/chromium/third_party/blink/public/web/web_context_menu_data.h
+++ b/chromium/third_party/blink/public/web/web_context_menu_data.h
@@ -31,10 +31,10 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_CONTEXT_MENU_DATA_H_
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_CONTEXT_MENU_DATA_H_
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "third_party/blink/public/platform/web_menu_source_type.h"
#include "third_party/blink/public/platform/web_point.h"
#include "third_party/blink/public/platform/web_rect.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_response.h"
@@ -191,7 +191,7 @@ struct WebContextMenuData {
int edit_flags;
// The referrer policy applicable to this context.
- WebReferrerPolicy referrer_policy;
+ network::mojom::ReferrerPolicy referrer_policy;
// Custom context menu items provided by the WebCore internals.
WebVector<WebMenuItemInfo> custom_items;
diff --git a/chromium/third_party/blink/public/web/web_document.h b/chromium/third_party/blink/public/web/web_document.h
index 84f32a38a1f..b92d57ac2b7 100644
--- a/chromium/third_party/blink/public/web/web_document.h
+++ b/chromium/third_party/blink/public/web/web_document.h
@@ -31,7 +31,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_DOCUMENT_H_
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_DOCUMENT_H_
-#include "third_party/blink/public/platform/web_referrer_policy.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "third_party/blink/public/platform/web_security_origin.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/public/web/web_draggable_region.h"
@@ -107,7 +107,7 @@ class WebDocument : public WebNode {
BLINK_EXPORT WebURL CompleteURL(const WebString&) const;
BLINK_EXPORT WebElement GetElementById(const WebString&) const;
BLINK_EXPORT WebElement FocusedElement() const;
- BLINK_EXPORT WebReferrerPolicy GetReferrerPolicy() const;
+ BLINK_EXPORT network::mojom::ReferrerPolicy GetReferrerPolicy() const;
BLINK_EXPORT WebString OutgoingReferrer();
// Inserts the given CSS source code as a style sheet in the document.
diff --git a/chromium/third_party/blink/public/web/web_dom_message_event.h b/chromium/third_party/blink/public/web/web_dom_message_event.h
index 37712faf968..db7fa8880db 100644
--- a/chromium/third_party/blink/public/web/web_dom_message_event.h
+++ b/chromium/third_party/blink/public/web/web_dom_message_event.h
@@ -38,7 +38,7 @@
#include "third_party/blink/public/web/web_serialized_script_value.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/core/events/message_event.h"
+#include "third_party/blink/renderer/core/events/message_event.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/web/web_element_collection.h b/chromium/third_party/blink/public/web/web_element_collection.h
index acab8ad01fc..e1e473afb46 100644
--- a/chromium/third_party/blink/public/web/web_element_collection.h
+++ b/chromium/third_party/blink/public/web/web_element_collection.h
@@ -36,7 +36,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/web/web_embedded_worker_start_data.h b/chromium/third_party/blink/public/web/web_embedded_worker_start_data.h
index 68ac0b715e4..ab763a60318 100644
--- a/chromium/third_party/blink/public/web/web_embedded_worker_start_data.h
+++ b/chromium/third_party/blink/public/web/web_embedded_worker_start_data.h
@@ -68,7 +68,7 @@ struct WebEmbeddedWorkerStartData {
WebEmbeddedWorkerStartData()
: pause_after_download_mode(kDontPauseAfterDownload),
wait_for_debugger_mode(kDontWaitForDebugger),
- v8_cache_options(WebSettings::kV8CacheOptionsDefault) {}
+ v8_cache_options(WebSettings::V8CacheOptions::kDefault) {}
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/web/web_file_chooser_completion.h b/chromium/third_party/blink/public/web/web_file_chooser_completion.h
deleted file mode 100644
index 72595a305a1..00000000000
--- a/chromium/third_party/blink/public/web/web_file_chooser_completion.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2009 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_WEB_WEB_FILE_CHOOSER_COMPLETION_H_
-#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_FILE_CHOOSER_COMPLETION_H_
-
-#include "base/files/file_path.h"
-#include "base/time/time.h"
-#include "third_party/blink/public/platform/web_string.h"
-#include "third_party/blink/public/platform/web_url.h"
-
-namespace blink {
-
-template <typename T>
-class WebVector;
-
-// Gets called back when WebViewClient finished choosing a file.
-class WebFileChooserCompletion {
- public:
- struct SelectedFileInfo {
- // The actual path of the selected file.
- base::FilePath file_path;
-
- // The display name of the file that is to be exposed as File.name in
- // the DOM layer. If it is empty the base part of the |path| is used.
- WebString display_name;
-
- // File system URL.
- WebURL file_system_url;
-
- // Metadata of non-native file.
- // 0 is Unix epoch, unit is sec.
- base::Time modification_time;
- long long length;
- bool is_directory;
-
- SelectedFileInfo() : length(0), is_directory(false) {}
- };
-
- // Called with zero or more file names. Zero-length vector means that
- // the user cancelled or that file choosing failed. The callback instance
- // is destroyed when this method is called.
- virtual void DidChooseFile(const WebVector<WebString>& file_names) = 0;
-
- // Called with zero or more files, given as a vector of SelectedFileInfo.
- // Zero-length vector means that the user cancelled or that file
- // choosing failed. The callback instance is destroyed when this method
- // is called.
- // FIXME: Deprecate either one of the didChooseFile (and rename it to
- // didChooseFile*s*).
- virtual void DidChooseFile(const WebVector<SelectedFileInfo>&) {}
-
- protected:
- virtual ~WebFileChooserCompletion() = default;
-};
-
-} // namespace blink
-
-#endif
diff --git a/chromium/third_party/blink/public/web/web_file_chooser_params.h b/chromium/third_party/blink/public/web/web_file_chooser_params.h
deleted file mode 100644
index a39bc4d4300..00000000000
--- a/chromium/third_party/blink/public/web/web_file_chooser_params.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2010, 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_WEB_WEB_FILE_CHOOSER_PARAMS_H_
-#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_FILE_CHOOSER_PARAMS_H_
-
-#include "third_party/blink/public/mojom/choosers/file_chooser.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/public/platform/web_vector.h"
-
-namespace blink {
-
-struct WebFileChooserParams {
- // See FileChooserParams in file_chooser.mojom.
- using Mode = mojom::FileChooserParams_Mode;
- Mode mode = Mode::kOpen;
- // |title| is the title for a file chooser dialog. It can be an empty string.
- WebString title;
- // This contains MIME type strings such as "audio/*" "text/plain" or file
- // extensions beginning with a period (.) such as ".mp3" ".txt".
- // The dialog may restrict selectable files to files with the specified MIME
- // types or file extensions.
- // This list comes from an 'accept' attribute value of an INPUT element, and
- // it contains only lower-cased MIME type strings and file extensions.
- WebVector<WebString> accept_types;
- // |selected_files| has filenames which a file upload control already
- // selected. A WebLocalFrameClient implementation may ask a user to select
- // - removing a file from the selected files,
- // - appending other files, or
- // - replacing with other files
- // before opening a file chooser dialog.
- WebVector<WebString> selected_files;
- // See http://www.w3.org/TR/html-media-capture/ for the semantics of the
- // capture attribute. If |use_media_capture| is true, the media types
- // indicated in |accept_types| should be obtained from the device's
- // environment using a media capture mechanism.
- bool use_media_capture = false;
- // Whether WebFileChooserCompletion needs local paths or not. If the result
- // of file chooser is handled by the implementation of
- // WebFileChooserCompletion that can handle files without local paths,
- // 'false' should be specified to the flag.
- bool need_local_path = true;
- // If non-empty, represents the URL of the requestor if the request was
- // initiated by a document.
- WebURL requestor;
-};
-
-} // namespace blink
-
-#endif
diff --git a/chromium/third_party/blink/public/web/web_frame_owner_properties.h b/chromium/third_party/blink/public/web/web_frame_owner_properties.h
index fea9346de6a..dec678360a2 100644
--- a/chromium/third_party/blink/public/web/web_frame_owner_properties.h
+++ b/chromium/third_party/blink/public/web/web_frame_owner_properties.h
@@ -8,7 +8,7 @@
#include "third_party/blink/public/platform/web_string.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/scroll/scroll_types.h"
+#include "third_party/blink/renderer/platform/scroll/scroll_types.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/web/web_frame_widget.h b/chromium/third_party/blink/public/web/web_frame_widget.h
index 9837a3b0d37..41d2efaf9bd 100644
--- a/chromium/third_party/blink/public/web/web_frame_widget.h
+++ b/chromium/third_party/blink/public/web/web_frame_widget.h
@@ -58,13 +58,6 @@ class WebFrameWidget : public WebWidget {
WebWidgetClient*,
WebLocalFrame* local_root);
- // Sets the visibility of the WebFrameWidget.
- // We still track page-level visibility, but additionally we need to notify a
- // WebFrameWidget when its owning RenderWidget receives a Show or Hide
- // directive, so that it knows whether it needs to draw or not.
- virtual void SetVisibilityState(mojom::PageVisibilityState visibility_state) {
- }
-
// Overrides the WebFrameWidget's background and base background color. You
// can use this to enforce a transparent background, which is useful if you
// want to have some custom background rendered behind the widget.
diff --git a/chromium/third_party/blink/public/web/web_history_item.h b/chromium/third_party/blink/public/web/web_history_item.h
index a806e086e7d..5e4652187a1 100644
--- a/chromium/third_party/blink/public/web/web_history_item.h
+++ b/chromium/third_party/blink/public/web/web_history_item.h
@@ -31,10 +31,10 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_HISTORY_ITEM_H_
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_HISTORY_ITEM_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_history_scroll_restoration_type.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_scroll_anchor_data.h"
#include "third_party/blink/public/platform/web_string.h"
@@ -75,8 +75,9 @@ class WebHistoryItem {
BLINK_EXPORT void SetURLString(const WebString&);
BLINK_EXPORT WebString GetReferrer() const;
- BLINK_EXPORT WebReferrerPolicy GetReferrerPolicy() const;
- BLINK_EXPORT void SetReferrer(const WebString&, WebReferrerPolicy);
+ BLINK_EXPORT network::mojom::ReferrerPolicy GetReferrerPolicy() const;
+ BLINK_EXPORT void SetReferrer(const WebString&,
+ network::mojom::ReferrerPolicy);
BLINK_EXPORT const WebString& Target() const;
BLINK_EXPORT void SetTarget(const WebString&);
diff --git a/chromium/third_party/blink/public/web/web_icon_url.h b/chromium/third_party/blink/public/web/web_icon_url.h
index c1cb237fa76..7ebec706e6c 100644
--- a/chromium/third_party/blink/public/web/web_icon_url.h
+++ b/chromium/third_party/blink/public/web/web_icon_url.h
@@ -32,7 +32,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_ICON_URL_H_
#if INSIDE_BLINK
-#include "third_party/blink/renderer/core/dom/icon_url.h"
+#include "third_party/blink/renderer/core/dom/icon_url.h" // nogncheck
#endif
#include "third_party/blink/public/platform/web_size.h"
#include "third_party/blink/public/platform/web_url.h"
diff --git a/chromium/third_party/blink/public/web/web_ime_text_span.h b/chromium/third_party/blink/public/web/web_ime_text_span.h
index ddc47575a84..94fa241ba58 100644
--- a/chromium/third_party/blink/public/web/web_ime_text_span.h
+++ b/chromium/third_party/blink/public/web/web_ime_text_span.h
@@ -94,6 +94,7 @@ struct WebImeTextSpan {
ws::mojom::ImeTextSpanThickness thickness;
SkColor background_color;
SkColor suggestion_highlight_color;
+ bool remove_on_finish_composing;
std::vector<std::string> suggestions;
};
diff --git a/chromium/third_party/blink/public/web/web_local_frame.h b/chromium/third_party/blink/public/web/web_local_frame.h
index 68b3ae21865..4b680e1b99e 100644
--- a/chromium/third_party/blink/public/web/web_local_frame.h
+++ b/chromium/third_party/blink/public/web/web_local_frame.h
@@ -9,7 +9,6 @@
#include <set>
#include "base/callback.h"
-#include "base/unguessable_token.h"
#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
#include "third_party/blink/public/common/feature_policy/feature_policy.h"
#include "third_party/blink/public/common/frame/sandbox_flags.h"
@@ -24,7 +23,6 @@
#include "third_party/blink/public/web/web_document_loader.h"
#include "third_party/blink/public/web/web_frame.h"
#include "third_party/blink/public/web/web_frame_load_type.h"
-#include "third_party/blink/public/web/web_history_item.h"
#include "third_party/blink/public/web/web_ime_text_span.h"
#include "third_party/blink/public/web/web_navigation_params.h"
#include "third_party/blink/public/web/web_text_direction.h"
@@ -37,7 +35,6 @@ class InterfaceRegistry;
class WebAssociatedURLLoader;
class WebAutofillClient;
class WebContentSettingsClient;
-class WebData;
class WebDocument;
class WebDoubleSize;
class WebDOMEvent;
@@ -58,8 +55,8 @@ enum class WebTreeScopeType;
struct WebAssociatedURLLoaderOptions;
struct WebConsoleMessage;
struct WebContentSecurityPolicyViolation;
-struct WebNavigationParams;
struct WebMediaPlayerAction;
+struct WebPoint;
struct WebPrintParams;
struct WebPrintPresetOptions;
struct WebScriptSource;
@@ -193,11 +190,6 @@ class WebLocalFrame : public WebFrame {
// Navigation ----------------------------------------------------------
- // Runs beforeunload handlers for this frame and returns the value returned
- // by handlers.
- // Note: this may lead to the destruction of the frame.
- virtual bool DispatchBeforeUnloadEvent(bool is_reload) = 0;
-
// Start reloading the current document.
// Note: StartReload() will be deprecated, use StartNavigation() instead.
virtual void StartReload(WebFrameLoadType) = 0;
@@ -205,62 +197,8 @@ class WebLocalFrame : public WebFrame {
// Start navigation to the given URL.
virtual void StartNavigation(const WebURLRequest&) = 0;
- // Commits a cross-document navigation in the frame. For history navigations,
- // a valid WebHistoryItem should be provided.
- // TODO(dgozman): return mojom::CommitResult.
- virtual void CommitNavigation(
- const WebURLRequest&,
- WebFrameLoadType,
- const WebHistoryItem&,
- bool is_client_redirect,
- const base::UnguessableToken& devtools_navigation_token,
- std::unique_ptr<WebNavigationParams> navigation_params,
- std::unique_ptr<WebDocumentLoader::ExtraData> extra_data) = 0;
-
- // Commits a same-document navigation in the frame. For history navigations, a
- // valid WebHistoryItem should be provided. Returns CommitResult::Ok if the
- // navigation has actually committed.
- virtual mojom::CommitResult CommitSameDocumentNavigation(
- const WebURL&,
- WebFrameLoadType,
- const WebHistoryItem&,
- bool is_client_redirect,
- std::unique_ptr<WebDocumentLoader::ExtraData> extra_data) = 0;
-
- // Loads a JavaScript URL in the frame.
- virtual void LoadJavaScriptURL(const WebURL&) = 0;
-
- // This method is short-hand for calling CommitDataNavigation, where mime_type
- // is "text/html" and text_encoding is "UTF-8".
- // TODO(dgozman): rename to CommitHTMLStringNavigation.
- virtual void LoadHTMLString(const WebData& html,
- const WebURL& base_url,
- const WebURL& unreachable_url = WebURL()) = 0;
-
- // Navigates to the given |data| with specified |mime_type| and optional
- // |text_encoding|.
- //
- // If specified, |unreachable_url| is reported via
- // WebDocumentLoader::UnreachableURL.
- //
- // If |replace| is false, then this data will be loaded as a normal
- // navigation. Otherwise, the current history item will be replaced.
- //
- // Request's url indicates the security origin and is used as a base
- // url to resolve links in the committed document.
- virtual void CommitDataNavigation(
- const WebURLRequest&,
- const WebData&,
- const WebString& mime_type,
- const WebString& text_encoding,
- const WebURL& unreachable_url,
- WebFrameLoadType,
- const WebHistoryItem&,
- bool is_client_redirect,
- std::unique_ptr<WebNavigationParams> navigation_params,
- std::unique_ptr<WebDocumentLoader::ExtraData> navigation_data) = 0;
-
// Returns the document loader that is currently loading. May be null.
+ // TODO(dgozman): move this to WebNavigationControl.
virtual WebDocumentLoader* GetProvisionalDocumentLoader() const = 0;
// View-source rendering mode. Set this before loading an URL to cause
@@ -271,18 +209,6 @@ class WebLocalFrame : public WebFrame {
// Returns the document loader that is currently loaded.
virtual WebDocumentLoader* GetDocumentLoader() const = 0;
- enum FallbackContentResult {
- // An error page should be shown instead of fallback.
- NoFallbackContent,
- // Something else committed, no fallback content or error page needed.
- NoLoadInProgress,
- // Fallback content rendered, no error page needed.
- FallbackRendered
- };
- // On load failure, attempts to make frame's parent render fallback content.
- virtual FallbackContentResult MaybeRenderFallbackContent(
- const WebURLError&) const = 0;
-
// Called when a navigation is blocked because a Content Security Policy (CSP)
// is infringed.
virtual void ReportContentSecurityPolicyViolation(
@@ -312,11 +238,6 @@ class WebLocalFrame : public WebFrame {
virtual bool IsNavigationScheduledWithin(
double interval_in_seconds) const = 0;
- // Override the normal rules for whether a load has successfully committed
- // in this frame. Used to propagate state when this frame has navigated
- // cross process.
- virtual void SetCommittedFirstRealLoad() = 0;
-
// Reports a list of unique blink::WebFeature values representing
// Blink features used, performed or encountered by the browser during the
// current page load happening on the frame.
@@ -333,15 +254,6 @@ class WebLocalFrame : public WebFrame {
bool had_redirect,
const WebSourceLocation&) = 0;
- // Informs the frame that the navigation it asked the client to do was
- // dropped.
- virtual void ClientDroppedNavigation() = 0;
-
- // Marks the frame as loading, without performing any loading. Used for
- // initial history navigations in child frames, which may actually happen
- // in the other process.
- virtual void MarkAsLoading() = 0;
-
// Orientation Changes ----------------------------------------------------
// Notify the frame that the screen orientation has changed.
@@ -744,9 +656,6 @@ class WebLocalFrame : public WebFrame {
virtual WebSize GetScrollOffset() const = 0;
virtual void SetScrollOffset(const WebSize&) = 0;
- // If set to false, do not draw scrollbars on this frame's view.
- virtual void SetCanHaveScrollbars(bool) = 0;
-
// The size of the document in this frame.
virtual WebSize DocumentSize() const = 0;
diff --git a/chromium/third_party/blink/public/web/web_local_frame_client.h b/chromium/third_party/blink/public/web/web_local_frame_client.h
index 75af736db0f..2a46b3fabd8 100644
--- a/chromium/third_party/blink/public/web/web_local_frame_client.h
+++ b/chromium/third_party/blink/public/web/web_local_frame_client.h
@@ -36,6 +36,7 @@
#include "base/unguessable_token.h"
#include "third_party/blink/public/common/feature_policy/feature_policy.h"
+#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
#include "third_party/blink/public/common/frame/sandbox_flags.h"
#include "third_party/blink/public/common/frame/user_activation_update_type.h"
#include "third_party/blink/public/mojom/page/page_visibility_state.mojom-shared.h"
@@ -61,14 +62,15 @@
#include "third_party/blink/public/web/web_ax_object.h"
#include "third_party/blink/public/web/web_document_loader.h"
#include "third_party/blink/public/web/web_dom_message_event.h"
-#include "third_party/blink/public/web/web_file_chooser_params.h"
#include "third_party/blink/public/web/web_form_element.h"
#include "third_party/blink/public/web/web_frame.h"
+#include "third_party/blink/public/web/web_frame_load_type.h"
#include "third_party/blink/public/web/web_frame_owner_properties.h"
#include "third_party/blink/public/web/web_global_object_reuse_policy.h"
#include "third_party/blink/public/web/web_history_commit_type.h"
#include "third_party/blink/public/web/web_history_item.h"
#include "third_party/blink/public/web/web_icon_url.h"
+#include "third_party/blink/public/web/web_navigation_params.h"
#include "third_party/blink/public/web/web_navigation_policy.h"
#include "third_party/blink/public/web/web_navigation_type.h"
#include "third_party/blink/public/web/web_text_direction.h"
@@ -96,13 +98,13 @@ class WebDocumentLoader;
class WebEncryptedMediaClient;
class WebExternalPopupMenu;
class WebExternalPopupMenuClient;
-class WebFileChooserCompletion;
class WebLayerTreeView;
class WebLocalFrame;
class WebMediaPlayer;
class WebMediaPlayerClient;
class WebMediaPlayerEncryptedMediaClient;
class WebMediaPlayerSource;
+class WebNavigationControl;
class WebServiceWorkerProvider;
class WebPlugin;
class WebPushClient;
@@ -130,8 +132,9 @@ class BLINK_EXPORT WebLocalFrameClient {
// Initialization ------------------------------------------------------
// Called exactly once during construction to notify the client about the
// created WebLocalFrame. Guaranteed to be invoked before any other
- // WebLocalFrameClient callbacks.
- virtual void BindToFrame(WebLocalFrame*) {}
+ // WebLocalFrameClient callbacks. Note this takes WebNavigationControl
+ // to give the client full control over frame's navigation.
+ virtual void BindToFrame(WebNavigationControl*) {}
// Factory methods -----------------------------------------------------
@@ -169,7 +172,7 @@ class BLINK_EXPORT WebLocalFrameClient {
// Returns a new WebWorkerFetchContext for a dedicated worker. Ownership of
// the returned object is transferred to the caller.
- virtual std::unique_ptr<WebWorkerFetchContext> CreateWorkerFetchContext() {
+ virtual scoped_refptr<WebWorkerFetchContext> CreateWorkerFetchContext() {
return nullptr;
}
@@ -220,7 +223,8 @@ class BLINK_EXPORT WebLocalFrameClient {
const WebString& fallback_name,
WebSandboxFlags sandbox_flags,
const ParsedFeaturePolicy& container_policy,
- const WebFrameOwnerProperties&) {
+ const WebFrameOwnerProperties&,
+ FrameOwnerElementType) {
return nullptr;
}
@@ -328,53 +332,24 @@ class BLINK_EXPORT WebLocalFrameClient {
// Navigational queries ------------------------------------------------
- // The client may choose to alter the navigation policy. Otherwise,
- // defaultPolicy should just be returned.
-
- struct NavigationPolicyInfo {
- // Note: if browser side navigations are enabled, the client may modify
- // the urlRequest. However, should this happen, the client should change
- // the WebNavigationPolicy to WebNavigationPolicyIgnore, and the load
- // should stop in blink. In all other cases, the urlRequest should not
- // be modified.
- WebURLRequest& url_request;
- WebNavigationType navigation_type;
- WebNavigationPolicy default_policy;
- bool has_user_gesture;
- bool replaces_current_history_item;
- bool is_history_navigation_in_new_child_frame;
- bool is_client_redirect;
- WebTriggeringEventInfo triggering_event_info;
- WebFormElement form;
- WebSourceLocation source_location;
- WebString devtools_initiator_info;
- WebContentSecurityPolicyDisposition
- should_check_main_world_content_security_policy;
- mojo::ScopedMessagePipeHandle blob_url_token;
- base::TimeTicks input_start;
-
- // Specify whether or not a MHTML Archive can be used to load a subframe
- // resource instead of doing a network request.
- enum class ArchiveStatus { Absent, Present };
- ArchiveStatus archive_status;
-
- explicit NavigationPolicyInfo(WebURLRequest& url_request)
- : url_request(url_request),
- navigation_type(kWebNavigationTypeOther),
- default_policy(kWebNavigationPolicyIgnore),
- has_user_gesture(false),
- replaces_current_history_item(false),
- is_history_navigation_in_new_child_frame(false),
- is_client_redirect(false),
- triggering_event_info(WebTriggeringEventInfo::kUnknown),
- should_check_main_world_content_security_policy(
- kWebContentSecurityPolicyDispositionCheck),
- archive_status(ArchiveStatus::Absent) {}
- };
-
- virtual WebNavigationPolicy DecidePolicyForNavigation(
- const NavigationPolicyInfo& info) {
- return info.default_policy;
+ // Requests the client to begin a navigation for this frame.
+ //
+ // The client can just call CommitNavigation() on this frame's
+ // WebNavigationControl in response. This will effectively commit a navigation
+ // the frame has asked about. This usually happens for navigations which
+ // do not require a network request, e.g. about:blank or mhtml archive.
+ //
+ // In the case of a navigation which requires network request and goes
+ // to the browser process, client calls CreatePlaceholderDocumentLoader
+ // (see WebNavigationControl for more details) and commits/cancels
+ // the navigation later.
+ //
+ // It is also totally valid to ignore the request and abandon the
+ // navigation entirely.
+ //
+ // Note that ignoring this method effectively disables any navigations
+ // initiated by Blink in this frame.
+ virtual void BeginNavigation(std::unique_ptr<blink::WebNavigationInfo> info) {
}
// Asks the embedder whether the frame is allowed to navigate the main frame
@@ -405,10 +380,8 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateDocumentLoader(WebDocumentLoader*) {}
// A new provisional load has been started.
- virtual void DidStartProvisionalLoad(
- WebDocumentLoader* document_loader,
- WebURLRequest& request,
- mojo::ScopedMessagePipeHandle navigation_initiator_handle) {}
+ virtual void DidStartProvisionalLoad(WebDocumentLoader* document_loader,
+ WebURLRequest& request) {}
// The provisional load failed. The WebHistoryCommitType is the commit type
// that would have been used had the load succeeded.
@@ -520,6 +493,11 @@ class BLINK_EXPORT WebLocalFrameClient {
return base::UnguessableToken::Create();
}
+ // When a same-site load fails and the original frame in parent process is
+ // owned by an <object> element, this call notifies the owner element that it
+ // should render fallback content of its own.
+ virtual void RenderFallbackContentInParentProcess() {}
+
// PlzNavigate
// Called to abort a navigation that is being handled by the browser process.
virtual void AbortClientNavigation() {}
@@ -577,15 +555,6 @@ class BLINK_EXPORT WebLocalFrameClient {
// the user selects 'OK' or false otherwise.
virtual bool RunModalBeforeUnloadDialog(bool is_reload) { return true; }
- // This method returns immediately after showing the dialog. When the
- // dialog is closed, it should call the WebFileChooserCompletion to
- // pass the results of the dialog. Returns false if
- // WebFileChooseCompletion will never be called.
- virtual bool RunFileChooser(const blink::WebFileChooserParams& params,
- WebFileChooserCompletion* chooser_completion) {
- return false;
- }
-
// UI ------------------------------------------------------------------
// Shows a context menu with commands relevant to a specific element on
@@ -641,6 +610,10 @@ class BLINK_EXPORT WebLocalFrameClient {
// been distrusted (|did_fail|=true).
virtual void ReportLegacySymantecCert(const WebURL&, bool did_fail) {}
+ // The frame loaded a resource with a legacy TLS version that will be removed
+ // in the future. Prints a console message to warn about this.
+ virtual void ReportLegacyTLSVersion(const WebURL&) {}
+
// A performance timing event (e.g. first paint) occurred
virtual void DidChangePerformanceTiming() {}
@@ -666,6 +639,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidObserveNewCssPropertyUsage(int /*css_property*/,
bool /*is_animated*/) {}
+ // Reports that visible elements in the frame shifted (bit.ly/lsm-explainer).
+ virtual void DidObserveLayoutJank(double jank_fraction) {}
+
// Script notifications ------------------------------------------------
// Notifies that a new script context has been created for this frame.
@@ -782,15 +758,11 @@ class BLINK_EXPORT WebLocalFrameClient {
// Audio Output Devices API --------------------------------------------
// Checks that the given audio sink exists and is authorized. The result is
- // provided via the callbacks. This method takes ownership of the callbacks
- // pointer.
+ // provided via the callbacks.
virtual void CheckIfAudioSinkExistsAndIsAuthorized(
const WebString& sink_id,
- WebSetSinkIdCallbacks* callbacks) {
- if (callbacks) {
- callbacks->OnError(WebSetSinkIdError::kNotSupported);
- delete callbacks;
- }
+ std::unique_ptr<WebSetSinkIdCallbacks> callbacks) {
+ callbacks->OnError(WebSetSinkIdError::kNotSupported);
}
// Visibility ----------------------------------------------------------
diff --git a/chromium/third_party/blink/public/web/web_media_player_action.h b/chromium/third_party/blink/public/web/web_media_player_action.h
index 674b900b505..95fd0f72001 100644
--- a/chromium/third_party/blink/public/web/web_media_player_action.h
+++ b/chromium/third_party/blink/public/web/web_media_player_action.h
@@ -34,20 +34,21 @@
namespace blink {
struct WebMediaPlayerAction {
- enum Type {
- kUnknown,
+ enum class Type {
kPlay,
kMute,
kLoop,
kControls,
kPictureInPicture,
- kTypeLast = kPictureInPicture
+ kMaxValue = kPictureInPicture
};
- Type type;
- bool enable;
+ Type type = Type::kMaxValue;
+ bool enable = false;
- WebMediaPlayerAction() : type(kUnknown), enable(false) {}
+ // The default constructor is needed for IPC. If this is moved to mojo, we may
+ // be able to delete it and enforce that parameters are used.
+ WebMediaPlayerAction() = default;
WebMediaPlayerAction(Type type, bool enable) : type(type), enable(enable) {}
};
diff --git a/chromium/third_party/blink/public/web/web_media_stream_registry.h b/chromium/third_party/blink/public/web/web_media_stream_registry.h
deleted file mode 100644
index d0b7565e328..00000000000
--- a/chromium/third_party/blink/public/web/web_media_stream_registry.h
+++ /dev/null
@@ -1,48 +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_WEB_WEB_MEDIA_STREAM_REGISTRY_H_
-#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_MEDIA_STREAM_REGISTRY_H_
-
-#include "third_party/blink/public/platform/web_string.h"
-
-namespace blink {
-
-class WebMediaStream;
-class WebURL;
-
-class WebMediaStreamRegistry {
- public:
- BLINK_EXPORT static WebMediaStream LookupMediaStreamDescriptor(const WebURL&);
-};
-
-} // namespace blink
-
-#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_MEDIA_STREAM_REGISTRY_H_
diff --git a/chromium/third_party/blink/public/web/web_navigation_control.h b/chromium/third_party/blink/public/web/web_navigation_control.h
new file mode 100644
index 00000000000..5c51faef825
--- /dev/null
+++ b/chromium/third_party/blink/public/web/web_navigation_control.h
@@ -0,0 +1,147 @@
+// 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_WEB_WEB_NAVIGATION_CONTROL_H_
+#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_NAVIGATION_CONTROL_H_
+
+#include <memory>
+
+#include "base/unguessable_token.h"
+#include "third_party/blink/public/web/web_document_loader.h"
+#include "third_party/blink/public/web/web_frame_load_type.h"
+#include "third_party/blink/public/web/web_local_frame.h"
+
+namespace blink {
+
+class WebData;
+class WebString;
+class WebURL;
+struct WebURLError;
+class WebURLRequest;
+class WebHistoryItem;
+struct WebNavigationParams;
+
+// This interface gives control to navigation-related functionality of
+// WebLocalFrame. It is separated from WebLocalFrame to give precise control
+// over callers of navigation methods.
+// WebLocalFrameClient gets a reference to this interface in BindToFrame.
+class WebNavigationControl : public WebLocalFrame {
+ public:
+ ~WebNavigationControl() override {}
+
+ // Runs beforeunload handlers for this frame and its local descendants.
+ // Returns |true| if all the frames agreed to proceed with unloading
+ // from their respective event handlers.
+ // Note: this may lead to the destruction of the frame.
+ virtual bool DispatchBeforeUnloadEvent(bool is_reload) = 0;
+
+ // Commits a cross-document navigation in the frame. For history navigations,
+ // a valid WebHistoryItem should be provided.
+ // TODO(dgozman): return mojom::CommitResult.
+ virtual void CommitNavigation(
+ const WebURLRequest&,
+ WebFrameLoadType,
+ const WebHistoryItem&,
+ bool is_client_redirect,
+ const base::UnguessableToken& devtools_navigation_token,
+ std::unique_ptr<WebNavigationParams> navigation_params,
+ std::unique_ptr<WebDocumentLoader::ExtraData> extra_data) = 0;
+
+ // Commits a same-document navigation in the frame. For history navigations, a
+ // valid WebHistoryItem should be provided. Returns CommitResult::Ok if the
+ // navigation has actually committed.
+ virtual mojom::CommitResult CommitSameDocumentNavigation(
+ const WebURL&,
+ WebFrameLoadType,
+ const WebHistoryItem&,
+ bool is_client_redirect,
+ std::unique_ptr<WebDocumentLoader::ExtraData> extra_data) = 0;
+
+ // Loads a JavaScript URL in the frame.
+ // TODO(dgozman): this may replace the document, so perhaps we should
+ // return something meaningful?
+ virtual void LoadJavaScriptURL(const WebURL&) = 0;
+
+ // This method is short-hand for calling CommitDataNavigation, where mime_type
+ // is "text/html" and text_encoding is "UTF-8".
+ // TODO(dgozman): rename to CommitHTMLStringNavigation.
+ virtual void LoadHTMLString(const WebData& html,
+ const WebURL& base_url,
+ const WebURL& unreachable_url = WebURL()) = 0;
+
+ // Navigates to the given |data| with specified |mime_type| and optional
+ // |text_encoding|.
+ //
+ // If specified, |unreachable_url| is reported via
+ // WebDocumentLoader::UnreachableURL.
+ //
+ // If |replace| is false, then this data will be loaded as a normal
+ // navigation. Otherwise, the current history item will be replaced.
+ //
+ // Request's url indicates the security origin and is used as a base
+ // url to resolve links in the committed document.
+ virtual void CommitDataNavigation(
+ const WebURLRequest&,
+ const WebData&,
+ const WebString& mime_type,
+ const WebString& text_encoding,
+ const WebURL& unreachable_url,
+ WebFrameLoadType,
+ const WebHistoryItem&,
+ bool is_client_redirect,
+ std::unique_ptr<WebNavigationParams> navigation_params,
+ std::unique_ptr<WebDocumentLoader::ExtraData> navigation_data) = 0;
+
+ enum FallbackContentResult {
+ // An error page should be shown instead of fallback.
+ NoFallbackContent,
+ // Something else committed, no fallback content or error page needed.
+ NoLoadInProgress,
+ // Fallback content rendered, no error page needed.
+ FallbackRendered
+ };
+ // On load failure, attempts to make frame's parent render fallback content.
+ virtual FallbackContentResult MaybeRenderFallbackContent(
+ const WebURLError&) const = 0;
+
+ // When load failure is in a cross-process frame this notifies the frame here
+ // that its owner should render fallback content if any. Only called on owners
+ // that render their own content (i.e., <object>).
+ virtual void RenderFallbackContent() const = 0;
+
+ // Override the normal rules for whether a load has successfully committed
+ // in this frame. Used to propagate state when this frame has navigated
+ // cross process.
+ virtual void SetCommittedFirstRealLoad() = 0;
+
+ // Informs the frame that the navigation it asked the client to do was
+ // dropped.
+ virtual void ClientDroppedNavigation() = 0;
+
+ // Marks the frame as loading, without performing any loading. Used for
+ // initial history navigations in child frames, which may actually happen
+ // in another process.
+ virtual void MarkAsLoading() = 0;
+
+ // Marks the frame as loading and creates a placeholder document loader.
+ // This placeholder informs Blink that the navigation is ongoing, while it
+ // is actually being handled by the client.
+ // TODO(dgozman): remove this together with placeholder document loader.
+ virtual bool CreatePlaceholderDocumentLoader(
+ const WebURLRequest&,
+ WebFrameLoadType,
+ WebNavigationType,
+ bool is_client_redirect,
+ const base::UnguessableToken& devtools_navigation_token,
+ std::unique_ptr<WebNavigationParams>,
+ std::unique_ptr<WebDocumentLoader::ExtraData>) = 0;
+
+ protected:
+ explicit WebNavigationControl(WebTreeScopeType scope)
+ : WebLocalFrame(scope) {}
+};
+
+} // namespace blink
+
+#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_NAVIGATION_CONTROL_H_
diff --git a/chromium/third_party/blink/public/web/web_navigation_params.h b/chromium/third_party/blink/public/web/web_navigation_params.h
index 3ab4c5bd757..b32880710f1 100644
--- a/chromium/third_party/blink/public/web/web_navigation_params.h
+++ b/chromium/third_party/blink/public/web/web_navigation_params.h
@@ -7,19 +7,104 @@
#include <memory>
+#include "base/optional.h"
+#include "base/time/time.h"
+#include "mojo/public/cpp/system/message_pipe.h"
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_network_provider.h"
+#include "third_party/blink/public/platform/web_common.h"
+#include "third_party/blink/public/platform/web_content_security_policy.h"
#include "third_party/blink/public/platform/web_source_location.h"
+#include "third_party/blink/public/platform/web_string.h"
+#include "third_party/blink/public/platform/web_url_request.h"
+#include "third_party/blink/public/web/web_form_element.h"
+#include "third_party/blink/public/web/web_frame_load_type.h"
+#include "third_party/blink/public/web/web_navigation_policy.h"
#include "third_party/blink/public/web/web_navigation_timings.h"
+#include "third_party/blink/public/web/web_navigation_type.h"
+#include "third_party/blink/public/web/web_triggering_event_info.h"
namespace blink {
+// This structure holds all information collected by Blink when
+// navigation is being initiated.
+struct BLINK_EXPORT WebNavigationInfo {
+ WebNavigationInfo() = default;
+ ~WebNavigationInfo() = default;
+
+ // The main resource request.
+ WebURLRequest url_request;
+
+ // The navigation type. See WebNavigationType.
+ WebNavigationType navigation_type = kWebNavigationTypeOther;
+
+ // The navigation policy. See WebNavigationPolicy.
+ WebNavigationPolicy navigation_policy = kWebNavigationPolicyCurrentTab;
+
+ // Whether the frame had a transient user activation
+ // at the time this request was issued.
+ bool has_transient_user_activation = false;
+
+ // The load type. See WebFrameLoadType.
+ WebFrameLoadType frame_load_type = WebFrameLoadType::kStandard;
+
+ // During a history load, a child frame can be initially navigated
+ // to an url from the history state. This flag indicates it.
+ bool is_history_navigation_in_new_child_frame = false;
+
+ // Whether the navigation is a result of client redirect.
+ bool is_client_redirect = false;
+
+ // Whether this is a navigation in the opener frame initiated
+ // by the window.open'd frame.
+ bool is_opener_navigation = false;
+
+ // Event information. See WebTriggeringEventInfo.
+ WebTriggeringEventInfo triggering_event_info =
+ WebTriggeringEventInfo::kUnknown;
+
+ // If the navigation is a result of form submit, the form element is provided.
+ WebFormElement form;
+
+ // The location in the source which triggered the navigation.
+ // Used to help web developers understand what caused the navigation.
+ WebSourceLocation source_location;
+
+ // The initiator of this navigation used by DevTools.
+ WebString devtools_initiator_info;
+
+ // Whether this navigation should check CSP. See
+ // WebContentSecurityPolicyDisposition.
+ WebContentSecurityPolicyDisposition
+ should_check_main_world_content_security_policy =
+ kWebContentSecurityPolicyDispositionCheck;
+
+ // When navigating to a blob url, this token specifies the blob.
+ mojo::ScopedMessagePipeHandle blob_url_token;
+
+ // When navigation initiated from the user input, this tracks
+ // the input start time.
+ base::TimeTicks input_start;
+
+ // The navigation initiator, if any.
+ mojo::ScopedMessagePipeHandle navigation_initiator_handle;
+
+ // Specifies whether or not a MHTML Archive can be used to load a subframe
+ // resource instead of doing a network request.
+ enum class ArchiveStatus { Absent, Present };
+ ArchiveStatus archive_status = ArchiveStatus::Absent;
+
+ // The value of hrefTranslate attribute of a link, if this navigation was
+ // inititated by clicking a link.
+ WebString href_translate;
+};
+
// This structure holds all information provided by the embedder that is
// needed for blink to load a Document. This is hence different from
// WebDocumentLoader::ExtraData, which is an opaque structure stored in the
// DocumentLoader and used by the embedder.
-struct WebNavigationParams {
+struct BLINK_EXPORT WebNavigationParams {
WebNavigationTimings navigation_timings;
- WebSourceLocation source_location;
+ base::Optional<WebSourceLocation> source_location;
bool is_user_activated = false;
std::unique_ptr<blink::WebServiceWorkerNetworkProvider>
service_worker_network_provider;
diff --git a/chromium/third_party/blink/public/web/web_navigation_policy.h b/chromium/third_party/blink/public/web/web_navigation_policy.h
index b4abcb9c588..ed7b912d29b 100644
--- a/chromium/third_party/blink/public/web/web_navigation_policy.h
+++ b/chromium/third_party/blink/public/web/web_navigation_policy.h
@@ -34,14 +34,12 @@
namespace blink {
enum WebNavigationPolicy {
- kWebNavigationPolicyIgnore,
kWebNavigationPolicyDownload,
kWebNavigationPolicyCurrentTab,
kWebNavigationPolicyNewBackgroundTab,
kWebNavigationPolicyNewForegroundTab,
kWebNavigationPolicyNewWindow,
kWebNavigationPolicyNewPopup,
- kWebNavigationPolicyHandledByClient,
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/web/web_origin_trials.h b/chromium/third_party/blink/public/web/web_origin_trials.h
index e161570a9e7..2c79a0f3c09 100644
--- a/chromium/third_party/blink/public/web/web_origin_trials.h
+++ b/chromium/third_party/blink/public/web/web_origin_trials.h
@@ -12,13 +12,12 @@ namespace blink {
class WebDocument;
class WebString;
-// A namespace with tests for experimental features which can be enabled by the
+// A class with tests for experimental features which can be enabled by the
// origin trials framework via origin trial tokens.
-namespace WebOriginTrials {
-
-CORE_EXPORT bool isTrialEnabled(const WebDocument*, const WebString&);
-
-} // namespace WebOriginTrials
+class WebOriginTrials {
+ public:
+ CORE_EXPORT static bool isTrialEnabled(const WebDocument*, const WebString&);
+};
} // namespace blink
diff --git a/chromium/third_party/blink/public/web/web_performance.h b/chromium/third_party/blink/public/web/web_performance.h
index e6af94667ff..39d8d120b84 100644
--- a/chromium/third_party/blink/public/web/web_performance.h
+++ b/chromium/third_party/blink/public/web/web_performance.h
@@ -36,7 +36,7 @@
#include "third_party/blink/public/web/web_navigation_type.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 {
@@ -92,6 +92,10 @@ class WebPerformance {
BLINK_EXPORT double FirstContentfulPaint() const;
BLINK_EXPORT double FirstMeaningfulPaint() const;
BLINK_EXPORT double FirstMeaningfulPaintCandidate() const;
+ BLINK_EXPORT double LargestImagePaint() const;
+ BLINK_EXPORT double LastImagePaint() const;
+ BLINK_EXPORT double LargestTextPaint() const;
+ BLINK_EXPORT double LastTextPaint() const;
BLINK_EXPORT double PageInteractive() const;
BLINK_EXPORT double PageInteractiveDetection() const;
BLINK_EXPORT double FirstInputInvalidatingInteractive() const;
diff --git a/chromium/third_party/blink/public/web/web_plugin.h b/chromium/third_party/blink/public/web/web_plugin.h
index 7f36f0b69eb..017fa4666e3 100644
--- a/chromium/third_party/blink/public/web/web_plugin.h
+++ b/chromium/third_party/blink/public/web/web_plugin.h
@@ -105,7 +105,7 @@ class WebPlugin {
virtual bool CanProcessDrag() const { return false; }
- virtual void UpdateAllLifecyclePhases() = 0;
+ virtual void UpdateAllLifecyclePhases(WebWidget::LifecycleUpdateReason) = 0;
virtual void Paint(cc::PaintCanvas*, const WebRect&) = 0;
// Coordinates are relative to the containing window.
diff --git a/chromium/third_party/blink/public/web/web_range.h b/chromium/third_party/blink/public/web/web_range.h
index 9ee3d8ba379..5dd43263cd6 100644
--- a/chromium/third_party/blink/public/web/web_range.h
+++ b/chromium/third_party/blink/public/web/web_range.h
@@ -33,7 +33,7 @@
#include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK
-#include "third_party/blink/renderer/core/editing/forward.h"
+#include "third_party/blink/renderer/core/editing/forward.h" // nogncheck
#endif
namespace blink {
@@ -45,7 +45,7 @@ class Range;
class WebRange final {
public:
BLINK_EXPORT WebRange(int start, int length);
- BLINK_EXPORT WebRange() {}
+ BLINK_EXPORT WebRange();
int StartOffset() const { return start_; }
int EndOffset() const { return end_; }
diff --git a/chromium/third_party/blink/public/web/web_remote_frame.h b/chromium/third_party/blink/public/web/web_remote_frame.h
index 2d506698708..be3e7c20f0d 100644
--- a/chromium/third_party/blink/public/web/web_remote_frame.h
+++ b/chromium/third_party/blink/public/web/web_remote_frame.h
@@ -6,6 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_REMOTE_FRAME_H_
#include "third_party/blink/public/common/feature_policy/feature_policy.h"
+#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
#include "third_party/blink/public/common/frame/sandbox_flags.h"
#include "third_party/blink/public/common/frame/user_activation_update_type.h"
#include "third_party/blink/public/platform/web_content_security_policy.h"
@@ -56,12 +57,14 @@ class WebRemoteFrame : public WebFrame {
WebFrame* previous_sibling,
const ParsedFeaturePolicy&,
const WebFrameOwnerProperties&,
+ FrameOwnerElementType,
WebFrame* opener) = 0;
virtual WebRemoteFrame* CreateRemoteChild(WebTreeScopeType,
const WebString& name,
WebSandboxFlags,
const ParsedFeaturePolicy&,
+ FrameOwnerElementType,
WebRemoteFrameClient*,
WebFrame* opener) = 0;
@@ -140,6 +143,12 @@ class WebRemoteFrame : public WebFrame {
virtual WebRect GetCompositingRect() = 0;
+ // When a cross-process navigation or loading fails, the browser notifies the
+ // parent process to render its own fallback content if any. This only occurs
+ // if the owner element is capable of rendering its own fallback (e.g.,
+ // <object>).
+ virtual void RenderFallbackContent() const = 0;
+
protected:
explicit WebRemoteFrame(WebTreeScopeType scope) : WebFrame(scope) {}
diff --git a/chromium/third_party/blink/public/web/web_security_policy.h b/chromium/third_party/blink/public/web/web_security_policy.h
index d155e6d7896..d4e69c757a8 100644
--- a/chromium/third_party/blink/public/web/web_security_policy.h
+++ b/chromium/third_party/blink/public/web/web_security_policy.h
@@ -31,9 +31,9 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SECURITY_POLICY_H_
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SECURITY_POLICY_H_
-#include "services/network/public/mojom/cors.mojom-shared.h"
+#include "services/network/public/mojom/cors_origin_pattern.mojom-shared.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_referrer_policy.h"
namespace blink {
@@ -72,32 +72,23 @@ class WebSecurityPolicy {
// In the case where both an allowlist and blocklist rule of the same
// priority match a request the blocklist rule takes priority.
// Callers should use
- // network::mojom::CORSOriginAccessMatchPriority::kDefaultPriority as the
+ // network::mojom::CorsOriginAccessMatchPriority::kDefaultPriority as the
// default priority unless overriding existing entries is explicitly needed.
BLINK_EXPORT static void AddOriginAccessAllowListEntry(
const WebURL& source_origin,
const WebString& destination_protocol,
const WebString& destination_host,
bool allow_destination_subdomains,
- const network::mojom::CORSOriginAccessMatchPriority priority);
- BLINK_EXPORT static void ClearOriginAccessAllowListForOrigin(
- const WebURL& source_origin);
- BLINK_EXPORT static void ClearOriginAccessAllowList();
- BLINK_EXPORT static void ClearOriginAccessListForOrigin(
- const WebURL& source_origin);
-
+ const network::mojom::CorsOriginAccessMatchPriority priority);
BLINK_EXPORT static void AddOriginAccessBlockListEntry(
const WebURL& source_origin,
const WebString& destination_protocol,
const WebString& destination_host,
bool disallow_destination_subdomains,
- const network::mojom::CORSOriginAccessMatchPriority priority);
-
- BLINK_EXPORT static void AddOriginAccessBlockListEntry(
- const WebURL& source_origin,
- const WebString& destination_protocol,
- const WebString& destination_host,
- bool disallow_destination_subdomains);
+ const network::mojom::CorsOriginAccessMatchPriority priority);
+ BLINK_EXPORT static void ClearOriginAccessListForOrigin(
+ const WebURL& source_origin);
+ BLINK_EXPORT static void ClearOriginAccessList();
// Support for whitelisting origins or hostname patterns to treat them as
// trustworthy. This method does not do any canonicalization; the caller is
@@ -112,7 +103,7 @@ class WebSecurityPolicy {
// navigation to a given URL. If the referrer returned is empty, the
// referrer header should be omitted.
BLINK_EXPORT static WebString GenerateReferrerHeader(
- WebReferrerPolicy,
+ network::mojom::ReferrerPolicy,
const WebURL&,
const WebString& referrer);
diff --git a/chromium/third_party/blink/public/web/web_settings.h b/chromium/third_party/blink/public/web/web_settings.h
index e39112b0256..bc8f39fb9fe 100644
--- a/chromium/third_party/blink/public/web/web_settings.h
+++ b/chromium/third_party/blink/public/web/web_settings.h
@@ -49,25 +49,16 @@ class WebString;
// WebCore/page/Settings.h.
class WebSettings {
public:
- enum ImageAnimationPolicy {
- kImageAnimationPolicyAllowed,
- kImageAnimationPolicyAnimateOnce,
- kImageAnimationPolicyNoAnimation
- };
+ enum class ImageAnimationPolicy { kAllowed, kAnimateOnce, kNoAnimation };
- enum EditingBehavior {
- kEditingBehaviorMac,
- kEditingBehaviorWin,
- kEditingBehaviorUnix,
- kEditingBehaviorAndroid
- };
+ enum class EditingBehavior { kMac, kWin, kUnix, kAndroid };
- enum V8CacheOptions {
- kV8CacheOptionsDefault,
- kV8CacheOptionsNone,
- kV8CacheOptionsCode,
- kV8CacheOptionsCodeWithoutHeatCheck,
- kV8CacheOptionsFullCodeWithoutHeatCheck
+ enum class V8CacheOptions {
+ kDefault,
+ kNone,
+ kCode,
+ kCodeWithoutHeatCheck,
+ kFullCodeWithoutHeatCheck
};
enum class SavePreviousDocumentResources {
@@ -126,7 +117,6 @@ class WebSettings {
virtual bool ShrinksViewportContentToFit() const = 0;
virtual bool ViewportEnabled() const = 0;
virtual void SetAccelerated2dCanvasMSAASampleCount(int) = 0;
- virtual void SetAcceleratedCompositingEnabled(bool) = 0;
virtual void SetPreferCompositingToLCDTextEnabled(bool) = 0;
// Not implemented yet, see http://crbug.com/178119
virtual void SetAcceleratedCompositingForTransitionEnabled(bool) {}
@@ -225,7 +215,7 @@ class WebSettings {
virtual void SetAvailableHoverTypes(int) = 0;
virtual void SetPrimaryHoverType(HoverType) = 0;
virtual void SetPreferHiddenVolumeControls(bool) = 0;
- virtual void SetShouldThrottlePushState(bool) = 0;
+ virtual void SetShouldProtectAgainstIpcFlooding(bool) = 0;
virtual void SetRenderVSyncNotificationEnabled(bool) = 0;
virtual void SetReportScreenSizeInPhysicalPixelsQuirk(bool) = 0;
virtual void SetRubberBandingOnCompositorThread(bool) = 0;
@@ -297,6 +287,7 @@ class WebSettings {
virtual void SetDoNotUpdateSelectionOnMutatingSelectionRange(bool) = 0;
virtual void SetMediaDownloadInProductHelpEnabled(bool) = 0;
virtual void SetLowPriorityIframesThreshold(WebEffectiveConnectionType) = 0;
+ virtual void SetLazyLoadEnabled(bool) = 0;
virtual void SetLazyFrameLoadingDistanceThresholdPxUnknown(int) = 0;
virtual void SetLazyFrameLoadingDistanceThresholdPxOffline(int) = 0;
virtual void SetLazyFrameLoadingDistanceThresholdPxSlow2G(int) = 0;
diff --git a/chromium/third_party/blink/public/web/web_shared_worker_client.h b/chromium/third_party/blink/public/web/web_shared_worker_client.h
index 1a6f49d812b..4cc9627328f 100644
--- a/chromium/third_party/blink/public/web/web_shared_worker_client.h
+++ b/chromium/third_party/blink/public/web/web_shared_worker_client.h
@@ -80,7 +80,7 @@ class WebSharedWorkerClient {
// loading requests from the shared worker (e.g., fetch and XHR). Requests for
// script loading (i.e., the main script and importScripts) go through
// WebServiceWorkerNetworkProvider.
- virtual std::unique_ptr<WebWorkerFetchContext> CreateWorkerFetchContext(
+ virtual scoped_refptr<WebWorkerFetchContext> CreateWorkerFetchContext(
WebServiceWorkerNetworkProvider*) = 0;
// Called on the main thread during initialization. The browser process is
diff --git a/chromium/third_party/blink/public/web/web_surrounding_text.h b/chromium/third_party/blink/public/web/web_surrounding_text.h
index 3f63d9f028b..ae03edd9d77 100644
--- a/chromium/third_party/blink/public/web/web_surrounding_text.h
+++ b/chromium/third_party/blink/public/web/web_surrounding_text.h
@@ -26,7 +26,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SURROUNDING_TEXT_H_
#if INSIDE_BLINK
-#include "third_party/blink/renderer/core/editing/forward.h"
+#include "third_party/blink/renderer/core/editing/forward.h" // nogncheck
#endif
#include "third_party/blink/public/platform/web_string.h"
diff --git a/chromium/third_party/blink/public/web/web_text_direction.h b/chromium/third_party/blink/public/web/web_text_direction.h
index f8b4d677964..bebbf05d0f5 100644
--- a/chromium/third_party/blink/public/web/web_text_direction.h
+++ b/chromium/third_party/blink/public/web/web_text_direction.h
@@ -32,7 +32,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_TEXT_DIRECTION_H_
#if INSIDE_BLINK
-#include "third_party/blink/renderer/platform/text/text_direction.h"
+#include "third_party/blink/renderer/platform/text/text_direction.h" // nogncheck
#endif
namespace blink {
diff --git a/chromium/third_party/blink/public/web/web_view.h b/chromium/third_party/blink/public/web/web_view.h
index 68e82b2554c..e14420e7897 100644
--- a/chromium/third_party/blink/public/web/web_view.h
+++ b/chromium/third_party/blink/public/web/web_view.h
@@ -37,11 +37,13 @@
#include "third_party/blink/public/platform/web_drag_operation.h"
#include "third_party/blink/public/platform/web_focus_type.h"
#include "third_party/blink/public/platform/web_string.h"
-#include "third_party/blink/public/web/web_widget.h"
#include "third_party/skia/include/core/SkColor.h"
-namespace blink {
+namespace gfx {
+class Point;
+}
+namespace blink {
class PageScheduler;
class WebFrame;
class WebHitTestResult;
@@ -52,14 +54,17 @@ class WebRemoteFrame;
class WebSettings;
class WebString;
class WebViewClient;
+class WebWidget;
class WebWidgetClient;
struct WebDeviceEmulationParams;
struct WebFloatPoint;
+struct WebFloatSize;
struct WebPluginAction;
-struct WebPoint;
+struct WebRect;
+struct WebSize;
struct WebWindowFeatures;
-class WebView : protected WebWidget {
+class WebView {
public:
BLINK_EXPORT static const double kTextSizeMultiplierRatio;
BLINK_EXPORT static const double kMinTextSizeMultiplier;
@@ -70,39 +75,6 @@ class WebView : protected WebWidget {
kInjectStyleInTopFrameOnly
};
- // WebWidget overrides.
- using WebWidget::Close;
- using WebWidget::LifecycleUpdate;
- using WebWidget::Size;
- using WebWidget::Resize;
- using WebWidget::ResizeVisualViewport;
- using WebWidget::DidEnterFullscreen;
- using WebWidget::DidExitFullscreen;
- using WebWidget::BeginFrame;
- using WebWidget::UpdateAllLifecyclePhases;
- using WebWidget::UpdateLifecycle;
- using WebWidget::PaintContent;
- using WebWidget::LayoutAndPaintAsync;
- using WebWidget::CompositeAndReadbackAsync;
- using WebWidget::ThemeChanged;
- using WebWidget::HandleInputEvent;
- using WebWidget::DispatchBufferedTouchEvents;
- using WebWidget::SetCursorVisibilityState;
- using WebWidget::ApplyViewportChanges;
- using WebWidget::MouseCaptureLost;
- using WebWidget::SetFocus;
- using WebWidget::SelectionBounds;
- using WebWidget::IsAcceleratedCompositingActive;
- using WebWidget::IsWebView;
- using WebWidget::IsPagePopup;
- using WebWidget::WillCloseLayerTreeView;
- using WebWidget::DidAcquirePointerLock;
- using WebWidget::DidNotAcquirePointerLock;
- using WebWidget::DidLosePointerLock;
- using WebWidget::BackgroundColor;
- using WebWidget::GetPagePopup;
- using WebWidget::UpdateBrowserControlsState;
-
// Initialization ------------------------------------------------------
// Creates a WebView that is NOT yet initialized. To complete initialization,
@@ -278,6 +250,9 @@ class WebView : protected WebWidget {
// must be updated to at least layout before calling (see: |UpdateLifecycle|).
virtual WebSize ContentsPreferredMinimumSize() = 0;
+ // Requests a page-scale animation based on the specified point/rect.
+ virtual void AnimateDoubleTapZoom(const gfx::Point&, const WebRect&) = 0;
+
// Sets the display mode of the web app.
virtual void SetDisplayMode(WebDisplayMode) = 0;
@@ -316,19 +291,16 @@ class WebView : protected WebWidget {
// Performs the specified plugin action on the node at the given location.
virtual void PerformPluginAction(const WebPluginAction&,
- const WebPoint& location) = 0;
+ const gfx::Point& location) = 0;
// Notifies WebView when audio is started or stopped.
virtual void AudioStateChanged(bool is_audio_playing) = 0;
// Data exchange -------------------------------------------------------
- // Do a hit test at given point and return the HitTestResult.
- WebHitTestResult HitTestResultAt(const WebPoint&) override = 0;
-
// Do a hit test equivalent to what would be done for a GestureTap event
// that has width/height corresponding to the supplied |tapArea|.
- virtual WebHitTestResult HitTestResultForTap(const WebPoint& tap_point,
+ virtual WebHitTestResult HitTestResultForTap(const gfx::Point& tap_point,
const WebSize& tap_area) = 0;
// Support for resource loading initiated by plugins -------------------
@@ -401,6 +373,7 @@ class WebView : protected WebWidget {
// Sets the visibility of the WebView.
virtual void SetVisibilityState(mojom::PageVisibilityState visibility_state,
bool is_initial_state) {}
+ virtual mojom::PageVisibilityState VisibilityState() = 0;
// PageOverlay ----------------------------------------------------------
@@ -449,7 +422,7 @@ class WebView : protected WebWidget {
// TODO(lfg): Remove this once the refactor of WebView/WebWidget is
// completed.
- WebWidget* GetWidget() { return this; }
+ virtual WebWidget* MainFrameWidget() = 0;
protected:
~WebView() = default;
diff --git a/chromium/third_party/blink/public/web/web_view_client.h b/chromium/third_party/blink/public/web/web_view_client.h
index 27d49895a54..7617170e0a3 100644
--- a/chromium/third_party/blink/public/web/web_view_client.h
+++ b/chromium/third_party/blink/public/web/web_view_client.h
@@ -32,6 +32,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_VIEW_CLIENT_H_
#include "base/strings/string_piece.h"
+#include "third_party/blink/public/common/dom_storage/session_storage_namespace_id.h"
#include "third_party/blink/public/mojom/page/page_visibility_state.mojom-shared.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_ax_enums.h"
@@ -42,7 +43,6 @@
namespace blink {
class WebDateTimeChooserCompletion;
-class WebFileChooserCompletion;
class WebNode;
class WebURL;
class WebURLRequest;
@@ -66,13 +66,15 @@ class WebViewClient {
// could be fulfilled. The client should not load the request.
// The policy parameter indicates how the new view will be displayed in
// WebWidgetClient::show.
- virtual WebView* CreateView(WebLocalFrame* creator,
- const WebURLRequest& request,
- const WebWindowFeatures& features,
- const WebString& name,
- WebNavigationPolicy policy,
- bool suppress_opener,
- WebSandboxFlags) {
+ virtual WebView* CreateView(
+ WebLocalFrame* creator,
+ const WebURLRequest& request,
+ const WebWindowFeatures& features,
+ const WebString& name,
+ WebNavigationPolicy policy,
+ bool suppress_opener,
+ WebSandboxFlags,
+ const SessionStorageNamespaceId& session_storage_namespace_id) {
return nullptr;
}
@@ -92,15 +94,6 @@ class WebViewClient {
// should be printed.
virtual void PrintPage(WebLocalFrame*) {}
- // This method enumerates all the files in the path. It returns immediately
- // and asynchronously invokes the WebFileChooserCompletion with all the
- // files in the directory. Returns false if the WebFileChooserCompletion
- // will never be called.
- virtual bool EnumerateChosenDirectory(const WebString& path,
- WebFileChooserCompletion*) {
- return false;
- }
-
// Called when PageImportanceSignals for the WebView is updated.
virtual void PageImportanceSignalsChanged() {}
@@ -169,6 +162,10 @@ class WebViewClient {
// Called when the View acquires focus.
virtual void DidFocus(WebLocalFrame* calling_frame) {}
+ // Returns information about the screen where this view's widgets are being
+ // displayed.
+ virtual WebScreenInfo GetScreenInfo() = 0;
+
// Session history -----------------------------------------------------
// Tells the embedder to navigate back or forward in session history by
diff --git a/chromium/third_party/blink/public/web/web_widget.h b/chromium/third_party/blink/public/web/web_widget.h
index 04d10331fa1..ba20f614dc4 100644
--- a/chromium/third_party/blink/public/web/web_widget.h
+++ b/chromium/third_party/blink/public/web/web_widget.h
@@ -54,12 +54,14 @@ namespace cc {
struct ApplyViewportChangesArgs;
}
-namespace blink {
+namespace gfx {
+class Point;
+}
+namespace blink {
class WebCoalescedInputEvent;
class WebLayerTreeView;
class WebPagePopup;
-struct WebPoint;
class WebWidget {
public:
@@ -102,15 +104,23 @@ class WebWidget {
// Called to run through the entire set of document lifecycle phases needed
// to render a frame of the web widget. This MUST be called before Paint,
- // and it may result in calls to WebWidgetClient::didInvalidateRect.
- virtual void UpdateAllLifecyclePhases() { UpdateLifecycle(); }
-
- // By default, all phases are updated by |UpdateLifecycle| (e.g., style,
- // layout, prepaint, paint, etc. See: document_lifecycle.h). |LifecycleUpdate|
- // can be used to only update to a specific lifecycle phase.
+ // and it may result in calls to WebWidgetClient::DidInvalidateRect.
+ // |LifecycleUpdateReason| must be used to indicate the source of the
+ // update for the purposes of metrics gathering.
enum class LifecycleUpdate { kLayout, kPrePaint, kAll };
- virtual void UpdateLifecycle(
- LifecycleUpdate requested_update = LifecycleUpdate::kAll) {}
+ // This must be kept coordinated with DocumentLifecycle::LifecycleUpdateReason
+ enum class LifecycleUpdateReason { kBeginMainFrame, kTest, kOther };
+ virtual void UpdateAllLifecyclePhases(LifecycleUpdateReason reason) {
+ UpdateLifecycle(LifecycleUpdate::kAll, reason);
+ }
+
+ // UpdateLifecycle is used to update to a specific lifestyle phase, as given
+ // by |LifecycleUpdate|. To update all lifecycle phases, use
+ // UpdateAllLifecyclePhases.
+ // |LifecycleUpdateReason| must be used to indicate the source of the
+ // update for the purposes of metrics gathering.
+ virtual void UpdateLifecycle(LifecycleUpdate requested_update,
+ LifecycleUpdateReason reason) {}
// Synchronously performs the complete set of document lifecycle phases,
// including updates to the compositor state, optionally including
@@ -146,15 +156,19 @@ class WebWidget {
virtual void CompositeAndReadbackAsync(
base::OnceCallback<void(const SkBitmap&)> 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 RequestPresentationCallbackForTesting(
+ base::OnceClosure callback) {}
+
// Called to inform the WebWidget of a change in theme.
// Implementors that cache rendered copies of widgets need to re-render
// on receiving this message
virtual void ThemeChanged() {}
// Do a hit test at given point and return the WebHitTestResult.
- virtual WebHitTestResult HitTestResultAt(const WebPoint&) {
- return WebHitTestResult();
- }
+ virtual WebHitTestResult HitTestResultAt(const gfx::Point&) = 0;
// Called to inform the WebWidget of an input event.
virtual WebInputEventResult HandleInputEvent(const WebCoalescedInputEvent&) {
@@ -233,13 +247,6 @@ class WebWidget {
// but not the select popup.
virtual WebPagePopup* GetPagePopup() const { return 0; }
- // Updates browser controls constraints and current state. Allows embedder to
- // control what are valid states for browser controls and if it should
- // animate.
- virtual void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
- cc::BrowserControlsState current,
- bool animate) {}
-
// Called by client to request showing the context menu.
virtual void ShowContextMenu(WebMenuSourceType) {}
diff --git a/chromium/third_party/blink/public/web/web_widget_client.h b/chromium/third_party/blink/public/web/web_widget_client.h
index fb95d3311c0..2c4127359ad 100644
--- a/chromium/third_party/blink/public/web/web_widget_client.h
+++ b/chromium/third_party/blink/public/web/web_widget_client.h
@@ -31,13 +31,13 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_WIDGET_CLIENT_H_
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_WIDGET_CLIENT_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_drag_operation.h"
#include "third_party/blink/public/platform/web_intrinsic_sizing_info.h"
#include "third_party/blink/public/platform/web_layer_tree_view.h"
#include "third_party/blink/public/platform/web_point.h"
#include "third_party/blink/public/platform/web_rect.h"
-#include "third_party/blink/public/platform/web_referrer_policy.h"
#include "third_party/blink/public/platform/web_screen_info.h"
#include "third_party/blink/public/platform/web_touch_action.h"
#include "third_party/blink/public/web/web_meaningful_layout.h"
@@ -46,8 +46,11 @@
class SkBitmap;
-namespace blink {
+namespace gfx {
+class Point;
+}
+namespace blink {
class WebDragData;
class WebGestureEvent;
class WebString;
@@ -108,10 +111,6 @@ class WebWidgetClient {
// Called when a tooltip should be shown at the current cursor position.
virtual void SetToolTipText(const WebString&, WebTextDirection hint) {}
- // Called to query information about the screen where this widget is
- // displayed.
- virtual WebScreenInfo GetScreenInfo() { return WebScreenInfo(); }
-
// Requests to lock the mouse cursor. If true is returned, the success
// result will be asynchronously returned via a single call to
// WebWidget::didAcquirePointerLock() or
@@ -175,11 +174,15 @@ class WebWidgetClient {
virtual void ConvertWindowToViewport(WebFloatRect* rect) {}
// Called when a drag-and-drop operation should begin.
- virtual void StartDragging(WebReferrerPolicy,
+ virtual void StartDragging(network::mojom::ReferrerPolicy,
const WebDragData&,
WebDragOperationsMask,
const SkBitmap& drag_image,
- const WebPoint& drag_image_offset) {}
+ const gfx::Point& drag_image_offset) {}
+
+ // Double tap zooms a rect in the main-frame renderer.
+ virtual void AnimateDoubleTapZoomInMainFrame(const blink::WebPoint& point,
+ const blink::WebRect& bounds) {}
};
} // namespace blink
diff --git a/chromium/third_party/blink/public/web/worker_content_settings_proxy.mojom b/chromium/third_party/blink/public/web/worker_content_settings_proxy.mojom
index 9b22c742390..500a16a1e6a 100644
--- a/chromium/third_party/blink/public/web/worker_content_settings_proxy.mojom
+++ b/chromium/third_party/blink/public/web/worker_content_settings_proxy.mojom
@@ -16,7 +16,7 @@ interface WorkerContentSettingsProxy {
// Returns whether the worker is allowed access to IndexedDB.
[Sync]
- AllowIndexedDB(mojo_base.mojom.String16 name) => (bool result);
+ AllowIndexedDB() => (bool result);
// Returns whether the worker is allowed access to the file system.
[Sync]