#include "third_party/blink/renderer/core/html/html_plugin_element.h"
#include "base/feature_list.h"
#include "base/ranges/algorithm.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions_policy/policy_value.mojom-blink-forward.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
#include "third_party/blink/renderer/core/css/css_property_names.h"
#include "third_party/blink/renderer/core/css/style_change_reason.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_utilities.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/events/event.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/execution_context/agent.h"
#include "third_party/blink/renderer/core/exported/web_plugin_container_impl.h"
#include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/html/html_image_loader.h"
#include "third_party/blink/renderer/core/html/html_slot_element.h"
#include "third_party/blink/renderer/core/html/plugin_document.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input/event_handler.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/layout/layout_embedded_content.h"
#include "third_party/blink/renderer/core/layout/layout_embedded_object.h"
#include "third_party/blink/renderer/core/layout/layout_image.h"
#include "third_party/blink/renderer/core/loader/mixed_content_checker.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/page/plugin_data.h"
#include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"
#include "third_party/blink/renderer/platform/network/mime/mime_type_from_url.h"
#include "third_party/blink/renderer/platform/network/mime/mime_type_registry.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/scheduling_policy.h"
namespace blink {
namespace {
String GetMIMETypeFromURL(const KURL& url) { … }
String ResolveMIMEType(const String& specified_type, const KURL& url) { … }
}
const Vector<String>& PluginParameters::Names() const { … }
const Vector<String>& PluginParameters::Values() const { … }
void PluginParameters::AppendAttribute(const Attribute& attribute) { … }
void PluginParameters::AppendNameWithValue(const String& name,
const String& value) { … }
void PluginParameters::MapDataParamToSrc() { … }
HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tag_name,
Document& doc,
const CreateElementFlags flags)
: … { … }
HTMLPlugInElement::~HTMLPlugInElement() { … }
void HTMLPlugInElement::Trace(Visitor* visitor) const { … }
bool HTMLPlugInElement::HasPendingActivity() const { … }
void HTMLPlugInElement::SetPersistedPlugin(WebPluginContainerImpl* plugin) { … }
void HTMLPlugInElement::SetFocused(bool focused,
mojom::blink::FocusType focus_type) { … }
bool HTMLPlugInElement::CanProcessDrag() const { … }
bool HTMLPlugInElement::CanStartSelection() const { … }
bool HTMLPlugInElement::WillRespondToMouseClickEvents() { … }
void HTMLPlugInElement::RemoveAllEventListeners() { … }
void HTMLPlugInElement::DidMoveToNewDocument(Document& old_document) { … }
void HTMLPlugInElement::AttachLayoutTree(AttachContext& context) { … }
void HTMLPlugInElement::IntrinsicSizingInfoChanged() { … }
void HTMLPlugInElement::UpdatePlugin() { … }
Node::InsertionNotificationRequest HTMLPlugInElement::InsertedInto(
ContainerNode& insertion_point) { … }
void HTMLPlugInElement::RemovedFrom(ContainerNode& insertion_point) { … }
bool HTMLPlugInElement::ShouldAccelerate() const { … }
ParsedPermissionsPolicy HTMLPlugInElement::ConstructContainerPolicy() const { … }
void HTMLPlugInElement::DetachLayoutTree(bool performing_reattach) { … }
LayoutObject* HTMLPlugInElement::CreateLayoutObject(
const ComputedStyle& style) { … }
void HTMLPlugInElement::FinishParsingChildren() { … }
void HTMLPlugInElement::ResetInstance() { … }
v8::Local<v8::Object> HTMLPlugInElement::PluginWrapper() { … }
ScriptValue HTMLPlugInElement::AnonymousNamedGetter(const AtomicString& name) { … }
NamedPropertySetterResult HTMLPlugInElement::AnonymousNamedSetter(
const AtomicString& name,
const ScriptValue& value) { … }
WebPluginContainerImpl* HTMLPlugInElement::PluginEmbeddedContentView() const { … }
WebPluginContainerImpl* HTMLPlugInElement::OwnedPlugin() const { … }
bool HTMLPlugInElement::IsPresentationAttribute(
const QualifiedName& name) const { … }
void HTMLPlugInElement::CollectStyleForPresentationAttribute(
const QualifiedName& name,
const AtomicString& value,
MutableCSSPropertyValueSet* style) { … }
void HTMLPlugInElement::DefaultEventHandler(Event& event) { … }
LayoutEmbeddedContent* HTMLPlugInElement::LayoutEmbeddedContentForJSBindings()
const { … }
bool HTMLPlugInElement::IsKeyboardFocusable(
UpdateBehavior update_behavior) const { … }
bool HTMLPlugInElement::HasCustomFocusLogic() const { … }
bool HTMLPlugInElement::IsPluginElement() const { … }
bool HTMLPlugInElement::IsErrorplaceholder() { … }
void HTMLPlugInElement::DisconnectContentFrame() { … }
bool HTMLPlugInElement::IsFocusableStyle(UpdateBehavior update_behavior) const { … }
HTMLPlugInElement::ObjectContentType HTMLPlugInElement::GetObjectContentType()
const { … }
bool HTMLPlugInElement::IsImageType() const { … }
LayoutEmbeddedObject* HTMLPlugInElement::GetLayoutEmbeddedObject() const { … }
bool HTMLPlugInElement::AllowedToLoadFrameURL(const String& url) { … }
bool HTMLPlugInElement::RequestObject(const PluginParameters& plugin_params) { … }
bool HTMLPlugInElement::LoadPlugin(const KURL& url,
const String& mime_type,
const PluginParameters& plugin_params,
bool use_fallback) { … }
void HTMLPlugInElement::DispatchErrorEvent() { … }
bool HTMLPlugInElement::AllowedToLoadObject(const KURL& url,
const String& mime_type) { … }
bool HTMLPlugInElement::AllowedToLoadPlugin(const KURL& url) { … }
void HTMLPlugInElement::RemovePluginFromFrameView(
WebPluginContainerImpl* plugin) { … }
void HTMLPlugInElement::DidAddUserAgentShadowRoot(ShadowRoot&) { … }
bool HTMLPlugInElement::HasFallbackContent() const { … }
bool HTMLPlugInElement::UseFallbackContent() const { … }
void HTMLPlugInElement::ReattachOnPluginChangeIfNeeded() { … }
void HTMLPlugInElement::UpdateServiceTypeIfEmpty() { … }
const ComputedStyle* HTMLPlugInElement::CustomStyleForLayoutObject(
const StyleRecalcContext& style_recalc_context) { … }
}