#include "content/renderer/render_frame_impl.h"
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/auto_reset.h"
#include "base/check_deref.h"
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/containers/flat_map.h"
#include "base/debug/alias.h"
#include "base/debug/asan_invalid_access.h"
#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/feature_list.h"
#include "base/files/file.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ref.h"
#include "base/memory/weak_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/observer_list.h"
#include "base/process/process.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "base/types/optional_util.h"
#include "base/unguessable_token.h"
#include "base/uuid.h"
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "cc/base/switches.h"
#include "content/common/associated_interfaces.mojom.h"
#include "content/common/content_navigation_policy.h"
#include "content/common/content_switches_internal.h"
#include "content/common/debug_utils.h"
#include "content/common/features.h"
#include "content/common/frame.mojom.h"
#include "content/common/frame_messages.mojom.h"
#include "content/common/main_frame_counter.h"
#include "content/common/navigation_client.mojom.h"
#include "content/common/navigation_gesture.h"
#include "content/common/navigation_params_utils.h"
#include "content/common/renderer_host.mojom.h"
#include "content/common/web_package/signed_exchange_utils.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/extra_mojo_js_features.mojom.h"
#include "content/public/common/isolated_world_ids.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/url_utils.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/public/renderer/render_frame_visitor.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "content/public/renderer/window_features_converter.h"
#include "content/renderer/accessibility/aom_content_ax_tree.h"
#include "content/renderer/accessibility/ax_tree_snapshotter_impl.h"
#include "content/renderer/accessibility/render_accessibility_impl.h"
#include "content/renderer/accessibility/render_accessibility_manager.h"
#include "content/renderer/agent_scheduling_group.h"
#include "content/renderer/background_resource_fetch_assets.h"
#include "content/renderer/content_security_policy_util.h"
#include "content/renderer/document_state.h"
#include "content/renderer/dom_automation_controller.h"
#include "content/renderer/effective_connection_type_helper.h"
#include "content/renderer/frame_owner_properties_converter.h"
#include "content/renderer/gpu_benchmarking_extension.h"
#include "content/renderer/media/media_permission_dispatcher.h"
#include "content/renderer/mhtml_handle_writer.h"
#include "content/renderer/mojo/blink_interface_registry_impl.h"
#include "content/renderer/navigation_client.h"
#include "content/renderer/navigation_state.h"
#include "content/renderer/pepper/pepper_audio_controller.h"
#include "content/renderer/policy_container_util.h"
#include "content/renderer/render_process.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/renderer_blink_platform_impl.h"
#include "content/renderer/service_worker/service_worker_network_provider_for_frame.h"
#include "content/renderer/service_worker/web_service_worker_provider_impl.h"
#include "content/renderer/skia_benchmarking_extension.h"
#include "content/renderer/stats_collection_controller.h"
#include "content/renderer/v8_value_converter_impl.h"
#include "content/renderer/web_ui_extension.h"
#include "content/renderer/web_ui_extension_data.h"
#include "content/renderer/worker/dedicated_worker_host_factory_client.h"
#include "crypto/sha2.h"
#include "ipc/ipc_message.h"
#include "media/mojo/mojom/audio_processing.mojom.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_associated_remote.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "net/base/data_url.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_util.h"
#include "ppapi/buildflags/buildflags.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/not_implemented_url_loader_factory.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/public/mojom/fetch_api.mojom.h"
#include "services/network/public/mojom/restricted_cookie_manager.mojom.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "services/service_manager/public/mojom/interface_provider.mojom.h"
#include "services/viz/public/cpp/gpu/context_provider_command_buffer.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/chrome_debug_urls.h"
#include "third_party/blink/public/common/context_menu_data/context_menu_data.h"
#include "third_party/blink/public/common/context_menu_data/untrustworthy_context_menu_params.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/input/web_keyboard_event.h"
#include "third_party/blink/public/common/interest_group/ad_auction_constants.h"
#include "third_party/blink/public/common/loader/loader_constants.h"
#include "third_party/blink/public/common/loader/record_load_histograms.h"
#include "third_party/blink/public/common/loader/resource_type_util.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
#include "third_party/blink/public/common/navigation/impression.h"
#include "third_party/blink/public/common/navigation/navigation_params.h"
#include "third_party/blink/public/common/navigation/navigation_params_mojom_traits.h"
#include "third_party/blink/public/common/navigation/navigation_policy.h"
#include "third_party/blink/public/common/page_state/page_state.h"
#include "third_party/blink/public/common/permissions_policy/permissions_policy.h"
#include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
#include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
#include "third_party/blink/public/mojom/blob/blob.mojom.h"
#include "third_party/blink/public/mojom/blob/blob_url_store.mojom.h"
#include "third_party/blink/public/mojom/choosers/file_chooser.mojom.h"
#include "third_party/blink/public/mojom/dom_storage/storage_area.mojom.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
#include "third_party/blink/public/mojom/frame/frame.mojom.h"
#include "third_party/blink/public/mojom/frame/frame_owner_properties.mojom.h"
#include "third_party/blink/public/mojom/frame/user_activation_notification_type.mojom.h"
#include "third_party/blink/public/mojom/frame/user_activation_update_types.mojom.h"
#include "third_party/blink/public/mojom/frame/view_transition_state.mojom.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom.h"
#include "third_party/blink/public/mojom/input/input_handler.mojom-shared.h"
#include "third_party/blink/public/mojom/loader/fetch_later.mojom.h"
#include "third_party/blink/public/mojom/loader/referrer.mojom.h"
#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom.h"
#include "third_party/blink/public/mojom/navigation/navigation_params.mojom.h"
#include "third_party/blink/public/mojom/page/widget.mojom.h"
#include "third_party/blink/public/mojom/permissions/permission.mojom.h"
#include "third_party/blink/public/mojom/render_accessibility.mojom.h"
#include "third_party/blink/public/mojom/renderer_preference_watcher.mojom.h"
#include "third_party/blink/public/mojom/widget/platform_widget.mojom.h"
#include "third_party/blink/public/platform/file_path_conversion.h"
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_network_provider.h"
#include "third_party/blink/public/platform/resource_load_info_notifier_wrapper.h"
#include "third_party/blink/public/platform/scheduler/web_agent_group_scheduler.h"
#include "third_party/blink/public/platform/tracked_child_url_loader_factory_bundle.h"
#include "third_party/blink/public/platform/url_conversion.h"
#include "third_party/blink/public/platform/weak_wrapper_resource_load_info_notifier.h"
#include "third_party/blink/public/platform/web_data.h"
#include "third_party/blink/public/platform/web_dedicated_or_shared_worker_fetch_context.h"
#include "third_party/blink/public/platform/web_http_body.h"
#include "third_party/blink/public/platform/web_media_player.h"
#include "third_party/blink/public/platform/web_media_player_source.h"
#include "third_party/blink/public/platform/web_navigation_body_loader.h"
#include "third_party/blink/public/platform/web_runtime_features.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_error.h"
#include "third_party/blink/public/platform/web_url_request_extra_data.h"
#include "third_party/blink/public/platform/web_url_request_util.h"
#include "third_party/blink/public/platform/web_url_response.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/public/web/blink.h"
#include "third_party/blink/public/web/modules/media/audio/audio_device_factory.h"
#include "third_party/blink/public/web/modules/media/audio/audio_output_ipc_factory.h"
#include "third_party/blink/public/web/modules/media/web_media_player_util.h"
#include "third_party/blink/public/web/modules/mediastream/web_media_stream_device_observer.h"
#include "third_party/blink/public/web/web_autofill_client.h"
#include "third_party/blink/public/web/web_console_message.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_element_collection.h"
#include "third_party/blink/public/web/web_frame_owner_properties.h"
#include "third_party/blink/public/web/web_frame_serializer.h"
#include "third_party/blink/public/web/web_frame_widget.h"
#include "third_party/blink/public/web/web_input_method_controller.h"
#include "third_party/blink/public/web/web_link_preview_triggerer.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_navigation_control.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_performance_metrics_for_nested_contexts.h"
#include "third_party/blink/public/web/web_picture_in_picture_window_options.h"
#include "third_party/blink/public/web/web_plugin.h"
#include "third_party/blink/public/web/web_plugin_container.h"
#include "third_party/blink/public/web/web_plugin_document.h"
#include "third_party/blink/public/web/web_plugin_params.h"
#include "third_party/blink/public/web/web_range.h"
#include "third_party/blink/public/web/web_remote_frame.h"
#include "third_party/blink/public/web/web_savable_resources_test_support.h"
#include "third_party/blink/public/web/web_script_source.h"
#include "third_party/blink/public/web/web_searchable_form_data.h"
#include "third_party/blink/public/web/web_security_policy.h"
#include "third_party/blink/public/web/web_serialized_script_value.h"
#include "third_party/blink/public/web/web_settings.h"
#include "third_party/blink/public/web/web_v8_features.h"
#include "third_party/blink/public/web/web_view.h"
#include "third_party/blink/public/web/web_widget.h"
#include "third_party/blink/public/web/web_window_features.h"
#include "ui/accessibility/ax_tree_update.h"
#include "ui/events/base_event_utils.h"
#include "url/origin.h"
#include "url/url_constants.h"
#include "url/url_util.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-local-handle.h"
#include "v8/include/v8-microtask-queue.h"
#if BUILDFLAG(ENABLE_PPAPI)
#include "content/renderer/pepper/pepper_browser_connection.h"
#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
#include "content/renderer/pepper/pepper_plugin_registry.h"
#include "content/renderer/pepper/pepper_webplugin_impl.h"
#include "content/renderer/pepper/plugin_module.h"
#endif
#if BUILDFLAG(IS_ANDROID)
#include <cpu-features.h>
#include "content/renderer/java/gin_java_bridge_dispatcher.h"
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
#endif
Time;
ContextMenuData;
WebContentDecryptionModule;
WebData;
WebDocument;
WebDocumentLoader;
WebDOMMessageEvent;
WebElement;
WebElementCollection;
WebFrame;
WebFrameLoadType;
WebFrameSerializer;
WebFrameSerializerClient;
WebHistoryItem;
WebHTTPBody;
WebLocalFrame;
WebMediaPlayer;
WebMediaPlayerClient;
WebMediaPlayerEncryptedMediaClient;
WebNavigationParams;
WebNavigationPolicy;
WebNavigationType;
WebNode;
WebPluginDocument;
WebPluginParams;
WebRange;
WebScriptSource;
WebSearchableFormData;
WebSecurityOrigin;
WebSecurityPolicy;
WebSerializedScriptValue;
WebServiceWorkerProvider;
WebSettings;
WebString;
WebThreadSafeData;
WebURL;
WebURLError;
WebURLRequest;
WebURLResponse;
WebVector;
WebView;
SelectionMenuBehavior;
ReferrerPolicy;
namespace content {
namespace {
const int kExtraCharsBeforeAndAfterSelection = …;
const size_t kMaxURLLogChars = …;
const char kCommitRenderFrame[] = …;
constexpr base::TimeDelta kDelaySecondsForContentStateSyncHidden = …;
constexpr base::TimeDelta kDelaySecondsForContentStateSync = …;
#if BUILDFLAG(CONTENT_ENABLE_LEGACY_IPC)
typedef std::map<int, RenderFrameImpl*> RoutingIDFrameMap;
static base::LazyInstance<RoutingIDFrameMap>::DestructorAtExit
g_routing_id_frame_map = LAZY_INSTANCE_INITIALIZER;
#endif
FrameMap;
base::LazyInstance<FrameMap>::DestructorAtExit g_frame_map = …;
enum class RendererBlockedURLReason { … };
int64_t ExtractPostId(const WebHistoryItem& item) { … }
std::string TrimURL(const std::string& url) { … }
ui::PageTransition GetTransitionType(ui::PageTransition default_transition,
bool replaces_current_item,
bool is_main_frame,
bool is_in_fenced_frame_tree,
WebNavigationType navigation_type) { … }
ui::PageTransition GetTransitionType(blink::WebDocumentLoader* document_loader,
bool is_main_frame,
bool is_in_fenced_frame_tree) { … }
bool IsValidCommitUrl(const GURL& url) { … }
bool MaybeGetOverriddenURL(WebDocumentLoader* document_loader, GURL* output) { … }
bool IsTopLevelNavigation(WebFrame* frame) { … }
void FillNavigationParamsRequest(
const blink::mojom::CommonNavigationParams& common_params,
const blink::mojom::CommitNavigationParams& commit_params,
blink::WebNavigationParams* navigation_params) { … }
blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams(
const WebSecurityOrigin& current_origin,
std::unique_ptr<blink::WebNavigationInfo> info,
int load_flags,
bool has_download_sandbox_flag,
bool from_ad,
bool is_history_navigation_in_new_child_frame,
network::mojom::RequestDestination request_destination) { … }
WebFrameLoadType NavigationTypeToLoadType(
blink::mojom::NavigationType navigation_type,
bool should_replace_current_entry) { … }
RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = …;
WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { … }
class RenderFrameWebFrameSerializerClient
: public blink::WebFrameSerializerClient { … };
class LinkRewritingDelegate : public WebFrameSerializer::LinkRewritingDelegate { … };
class MHTMLPartsGenerationDelegate
: public WebFrameSerializer::MHTMLPartsGenerationDelegate { … };
bool IsHttpPost(const blink::WebURLRequest& request) { … }
class MHTMLHandleWriterDelegate { … };
mojo::PendingRemote<blink::mojom::BlobURLToken> CloneBlobURLToken(
blink::CrossVariantMojoRemote<blink::mojom::BlobURLTokenInterfaceBase>&
blob_url_token) { … }
std::unique_ptr<DocumentState> BuildDocumentState() { … }
std::unique_ptr<DocumentState> BuildDocumentStateFromParams(
const blink::mojom::CommonNavigationParams& common_params,
const blink::mojom::CommitNavigationParams& commit_params,
mojom::NavigationClient::CommitNavigationCallback commit_callback,
std::unique_ptr<NavigationClient> navigation_client,
int request_id,
bool was_initiated_in_this_frame) { … }
std::optional<WebURL> ApplyFilePathAlias(const WebURL& target) { … }
blink::WebNavigationTimings BuildNavigationTimings(
base::TimeTicks navigation_start,
const blink::mojom::NavigationTiming& browser_navigation_timings,
base::TimeTicks input_start) { … }
WebHistoryItem NavigationApiHistoryEntryPtrToWebHistoryItem(
const blink::mojom::NavigationApiHistoryEntry& entry) { … }
void FillMiscNavigationParams(
const blink::mojom::CommonNavigationParams& common_params,
blink::mojom::CommitNavigationParams& commit_params,
blink::WebNavigationParams* navigation_params) { … }
std::string GetUniqueNameOfWebFrame(WebFrame* web_frame) { … }
perfetto::protos::pbzero::FrameDeleteIntention FrameDeleteIntentionToProto(
mojom::FrameDeleteIntention intent) { … }
void CallClientDeferMediaLoad(base::WeakPtr<RenderFrameImpl> frame,
bool has_played_media_before,
base::OnceClosure closure) { … }
void LogCommitHistograms(base::TimeTicks commit_sent,
bool is_main_frame,
const GURL& new_page_url) { … }
content::mojom::WindowContainerType WindowFeaturesToContainerType(
const blink::WebWindowFeatures& window_features) { … }
WindowOpenDisposition NavigationPolicyToDisposition(
WebNavigationPolicy policy) { … }
bool ShouldNotifySubresourceResponseStarted(blink::RendererPreferences pref) { … }
void InitializeFrameWidgetForFrame(
WebLocalFrame& frame,
blink::WebFrameWidget* previous_widget,
mojom::CreateFrameWidgetParamsPtr widget_params,
const bool is_for_nested_main_frame) { … }
}
RenderFrameImpl::AssertNavigationCommits::AssertNavigationCommits(
RenderFrameImpl* frame)
: … { … }
RenderFrameImpl::AssertNavigationCommits::AssertNavigationCommits(
RenderFrameImpl* frame,
MayReplaceInitialEmptyDocumentTag)
: … { … }
RenderFrameImpl::AssertNavigationCommits::~AssertNavigationCommits() { … }
RenderFrameImpl::AssertNavigationCommits::AssertNavigationCommits(
RenderFrameImpl* frame,
bool allow_transition_from_initial_empty_document)
: … { … }
class RenderFrameImpl::MHTMLBodyLoaderClient
: public blink::WebNavigationBodyLoader::Client { … };
RenderFrameImpl::UniqueNameFrameAdapter::UniqueNameFrameAdapter(
RenderFrameImpl* render_frame)
: … { … }
RenderFrameImpl::UniqueNameFrameAdapter::~UniqueNameFrameAdapter() { … }
bool RenderFrameImpl::UniqueNameFrameAdapter::IsMainFrame() const { … }
bool RenderFrameImpl::UniqueNameFrameAdapter::IsCandidateUnique(
std::string_view name) const { … }
int RenderFrameImpl::UniqueNameFrameAdapter::GetSiblingCount() const { … }
int RenderFrameImpl::UniqueNameFrameAdapter::GetChildCount() const { … }
std::vector<std::string>
RenderFrameImpl::UniqueNameFrameAdapter::CollectAncestorNames(
BeginPoint begin_point,
bool (*should_stop)(std::string_view)) const { … }
std::vector<int> RenderFrameImpl::UniqueNameFrameAdapter::GetFramePosition(
BeginPoint begin_point) const { … }
blink::WebLocalFrame* RenderFrameImpl::UniqueNameFrameAdapter::GetWebFrame()
const { … }
RenderFrameImpl* RenderFrameImpl::Create(
AgentSchedulingGroup& agent_scheduling_group,
const blink::LocalFrameToken& frame_token,
int32_t routing_id,
mojo::PendingAssociatedReceiver<mojom::Frame> frame_receiver,
mojo::PendingAssociatedRemote<blink::mojom::AssociatedInterfaceProvider>
associated_interface_provider,
const base::UnguessableToken& devtools_frame_token,
bool is_for_nested_main_frame) { … }
#if BUILDFLAG(CONTENT_ENABLE_LEGACY_IPC)
RenderFrame* RenderFrame::FromRoutingID(int routing_id) {
return RenderFrameImpl::FromRoutingID(routing_id);
}
RenderFrameImpl* RenderFrameImpl::FromRoutingID(int routing_id) {
DCHECK(RenderThread::IsMainThread());
auto iter = g_routing_id_frame_map.Get().find(routing_id);
if (iter != g_routing_id_frame_map.Get().end())
return iter->second;
return nullptr;
}
#endif
RenderFrameImpl* RenderFrameImpl::CreateMainFrame(
AgentSchedulingGroup& agent_scheduling_group,
blink::WebView* web_view,
blink::WebFrame* opener,
bool is_for_nested_main_frame,
bool is_for_scalable_page,
blink::mojom::FrameReplicationStatePtr replication_state,
const base::UnguessableToken& devtools_frame_token,
mojom::CreateLocalMainFrameParamsPtr params,
const blink::WebURL& base_url) { … }
void RenderFrameImpl::CreateFrame(
AgentSchedulingGroup& agent_scheduling_group,
const blink::LocalFrameToken& frame_token,
int routing_id,
mojo::PendingAssociatedReceiver<mojom::Frame> frame_receiver,
mojo::PendingRemote<blink::mojom::BrowserInterfaceBroker>
browser_interface_broker,
mojo::PendingAssociatedRemote<blink::mojom::AssociatedInterfaceProvider>
associated_interface_provider,
blink::WebView* web_view,
const std::optional<blink::FrameToken>& previous_frame_token,
const std::optional<blink::FrameToken>& opener_frame_token,
const std::optional<blink::FrameToken>& parent_frame_token,
const std::optional<blink::FrameToken>& previous_sibling_frame_token,
const base::UnguessableToken& devtools_frame_token,
blink::mojom::TreeScopeType tree_scope_type,
blink::mojom::FrameReplicationStatePtr replicated_state,
mojom::CreateFrameWidgetParamsPtr widget_params,
blink::mojom::FrameOwnerPropertiesPtr frame_owner_properties,
bool is_on_initial_empty_document,
const blink::DocumentToken& document_token,
blink::mojom::PolicyContainerPtr policy_container,
bool is_for_nested_main_frame) { … }
RenderFrame* RenderFrame::FromWebFrame(blink::WebLocalFrame* web_frame) { … }
void RenderFrame::ForEach(RenderFrameVisitor* visitor) { … }
RenderFrameImpl* RenderFrameImpl::FromWebFrame(blink::WebFrame* web_frame) { … }
void RenderFrameImpl::InstallCreateHook(
CreateRenderFrameImplFunction create_frame) { … }
blink::WebURL RenderFrameImpl::OverrideFlashEmbedWithHTML(
const blink::WebURL& url) { … }
RenderFrameImpl::CreateParams::CreateParams(
AgentSchedulingGroup& agent_scheduling_group,
const blink::LocalFrameToken& frame_token,
int32_t routing_id,
mojo::PendingAssociatedReceiver<mojom::Frame> frame_receiver,
mojo::PendingAssociatedRemote<blink::mojom::AssociatedInterfaceProvider>
associated_interface_provider,
const base::UnguessableToken& devtools_frame_token,
bool is_for_nested_main_frame)
: … { … }
RenderFrameImpl::CreateParams::~CreateParams() = default;
RenderFrameImpl::CreateParams::CreateParams(CreateParams&&) = default;
RenderFrameImpl::CreateParams& RenderFrameImpl::CreateParams::operator=(
CreateParams&&) = default;
RenderFrameImpl::RenderFrameImpl(CreateParams params)
: … { … }
mojom::FrameHost* RenderFrameImpl::GetFrameHost() { … }
RenderFrameImpl::~RenderFrameImpl() { … }
void RenderFrameImpl::Initialize(blink::WebFrame* parent) { … }
void RenderFrameImpl::GetInterface(
const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe) { … }
blink::WebFrameWidget* RenderFrameImpl::GetLocalRootWebFrameWidget() { … }
#if BUILDFLAG(ENABLE_PPAPI)
void RenderFrameImpl::PepperPluginCreated(RendererPpapiHost* host) {
for (auto& observer : observers_)
observer.DidCreatePepperPlugin(host);
}
void RenderFrameImpl::PepperTextInputTypeChanged(
PepperPluginInstanceImpl* instance) {
if (instance != focused_pepper_plugin_)
return;
GetLocalRootWebFrameWidget()->UpdateTextInputState();
}
void RenderFrameImpl::PepperCaretPositionChanged(
PepperPluginInstanceImpl* instance) {
if (instance != focused_pepper_plugin_)
return;
GetLocalRootWebFrameWidget()->UpdateSelectionBounds();
}
void RenderFrameImpl::PepperCancelComposition(
PepperPluginInstanceImpl* instance) {
if (instance != focused_pepper_plugin_)
return;
GetLocalRootWebFrameWidget()->CancelCompositionForPepper();
}
void RenderFrameImpl::PepperSelectionChanged(
PepperPluginInstanceImpl* instance) {
if (instance != focused_pepper_plugin_)
return;
SyncSelectionIfRequired(blink::SyncCondition::kNotForced);
}
#endif
void RenderFrameImpl::ScriptedPrint() { … }
#if BUILDFLAG(CONTENT_ENABLE_LEGACY_IPC)
bool RenderFrameImpl::Send(IPC::Message* message) {
return agent_scheduling_group_->Send(message);
}
bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) {
if (!frame_)
return false;
DCHECK(!frame_->GetDocument().IsNull());
GetContentClient()->SetActiveURL(
frame_->GetDocument().Url(),
frame_->Top()->GetSecurityOrigin().ToString().Utf8());
for (auto& observer : observers_) {
if (observer.OnMessageReceived(msg))
return true;
}
return false;
}
#endif
void RenderFrameImpl::OnAssociatedInterfaceRequest(
const std::string& interface_name,
mojo::ScopedInterfaceEndpointHandle handle) { … }
void RenderFrameImpl::SetUpSharedMemoryForSmoothness(
base::ReadOnlySharedMemoryRegion shared_memory) { … }
void RenderFrameImpl::BindAutoplayConfiguration(
mojo::PendingAssociatedReceiver<blink::mojom::AutoplayConfigurationClient>
receiver) { … }
void RenderFrameImpl::BindFrameBindingsControl(
mojo::PendingAssociatedReceiver<mojom::FrameBindingsControl> receiver) { … }
void RenderFrameImpl::BindNavigationClient(
mojo::PendingAssociatedReceiver<mojom::NavigationClient> receiver) { … }
void RenderFrameImpl::Unload(
bool is_loading,
blink::mojom::FrameReplicationStatePtr replicated_frame_state,
const blink::RemoteFrameToken& proxy_frame_token,
blink::mojom::RemoteFrameInterfacesFromBrowserPtr remote_frame_interfaces,
blink::mojom::RemoteMainFrameInterfacesPtr remote_main_frame_interfaces) { … }
void RenderFrameImpl::Delete(mojom::FrameDeleteIntention intent) { … }
void RenderFrameImpl::UndoCommitNavigation(
bool is_loading,
blink::mojom::FrameReplicationStatePtr replicated_frame_state,
const blink::RemoteFrameToken& proxy_frame_token,
blink::mojom::RemoteFrameInterfacesFromBrowserPtr remote_frame_interfaces,
blink::mojom::RemoteMainFrameInterfacesPtr remote_main_frame_interfaces) { … }
void RenderFrameImpl::SnapshotAccessibilityTree(
mojom::SnapshotAccessibilityTreeParamsPtr params,
SnapshotAccessibilityTreeCallback callback) { … }
void RenderFrameImpl::GetSerializedHtmlWithLocalLinks(
const base::flat_map<GURL, base::FilePath>& url_map,
const base::flat_map<blink::FrameToken, base::FilePath>& frame_token_map,
bool save_with_empty_url,
mojo::PendingRemote<mojom::FrameHTMLSerializerHandler> handler_remote) { … }
void RenderFrameImpl::SetWantErrorMessageStackTrace() { … }
void RenderFrameImpl::NotifyObserversOfFailedProvisionalLoad() { … }
void RenderFrameImpl::DidMeaningfulLayout(
blink::WebMeaningfulLayout layout_type) { … }
void RenderFrameImpl::DidCommitAndDrawCompositorFrame() { … }
RenderFrame* RenderFrameImpl::GetMainRenderFrame() { … }
RenderAccessibility* RenderFrameImpl::GetRenderAccessibility() { … }
std::unique_ptr<AXTreeSnapshotter> RenderFrameImpl::CreateAXTreeSnapshotter(
ui::AXMode ax_mode) { … }
#if BUILDFLAG(CONTENT_ENABLE_LEGACY_IPC)
int RenderFrameImpl::GetRoutingID() {
return routing_id_;
}
#endif
blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() { … }
const blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() const { … }
blink::WebView* RenderFrameImpl::GetWebView() { … }
const blink::WebView* RenderFrameImpl::GetWebView() const { … }
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { … }
const blink::RendererPreferences& RenderFrameImpl::GetRendererPreferences()
const { … }
void RenderFrameImpl::ShowVirtualKeyboard() { … }
blink::WebPlugin* RenderFrameImpl::CreatePlugin(
const WebPluginInfo& info,
const blink::WebPluginParams& params) { … }
void RenderFrameImpl::ExecuteJavaScript(const std::u16string& javascript) { … }
void RenderFrameImpl::BindLocalInterface(
const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe) { … }
blink::AssociatedInterfaceRegistry*
RenderFrameImpl::GetAssociatedInterfaceRegistry() { … }
blink::AssociatedInterfaceProvider*
RenderFrameImpl::GetRemoteAssociatedInterfaces() { … }
void RenderFrameImpl::SetSelectedText(const std::u16string& selection_text,
size_t offset,
const gfx::Range& range) { … }
void RenderFrameImpl::AddMessageToConsole(
blink::mojom::ConsoleMessageLevel level,
const std::string& message) { … }
bool RenderFrameImpl::IsPasting() { … }
void RenderFrameImpl::AddAutoplayFlags(const url::Origin& origin,
const int32_t flags) { … }
#if BUILDFLAG(IS_ANDROID)
void RenderFrameImpl::NotifyUpdateUserGestureCarryoverInfo() {
GetFrameHost()->UpdateUserGestureCarryoverInfo();
}
#endif
void RenderFrameImpl::NotifyResourceRedirectReceived(
const net::RedirectInfo& redirect_info,
network::mojom::URLResponseHeadPtr redirect_response) { … }
void RenderFrameImpl::NotifyResourceResponseReceived(
int64_t request_id,
const url::SchemeHostPort& final_response_url,
network::mojom::URLResponseHeadPtr response_head,
network::mojom::RequestDestination request_destination,
bool is_ad_resource) { … }
void RenderFrameImpl::NotifyResourceTransferSizeUpdated(
int64_t request_id,
int32_t transfer_size_diff) { … }
void RenderFrameImpl::NotifyResourceLoadCompleted(
blink::mojom::ResourceLoadInfoPtr resource_load_info,
const network::URLLoaderCompletionStatus& status) { … }
void RenderFrameImpl::NotifyResourceLoadCanceled(int64_t request_id) { … }
void RenderFrameImpl::Clone(
mojo::PendingReceiver<blink::mojom::ResourceLoadInfoNotifier>
pending_resource_load_info_notifier) { … }
void RenderFrameImpl::GetInterfaceProvider(
mojo::PendingReceiver<service_manager::mojom::InterfaceProvider> receiver) { … }
void RenderFrameImpl::AllowBindings(int64_t enabled_bindings_flags) { … }
void RenderFrameImpl::EnableMojoJsBindings(
content::mojom::ExtraMojoJsFeaturesPtr features) { … }
void RenderFrameImpl::EnableMojoJsBindingsWithBroker(
mojo::PendingRemote<blink::mojom::BrowserInterfaceBroker> broker) { … }
void RenderFrameImpl::BindWebUI(
mojo::PendingAssociatedReceiver<mojom::WebUI> receiver,
mojo::PendingAssociatedRemote<mojom::WebUIHost> remote) { … }
void RenderFrameImpl::SetOldPageLifecycleStateFromNewPageCommitIfNeeded(
const blink::mojom::OldPageInfo* old_page_info,
const GURL& new_page_url) { … }
void RenderFrameImpl::CommitNavigation(
blink::mojom::CommonNavigationParamsPtr common_params,
blink::mojom::CommitNavigationParamsPtr commit_params,
network::mojom::URLResponseHeadPtr response_head,
mojo::ScopedDataPipeConsumerHandle response_body,
network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
subresource_loader_factories,
std::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
subresource_overrides,
blink::mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info,
blink::mojom::ServiceWorkerContainerInfoForClientPtr container_info,
mojo::PendingRemote<network::mojom::URLLoaderFactory>
subresource_proxying_loader_factory,
mojo::PendingRemote<network::mojom::URLLoaderFactory>
keep_alive_loader_factory,
mojo::PendingAssociatedRemote<blink::mojom::FetchLaterLoaderFactory>
fetch_later_loader_factory,
const blink::DocumentToken& document_token,
const base::UnguessableToken& devtools_navigation_token,
const base::Uuid& base_auction_nonce,
const std::optional<blink::ParsedPermissionsPolicy>& permissions_policy,
blink::mojom::PolicyContainerPtr policy_container,
mojo::PendingRemote<blink::mojom::CodeCacheHost> code_cache_host,
mojo::PendingRemote<blink::mojom::CodeCacheHost>
code_cache_host_for_background,
mojom::CookieManagerInfoPtr cookie_manager_info,
mojom::StorageInfoPtr storage_info,
mojom::NavigationClient::CommitNavigationCallback commit_callback) { … }
void RenderFrameImpl::CommitNavigationWithParams(
blink::mojom::CommonNavigationParamsPtr common_params,
blink::mojom::CommitNavigationParamsPtr commit_params,
std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
subresource_loader_factories,
std::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
subresource_overrides,
blink::mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info,
blink::mojom::ServiceWorkerContainerInfoForClientPtr container_info,
mojo::PendingRemote<network::mojom::URLLoaderFactory>
subresource_proxying_loader_factory,
mojo::PendingRemote<network::mojom::URLLoaderFactory>
keep_alive_loader_factory,
mojo::PendingAssociatedRemote<blink::mojom::FetchLaterLoaderFactory>
fetch_later_loader_factory,
mojo::PendingRemote<blink::mojom::CodeCacheHost> code_cache_host,
mojo::PendingRemote<blink::mojom::CodeCacheHost>
code_cache_host_for_background,
mojom::CookieManagerInfoPtr cookie_manager_info,
mojom::StorageInfoPtr storage_info,
std::unique_ptr<DocumentState> document_state,
std::unique_ptr<WebNavigationParams> navigation_params) { … }
void RenderFrameImpl::CommitFailedNavigation(
blink::mojom::CommonNavigationParamsPtr common_params,
blink::mojom::CommitNavigationParamsPtr commit_params,
bool has_stale_copy_in_cache,
int error_code,
int extended_error_code,
net::ResolveErrorInfo resolve_error_info,
const std::optional<std::string>& error_page_content,
std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
subresource_loader_factories,
const blink::DocumentToken& document_token,
blink::mojom::PolicyContainerPtr policy_container,
mojom::AlternativeErrorPageOverrideInfoPtr alternative_error_page_info,
mojom::NavigationClient::CommitFailedNavigationCallback callback) { … }
void RenderFrameImpl::CommitSameDocumentNavigation(
blink::mojom::CommonNavigationParamsPtr common_params,
blink::mojom::CommitNavigationParamsPtr commit_params,
CommitSameDocumentNavigationCallback callback) { … }
void RenderFrameImpl::UpdateSubresourceLoaderFactories(
std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
subresource_loader_factories) { … }
const blink::BrowserInterfaceBrokerProxy&
RenderFrameImpl::GetBrowserInterfaceBroker() { … }
bool RenderFrameImpl::IsPluginHandledExternally(
const blink::WebElement& plugin_element,
const blink::WebURL& url,
const blink::WebString& suggested_mime_type) { … }
bool RenderFrameImpl::IsDomStorageDisabled() const { … }
v8::Local<v8::Object> RenderFrameImpl::GetScriptableObject(
const blink::WebElement& plugin_element,
v8::Isolate* isolate) { … }
void RenderFrameImpl::BindToFrame(blink::WebNavigationControl* frame) { … }
blink::WebPlugin* RenderFrameImpl::CreatePlugin(
const blink::WebPluginParams& params) { … }
std::unique_ptr<blink::WebMediaPlayer> RenderFrameImpl::CreateMediaPlayer(
const blink::WebMediaPlayerSource& source,
WebMediaPlayerClient* client,
blink::MediaInspectorContext* inspector_context,
WebMediaPlayerEncryptedMediaClient* encrypted_client,
WebContentDecryptionModule* initial_cdm,
const blink::WebString& sink_id,
const cc::LayerTreeSettings* settings,
scoped_refptr<base::TaskRunner> compositor_worker_task_runner) { … }
std::unique_ptr<blink::WebContentSettingsClient>
RenderFrameImpl::CreateWorkerContentSettingsClient() { … }
#if !BUILDFLAG(IS_ANDROID)
std::unique_ptr<media::SpeechRecognitionClient>
RenderFrameImpl::CreateSpeechRecognitionClient() { … }
#endif
scoped_refptr<blink::WebWorkerFetchContext>
RenderFrameImpl::CreateWorkerFetchContext() { … }
scoped_refptr<blink::WebWorkerFetchContext>
RenderFrameImpl::CreateWorkerFetchContextForPlzDedicatedWorker(
blink::WebDedicatedWorkerHostFactoryClient* factory_client) { … }
std::unique_ptr<blink::WebPrescientNetworking>
RenderFrameImpl::CreatePrescientNetworking() { … }
std::unique_ptr<blink::ResourceLoadInfoNotifierWrapper>
RenderFrameImpl::CreateResourceLoadInfoNotifierWrapper() { … }
std::unique_ptr<blink::WebServiceWorkerProvider>
RenderFrameImpl::CreateServiceWorkerProvider() { … }
blink::AssociatedInterfaceProvider*
RenderFrameImpl::GetRemoteNavigationAssociatedInterfaces() { … }
namespace {
struct CreateChildFrameTraceEvent { … };
}
blink::WebLocalFrame* RenderFrameImpl::CreateChildFrame(
blink::mojom::TreeScopeType scope,
const blink::WebString& name,
const blink::WebString& fallback_name,
const blink::FramePolicy& frame_policy,
const blink::WebFrameOwnerProperties& frame_owner_properties,
blink::FrameOwnerElementType frame_owner_element_type,
blink::WebPolicyContainerBindParams policy_container_bind_params,
ukm::SourceId document_ukm_source_id,
FinishChildFrameCreationFn finish_creation) { … }
void RenderFrameImpl::DidCreateFencedFrame(
const blink::RemoteFrameToken& frame_token) { … }
blink::WebFrame* RenderFrameImpl::FindFrame(const blink::WebString& name) { … }
void RenderFrameImpl::MaybeInitializeWidget(
mojom::CreateFrameWidgetParamsPtr widget_params) { … }
void RenderFrameImpl::EnsureWidgetInitialized() { … }
blink::WebFrameWidget*
RenderFrameImpl::PreviousWidgetForLazyCompositorInitialization(
const std::optional<blink::FrameToken>& previous_frame_token) const { … }
void RenderFrameImpl::WillDetach(blink::DetachReason detach_reason) { … }
void RenderFrameImpl::FrameDetached() { … }
void RenderFrameImpl::DidChangeName(const blink::WebString& name) { … }
void RenderFrameImpl::DidMatchCSS(
const blink::WebVector<blink::WebString>& newly_matching_selectors,
const blink::WebVector<blink::WebString>& stopped_matching_selectors) { … }
bool RenderFrameImpl::ShouldReportDetailedMessageForSourceAndSeverity(
blink::mojom::ConsoleMessageLevel log_level,
const blink::WebString& source) { … }
void RenderFrameImpl::DidAddMessageToConsole(
const blink::WebConsoleMessage& message,
const blink::WebString& source_name,
unsigned source_line,
const blink::WebString& stack_trace) { … }
void RenderFrameImpl::DidCreateDocumentLoader(
blink::WebDocumentLoader* document_loader) { … }
void RenderFrameImpl::DidCommitNavigation(
blink::WebHistoryCommitType commit_type,
bool should_reset_browser_interface_broker,
const blink::ParsedPermissionsPolicy& permissions_policy_header,
const blink::DocumentPolicyFeatureState& document_policy_header) { … }
void RenderFrameImpl::DidCommitDocumentReplacementNavigation(
blink::WebDocumentLoader* document_loader) { … }
void RenderFrameImpl::DidClearWindowObject() { … }
void RenderFrameImpl::DidCreateDocumentElement() { … }
void RenderFrameImpl::RunScriptsAtDocumentElementAvailable() { … }
void RenderFrameImpl::DidReceiveTitle(const blink::WebString& title) { … }
void RenderFrameImpl::DidDispatchDOMContentLoadedEvent() { … }
void RenderFrameImpl::RunScriptsAtDocumentReady() { … }
void RenderFrameImpl::RunScriptsAtDocumentIdle() { … }
void RenderFrameImpl::DidHandleOnloadEvents() { … }
void RenderFrameImpl::DidFinishLoad() { … }
void RenderFrameImpl::DidFinishLoadForPrinting() { … }
void RenderFrameImpl::DidFinishSameDocumentNavigation(
blink::WebHistoryCommitType commit_type,
bool is_synchronously_committed,
blink::mojom::SameDocumentNavigationType same_document_navigation_type,
bool is_client_redirect,
const std::optional<blink::SameDocNavigationScreenshotDestinationToken>&
screenshot_destination) { … }
void RenderFrameImpl::DidFailAsyncSameDocumentCommit() { … }
void RenderFrameImpl::WillFreezePage() { … }
void RenderFrameImpl::DidOpenDocumentInputStream(const blink::WebURL& url) { … }
void RenderFrameImpl::DidSetPageLifecycleState(bool restoring_from_bfcache) { … }
void RenderFrameImpl::NotifyCurrentHistoryItemChanged() { … }
void RenderFrameImpl::DidUpdateCurrentHistoryItem() { … }
void RenderFrameImpl::StartDelayedSyncTimer() { … }
bool RenderFrameImpl::SwapOutAndDeleteThis(
bool is_loading,
blink::mojom::FrameReplicationStatePtr replicated_frame_state,
const blink::RemoteFrameToken& proxy_frame_token,
blink::mojom::RemoteFrameInterfacesFromBrowserPtr remote_frame_interfaces,
blink::mojom::RemoteMainFrameInterfacesPtr remote_main_frame_interfaces) { … }
base::UnguessableToken RenderFrameImpl::GetDevToolsFrameToken() { … }
void RenderFrameImpl::AbortClientNavigation() { … }
void RenderFrameImpl::DidChangeSelection(bool is_empty_selection,
blink::SyncCondition force_sync) { … }
void RenderFrameImpl::OnMainFrameIntersectionChanged(
const gfx::Rect& main_frame_intersection_rect) { … }
void RenderFrameImpl::OnMainFrameViewportRectangleChanged(
const gfx::Rect& main_frame_viewport_rect) { … }
void RenderFrameImpl::OnMainFrameImageAdRectangleChanged(
int element_id,
const gfx::Rect& image_ad_rect) { … }
void RenderFrameImpl::OnOverlayPopupAdDetected() { … }
void RenderFrameImpl::OnLargeStickyAdDetected() { … }
void RenderFrameImpl::FinalizeRequest(blink::WebURLRequest& request) { … }
std::optional<blink::WebURL> RenderFrameImpl::WillSendRequest(
const blink::WebURL& target,
const blink::WebSecurityOrigin& security_origin,
const net::SiteForCookies& site_for_cookies,
ForRedirect for_redirect,
const blink::WebURL& upstream_url) { … }
std::optional<blink::WebURL> RenderFrameImpl::WillSendRequestInternal(
const blink::WebURL& target,
const blink::WebSecurityOrigin& security_origin,
const net::SiteForCookies& site_for_cookies,
ForRedirect for_redirect,
const blink::WebURL& upstream_url,
ui::PageTransition transition_type) { … }
void RenderFrameImpl::FinalizeRequestInternal(
blink::WebURLRequest& request,
bool for_outermost_main_frame,
ui::PageTransition transition_type) { … }
void RenderFrameImpl::DidLoadResourceFromMemoryCache(
const blink::WebURLRequest& request,
const blink::WebURLResponse& response) { … }
void RenderFrameImpl::DidStartResponse(
const url::SchemeHostPort& final_response_url,
int request_id,
network::mojom::URLResponseHeadPtr response_head,
network::mojom::RequestDestination request_destination,
bool is_ad_resource) { … }
void RenderFrameImpl::DidCompleteResponse(
int request_id,
const network::URLLoaderCompletionStatus& status) { … }
void RenderFrameImpl::DidCancelResponse(int request_id) { … }
void RenderFrameImpl::DidReceiveTransferSizeUpdate(int resource_id,
int received_data_length) { … }
void RenderFrameImpl::DidChangePerformanceTiming() { … }
void RenderFrameImpl::DidObserveUserInteraction(
base::TimeTicks max_event_start,
base::TimeTicks max_event_queued_main_thread,
base::TimeTicks max_event_commit_finish,
base::TimeTicks max_event_end,
blink::UserInteractionType interaction_type,
uint64_t interaction_offset) { … }
void RenderFrameImpl::DidChangeCpuTiming(base::TimeDelta time) { … }
void RenderFrameImpl::DidObserveLoadingBehavior(
blink::LoadingBehaviorFlag behavior) { … }
void RenderFrameImpl::DidObserveJavaScriptFrameworks(
const blink::JavaScriptFrameworkDetectionResult& result) { … }
void RenderFrameImpl::DidObserveSubresourceLoad(
const blink::SubresourceLoadMetrics& subresource_load_metrics) { … }
void RenderFrameImpl::DidObserveNewFeatureUsage(
const blink::UseCounterFeature& feature) { … }
void RenderFrameImpl::DidObserveSoftNavigation(
blink::SoftNavigationMetrics metrics) { … }
void RenderFrameImpl::DidObserveLayoutShift(double score,
bool after_input_or_scroll) { … }
void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) { … }
void RenderFrameImpl::WillReleaseScriptContext(v8::Local<v8::Context> context,
int world_id) { … }
void RenderFrameImpl::DidChangeScrollOffset() { … }
blink::WebMediaStreamDeviceObserver*
RenderFrameImpl::MediaStreamDeviceObserver() { … }
blink::WebEncryptedMediaClient* RenderFrameImpl::EncryptedMediaClient() { … }
blink::WebString RenderFrameImpl::UserAgentOverride() { … }
std::optional<blink::UserAgentMetadata>
RenderFrameImpl::UserAgentMetadataOverride() { … }
bool RenderFrameImpl::ShouldUseUserAgentOverride() const { … }
blink::mojom::RendererAudioInputStreamFactory*
RenderFrameImpl::GetAudioInputStreamFactory() { … }
bool RenderFrameImpl::AllowContentInitiatedDataUrlNavigations(
const blink::WebURL& url) { … }
void RenderFrameImpl::PostAccessibilityEvent(const ui::AXEvent& event) { … }
bool RenderFrameImpl::SendAccessibilitySerialization(
std::vector<ui::AXTreeUpdate> updates,
std::vector<ui::AXEvent> events,
bool had_load_complete_messages) { … }
void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) { … }
void RenderFrameImpl::RemoveObserver(RenderFrameObserver* observer) { … }
void RenderFrameImpl::OnDroppedNavigation() { … }
void RenderFrameImpl::WasHidden() { … }
void RenderFrameImpl::WasShown() { … }
void RenderFrameImpl::OnFrameVisibilityChanged(
blink::mojom::FrameVisibility render_status) { … }
bool RenderFrameImpl::IsMainFrame() { … }
bool RenderFrameImpl::IsInFencedFrameTree() const { … }
bool RenderFrameImpl::IsHidden() { … }
bool RenderFrameImpl::IsLocalRoot() const { … }
const RenderFrameImpl* RenderFrameImpl::GetLocalRoot() const { … }
base::WeakPtr<RenderFrameImpl> RenderFrameImpl::GetWeakPtr() { … }
mojom::DidCommitProvisionalLoadParamsPtr
RenderFrameImpl::MakeDidCommitProvisionalLoadParams(
blink::WebHistoryCommitType commit_type,
ui::PageTransition transition,
const blink::ParsedPermissionsPolicy& permissions_policy_header,
const blink::DocumentPolicyFeatureState& document_policy_header,
const std::optional<base::UnguessableToken>& embedding_token) { … }
void RenderFrameImpl::UpdateNavigationHistory(
blink::WebHistoryCommitType commit_type) { … }
void RenderFrameImpl::NotifyObserversOfNavigationCommit(
ui::PageTransition transition) { … }
void RenderFrameImpl::UpdateStateForCommit(
blink::WebHistoryCommitType commit_type,
ui::PageTransition transition) { … }
void RenderFrameImpl::DidCommitNavigationInternal(
blink::WebHistoryCommitType commit_type,
ui::PageTransition transition,
const blink::ParsedPermissionsPolicy& permissions_policy_header,
const blink::DocumentPolicyFeatureState& document_policy_header,
mojom::DidCommitProvisionalLoadInterfaceParamsPtr interface_params,
mojom::DidCommitSameDocumentNavigationParamsPtr same_document_params,
const std::optional<base::UnguessableToken>& embedding_token) { … }
void RenderFrameImpl::PrepareFrameForCommit(
const GURL& url,
const blink::mojom::CommitNavigationParams& commit_params) { … }
blink::mojom::CommitResult RenderFrameImpl::PrepareForHistoryNavigationCommit(
const blink::mojom::CommonNavigationParams& common_params,
const blink::mojom::CommitNavigationParams& commit_params,
WebHistoryItem* item_for_history_navigation,
blink::WebFrameLoadType* load_type) { … }
bool RenderFrameImpl::SwapIn(WebFrame* previous_web_frame) { … }
void RenderFrameImpl::DidStartLoading() { … }
void RenderFrameImpl::DidStopLoading() { … }
void RenderFrameImpl::NotifyAccessibilityModeChange(ui::AXMode new_mode) { … }
void RenderFrameImpl::FocusedElementChanged(const blink::WebElement& element) { … }
void RenderFrameImpl::BeginNavigation(
std::unique_ptr<blink::WebNavigationInfo> info) { … }
void RenderFrameImpl::SynchronouslyCommitAboutBlankForBug778318(
std::unique_ptr<blink::WebNavigationInfo> info) { … }
void RenderFrameImpl::SerializeAsMHTML(mojom::SerializeAsMHTMLParamsPtr params,
SerializeAsMHTMLCallback callback) { … }
void RenderFrameImpl::OnWriteMHTMLComplete(
SerializeAsMHTMLCallback callback,
std::unordered_set<std::string> serialized_resources_uri_digests,
mojom::MhtmlSaveStatus save_status) { … }
#ifndef STATIC_ASSERT_ENUM
#define STATIC_ASSERT_ENUM …
#undef STATIC_ASSERT_ENUM
#endif
void RenderFrameImpl::RequestOverlayRoutingToken(
media::RoutingTokenCallback callback) { … }
void RenderFrameImpl::OpenURL(std::unique_ptr<blink::WebNavigationInfo> info) { … }
void RenderFrameImpl::SetLoaderFactoryBundle(
scoped_refptr<blink::ChildURLLoaderFactoryBundle> loader_factories) { … }
blink::ChildURLLoaderFactoryBundle* RenderFrameImpl::GetLoaderFactoryBundle() { … }
scoped_refptr<blink::ChildURLLoaderFactoryBundle>
RenderFrameImpl::CreateLoaderFactoryBundle(
std::unique_ptr<blink::PendingURLLoaderFactoryBundle> info,
std::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
subresource_overrides,
mojo::PendingRemote<network::mojom::URLLoaderFactory>
subresource_proxying_loader_factory,
mojo::PendingRemote<network::mojom::URLLoaderFactory>
keep_alive_loader_factory,
mojo::PendingAssociatedRemote<blink::mojom::FetchLaterLoaderFactory>
fetch_later_loader_factory) { … }
void RenderFrameImpl::UpdateEncoding(WebFrame* frame,
const std::string& encoding_name) { … }
void RenderFrameImpl::SyncSelectionIfRequired(blink::SyncCondition force_sync) { … }
void RenderFrameImpl::CreateAudioInputStream(
blink::CrossVariantMojoRemote<
blink::mojom::RendererAudioInputStreamFactoryClientInterfaceBase>
client,
const base::UnguessableToken& session_id,
const media::AudioParameters& params,
bool automatic_gain_control,
uint32_t shared_memory_count,
blink::CrossVariantMojoReceiver<
media::mojom::AudioProcessorControlsInterfaceBase> controls_receiver,
const media::AudioProcessingSettings* settings) { … }
void RenderFrameImpl::AssociateInputAndOutputForAec(
const base::UnguessableToken& input_stream_id,
const std::string& output_device_id) { … }
void RenderFrameImpl::InitializeMediaStreamDeviceObserver() { … }
void RenderFrameImpl::BeginNavigationInternal(
std::unique_ptr<blink::WebNavigationInfo> info,
bool is_history_navigation_in_new_child_frame,
base::TimeTicks renderer_before_unload_start,
base::TimeTicks renderer_before_unload_end) { … }
void RenderFrameImpl::DecodeDataURL(
const blink::mojom::CommonNavigationParams& common_params,
const blink::mojom::CommitNavigationParams& commit_params,
std::string* mime_type,
std::string* charset,
std::string* data,
GURL* base_url) { … }
void RenderFrameImpl::SendUpdateState() { … }
blink::WebURL RenderFrameImpl::LastCommittedUrlForUKM() { … }
GURL RenderFrameImpl::GetLoadingUrl() const { … }
media::MediaPermission* RenderFrameImpl::GetMediaPermission() { … }
void RenderFrameImpl::RegisterMojoInterfaces() { … }
#if BUILDFLAG(IS_ANDROID)
void RenderFrameImpl::BindGinJavaBridge(
mojo::PendingAssociatedReceiver<mojom::GinJavaBridge> receiver) {
mojo::MakeSelfOwnedAssociatedReceiver(
std::make_unique<GinJavaBridgeDispatcher>(this), std::move(receiver));
}
#endif
void RenderFrameImpl::BindMhtmlFileWriter(
mojo::PendingAssociatedReceiver<mojom::MhtmlFileWriter> receiver) { … }
void RenderFrameImpl::CheckIfAudioSinkExistsAndIsAuthorized(
const blink::WebString& sink_id,
blink::WebSetSinkIdCompleteCallback completion_callback) { … }
scoped_refptr<network::SharedURLLoaderFactory>
RenderFrameImpl::GetURLLoaderFactory() { … }
blink::URLLoaderThrottleProvider*
RenderFrameImpl::GetURLLoaderThrottleProvider() { … }
scoped_refptr<blink::WebBackgroundResourceFetchAssets>
RenderFrameImpl::MaybeGetBackgroundResourceFetchAssets() { … }
void RenderFrameImpl::OnStopLoading() { … }
bool RenderFrameImpl::IsRequestingNavigation() { … }
void RenderFrameImpl::LoadHTMLStringForTesting(std::string_view html,
const GURL& base_url,
const std::string& text_encoding,
const GURL& unreachable_url,
bool replace_current_item) { … }
scoped_refptr<base::SingleThreadTaskRunner> RenderFrameImpl::GetTaskRunner(
blink::TaskType task_type) { … }
BindingsPolicySet RenderFrameImpl::GetEnabledBindings() { … }
void RenderFrameImpl::SetAccessibilityModeForTest(ui::AXMode new_mode) { … }
const RenderFrameMediaPlaybackOptions&
RenderFrameImpl::GetRenderFrameMediaPlaybackOptions() { … }
void RenderFrameImpl::SetRenderFrameMediaPlaybackOptions(
const RenderFrameMediaPlaybackOptions& opts) { … }
void RenderFrameImpl::SetAllowsCrossBrowsingInstanceFrameLookup() { … }
bool RenderFrameImpl::IsAccessibilityEnabled() const { … }
#if BUILDFLAG(ENABLE_PPAPI)
mojom::PepperHost* RenderFrameImpl::GetPepperHost() {
if (!pepper_host_remote_.is_bound())
GetRemoteAssociatedInterfaces()->GetInterface(&pepper_host_remote_);
return pepper_host_remote_.get();
}
void RenderFrameImpl::PepperInstanceCreated(
PepperPluginInstanceImpl* instance,
mojo::PendingAssociatedRemote<mojom::PepperPluginInstance> mojo_instance,
mojo::PendingAssociatedReceiver<mojom::PepperPluginInstanceHost>
mojo_host) {
active_pepper_instances_.insert(instance);
GetPepperHost()->InstanceCreated(
instance->pp_instance(), std::move(mojo_instance), std::move(mojo_host));
}
void RenderFrameImpl::PepperInstanceDeleted(
PepperPluginInstanceImpl* instance) {
active_pepper_instances_.erase(instance);
if (focused_pepper_plugin_ == instance)
PepperFocusChanged(instance, false);
}
void RenderFrameImpl::PepperFocusChanged(PepperPluginInstanceImpl* instance,
bool focused) {
if (focused)
focused_pepper_plugin_ = instance;
else if (focused_pepper_plugin_ == instance)
focused_pepper_plugin_ = nullptr;
GetLocalRootWebFrameWidget()->UpdateTextInputState();
GetLocalRootWebFrameWidget()->UpdateSelectionBounds();
}
#endif
blink::WebComputedAXTree* RenderFrameImpl::GetOrCreateWebComputedAXTree() { … }
std::unique_ptr<blink::WebSocketHandshakeThrottle>
RenderFrameImpl::CreateWebSocketHandshakeThrottle() { … }
bool RenderFrameImpl::GetCaretBoundsFromFocusedPlugin(gfx::Rect& rect) { … }
void RenderFrameImpl::AddMessageToConsoleImpl(
blink::mojom::ConsoleMessageLevel level,
const std::string& message,
bool discard_duplicates) { … }
void RenderFrameImpl::SetURLLoaderFactoryOverrideForTest(
scoped_refptr<network::SharedURLLoaderFactory> factory) { … }
scoped_refptr<blink::ChildURLLoaderFactoryBundle>
RenderFrameImpl::CloneLoaderFactories() { … }
blink::scheduler::WebAgentGroupScheduler&
RenderFrameImpl::GetAgentGroupScheduler() { … }
url::Origin RenderFrameImpl::GetSecurityOriginOfTopFrame() { … }
base::WeakPtr<media::DecoderFactory> RenderFrameImpl::GetMediaDecoderFactory() { … }
gfx::Rect RenderFrameImpl::ConvertViewportToWindow(const gfx::Rect& rect) { … }
float RenderFrameImpl::GetDeviceScaleFactor() { … }
bool RenderFrameImpl::DeferMediaLoad(bool has_played_media_before,
base::OnceClosure closure) { … }
WebView* RenderFrameImpl::CreateNewWindow(
const WebURLRequest& request,
const blink::WebWindowFeatures& features,
const WebString& frame_name,
WebNavigationPolicy policy,
network::mojom::WebSandboxFlags sandbox_flags,
const blink::SessionStorageNamespaceId& session_storage_namespace_id,
bool& consumed_user_gesture,
const std::optional<blink::Impression>& impression,
const std::optional<blink::WebPictureInPictureWindowOptions>& pip_options,
const blink::WebURL& base_url) { … }
std::unique_ptr<blink::WebLinkPreviewTriggerer>
RenderFrameImpl::CreateLinkPreviewTriggerer() { … }
void RenderFrameImpl::ResetMembersUsedForDurationOfCommit() { … }
}