diff options
Diffstat (limited to 'chromium/third_party/blink/public/mojom/frame/frame.mojom')
-rw-r--r-- | chromium/third_party/blink/public/mojom/frame/frame.mojom | 149 |
1 files changed, 132 insertions, 17 deletions
diff --git a/chromium/third_party/blink/public/mojom/frame/frame.mojom b/chromium/third_party/blink/public/mojom/frame/frame.mojom index 713eca26909..eb61d18ccfb 100644 --- a/chromium/third_party/blink/public/mojom/frame/frame.mojom +++ b/chromium/third_party/blink/public/mojom/frame/frame.mojom @@ -13,6 +13,7 @@ import "services/data_decoder/public/mojom/resource_snapshot_for_web_bundle.mojo import "services/network/public/mojom/content_security_policy.mojom"; import "services/network/public/mojom/fetch_api.mojom"; import "services/network/public/mojom/web_sandbox_flags.mojom"; +import "services/network/public/mojom/cross_origin_opener_policy.mojom"; import "skia/public/mojom/skcolor.mojom"; import "third_party/blink/public/mojom/ad_tagging/ad_frame.mojom"; import "third_party/blink/public/mojom/blob/blob.mojom"; @@ -31,14 +32,17 @@ import "third_party/blink/public/mojom/frame/lifecycle.mojom"; import "third_party/blink/public/mojom/frame/media_player_action.mojom"; import "third_party/blink/public/mojom/frame/reporting_observer.mojom"; import "third_party/blink/public/mojom/frame/sudden_termination_disabler_type.mojom"; +import "third_party/blink/public/mojom/frame/user_activation_notification_type.mojom"; import "third_party/blink/public/mojom/frame/user_activation_update_types.mojom"; import "third_party/blink/public/mojom/frame/frame_owner_properties.mojom"; import "third_party/blink/public/mojom/input/focus_type.mojom"; import "third_party/blink/public/mojom/input/scroll_direction.mojom"; +import "third_party/blink/public/mojom/loader/referrer.mojom"; +import "third_party/blink/public/mojom/portal/portal.mojom"; import "third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom"; -import "third_party/blink/public/mojom/referrer.mojom"; -import "third_party/blink/public/mojom/timing/resource_timing.mojom"; import "third_party/blink/public/mojom/security_context/insecure_request_policy.mojom"; +import "third_party/blink/public/mojom/timing/resource_timing.mojom"; +import "third_party/blink/public/mojom/tokens/tokens.mojom"; import "third_party/blink/public/mojom/web_feature/web_feature.mojom"; import "ui/events/mojom/scroll_granularity.mojom"; import "ui/gfx/geometry/mojom/geometry.mojom"; @@ -48,6 +52,9 @@ import "url/mojom/url.mojom"; [EnableIf=is_mac] import "ui/gfx/range/mojom/range.mojom"; +[EnableIf=is_mac] +import "ui/base/mojom/attributed_string.mojom"; + // Information about a subframe being saved as "complete html". struct SavableSubframe { // Original url of the subframe (i.e. based the parent's html sources). @@ -111,7 +118,7 @@ enum PluginActionType { const uint16 kMaxTitleChars = 4096; // 4 * 1024; struct TextAutosizerPageInfo { - // LocalFrame width in density-independent pixels. + // Frame width in density-independent pixels. int32 main_frame_width; // Layout width in CSS pixels. @@ -133,7 +140,7 @@ interface LocalFrameHost { // Returns either true if fullscreen is allowed to be entered, or false if the // request to enter fullscreen was denied. Note that the actual transition to // fullscreen will occur on the next visual update, when the next - // WidgetMsg_UpdateVisualProperties is sent. + // Widget::UpdateVisualProperties is sent. EnterFullscreen(FullscreenOptions options) => (bool granted); // Request to the browser to exit fullscreen mode. @@ -182,10 +189,6 @@ interface LocalFrameHost { // behavior of 'shifting' the content via insets and a scrollIntoView). SetVirtualKeyboardOverlayPolicy(bool vk_overlays_content); - // Evicts the page from the back/forward cache due to e.g., JavaScript - // execution. - EvictFromBackForwardCache(); - // Notifies the browser that the associated frame has changed its visibility // status. Visibility status changes occur when the frame moves in/out // of the viewport, or the need for a layout object changes, e.g. if the @@ -195,9 +198,13 @@ interface LocalFrameHost { // Notifies the browser that the associated frame has changed theme color. // This will only be called on main-frames only. |theme_color| is optional // and indicates if a theme color has been specified or not, e.g. removal - // of a theme color meta tag will generate a null value. + // of a theme color meta tag will generate a null value. DidChangeThemeColor(skia.mojom.SkColor? theme_color); + // Notifies the browser that the associated frame has changed its computed CSS + // background color. This will be called on main-frames only. + DidChangeBackgroundColor(skia.mojom.SkColor background_color); + // Sent when the renderer fails to load with |error_code| which means a net // error code. DidFailLoadWithError(url.mojom.Url url, int32 error_code); @@ -295,7 +302,11 @@ interface LocalFrameHost { // Indicates that the user activation state in the current frame has been // updated, so the replicated states need to be synced (in the browser process // as well as in all other renderer processes). - UpdateUserActivationState(UserActivationUpdateType update_type); + // + // The |notification_type| parameter is used for histograms, only for the case + // |update_state == kNotifyActivation|. + UpdateUserActivationState(UserActivationUpdateType update_type, + UserActivationNotificationType notification_type); // Provides accessibility information about a find in page result. HandleAccessibilityFindInPageResult(FindInPageResultAXParams params); @@ -355,7 +366,7 @@ interface LocalFrameHost { // local root's view, and it will be an empty bounds if there is no focused // element. FocusedElementChanged(bool is_editable_element, - gfx.mojom.Rect bounds_in_frame_widget); + gfx.mojom.Rect bounds_in_frame_widget, blink.mojom.FocusType focus_type); // Show a popup menu using native controls on Mac or Android. // The popup menu is hidden when the mojo channel is closed. @@ -401,6 +412,23 @@ interface LocalFrameHost { DidChangeFramePolicy( mojo_base.mojom.UnguessableToken child_frame_token, blink.mojom.FramePolicy frame_policy); + + // Notifies the browser that the frame changed the 'csp' attribute + // of one of its child frames. + DidChangeCSPAttribute( + mojo_base.mojom.UnguessableToken child_frame_token, + network.mojom.ContentSecurityPolicy? parsed_csp_attribute); + + // Sent by the renderer to request a paint preview of a subframe. |clip_rect| + // is the size of the frame in it's parent. |guid| is an an identifier for + // all the capture work (regardless of the process captures are happening in) + // that allows the results to be grouped together, even if there are multiple + // requests in-flight. + CapturePaintPreviewOfSubframe( + gfx.mojom.Rect clip_rect, mojo_base.mojom.UnguessableToken guid); + + // Notifies the browser that a child frame is detached from the DOM. + Detach(); }; // Implemented in Blink, this interface defines frame-specific methods that will @@ -560,6 +588,11 @@ interface LocalFrame { [EnableIf=is_mac] GetFirstRectForRange(gfx.mojom.Range range); + // Requests the text fragment in a given range. + [EnableIf=is_mac] + GetStringForRange(gfx.mojom.Range range) + => (ui.mojom.AttributedString? string, gfx.mojom.Point baseline_point); + // Binds |receiver| to the document of this frame. BindReportingObserver( pending_receiver<blink.mojom.ReportingObserver> receiver); @@ -573,6 +606,26 @@ interface LocalFrame { GetSavableResourceLinks() => (GetSavableResourceLinksReply? reply); }; +// Also implemented in Blink, this interface defines frame-specific methods +// that will be invoked from the browser process but processed at a higher +// priority than methods invoked on the LocalFrame interface. +// +// Note this interface does not use legacy IPC channels and as such there are +// no ordering guarantees for messages sent on this interface. This interface is +// for experimental purposes. +interface HighPriorityLocalFrame { + + // Instructs the frame to invoke the beforeunload event handler. + // + // The closure callback is invoked to acknowledge the browser that + // the beforeunload event is handled. |proceed| matches the return value + // of the frame's beforeunload handler: true if the user decided to proceed + // with leaving the page. + DispatchBeforeUnload(bool is_reload) + => (bool proceed, mojo_base.mojom.TimeTicks before_unload_start_time, + mojo_base.mojom.TimeTicks before_unload_end_time); +}; + // Implemented in Browser, this interface defines frame-specific methods that // will be invoked from the render process (e.g. blink::RemoteFrame). // @@ -650,6 +703,18 @@ interface RemoteFrameHost { mojo_base.mojom.String16 source_origin, mojo_base.mojom.String16 target_origin, blink.mojom.TransferableMessage message); + + // Ask the frame host to print a cross-process subframe. + // The printed content of this subframe belongs to the document specified by + // its document cookie. Document cookie is a unique id for a printed document + // associated with a print job. + // The content will be rendered in the specified rectangular area in its + // parent frame. + PrintCrossProcessSubframe( + gfx.mojom.Rect frame_content_rect, int32 document_cookie); + + // Notifies the browser that a child frame is detached from the DOM. + Detach(); }; // Implemented in Blink, this interface defines frame-specific methods that will @@ -665,7 +730,7 @@ interface RemoteFrame { // in another process. Actually entering fullscreen will be done separately // as part of ViewMsg_Resize, once the browser process has resized the tab for // fullscreen. - WillEnterFullscreen(); + WillEnterFullscreen(FullscreenOptions options); // Updates replicated ContentSecurityPolicy on the remote frame's // SecurityContent. @@ -703,6 +768,10 @@ interface RemoteFrame { // be an ad frame. SetReplicatedAdFrameType(blink.mojom.AdFrameType ad_frame_type); + // Sets the replicated name and unique name for the frame. Used when the + // name of a frame changes. + SetReplicatedName(string name, string unique_name); + // Sent to dispatch a load event in the frame's owner element. // (eg. the iframe, portal, or object element). DispatchLoadEventForFrameOwner(); @@ -734,7 +803,11 @@ interface RemoteFrame { // Sent to the remote frame placeholder in the parent process to update the // user activation state in appropriate part of the frame tree (ancestors for // activation notification and all nodes for consumption). - UpdateUserActivationState(blink.mojom.UserActivationUpdateType state_update_type); + // + // The |notification_type| parameter is used for histograms, only for the case + // |update_state == kNotifyActivation|. + UpdateUserActivationState(blink.mojom.UserActivationUpdateType state_update_type, + UserActivationNotificationType notification_type); // Sent to the process that owns this frame's HTMLFrameOwnerElement to // set the embedding token. This token uniquely specifies the relationship @@ -783,10 +856,6 @@ interface RemoteFrame { // Requests that the blink::RemoteFrame updates its opener to the specified // frame. The frame token may be "empty" if the opener was disowned. UpdateOpener(mojo_base.mojom.UnguessableToken? opener_frame_token); - - // Transfers user activation state from the source frame to the current frame. - TransferUserActivationToRenderer( - mojo_base.mojom.UnguessableToken source_frame_token); }; // Implemented in Blink, this interface defines main-frame-specific methods that @@ -822,6 +891,48 @@ interface LocalMainFrame { // Sent to the main-frame to request performing a zoom-to-find-in-page // based on the rect provided. ZoomToFindInPageRect(gfx.mojom.Rect rect_in_root_frame); + + // Cross-Origin-Opener-Policy(COOP): + // Check accesses made from this window to |accessed_window|. If this happens, + // a report will be sent to |reporter|. + InstallCoopAccessMonitor( + network.mojom.CoopAccessReportType report_type, + mojo_base.mojom.UnguessableToken accessed_window, + pending_remote<network.mojom.CrossOriginOpenerPolicyReporter> reporter); + + // Called on the main frame of a page embedded in a Portal when it is + // activated. The frame has the option to adopt the previous page as a portal + // identified by |portal_token| with the interface |portal|. The activation + // can optionally include a message |data| dispatched with the + // PortalActivateEvent. The return value |was_adopted| indicates if the portal + // for the predecessor (identified by |portal_token|) was adopted by the + // current frame. + OnPortalActivated( + blink.mojom.PortalToken portal_token, + pending_associated_remote<blink.mojom.Portal> portal, + pending_associated_receiver<blink.mojom.PortalClient> portal_client, + blink.mojom.TransferableMessage data) + => (blink.mojom.PortalActivateResult result); + + // Forwards a message from a portal's host to the main frame in the portal's + // guest contents. + ForwardMessageFromHost(blink.mojom.TransferableMessage message, + url.mojom.Origin source_origin, + url.mojom.Origin? target_origin); +}; + +// Implemented in Blink, this interface defines remote main-frame-specific +// methods that will be invoked from the browser process (e.g. +// content::RenderFrameProxyHost). +// +// There is only ever one remote main frame for a given tab in all renderer +// processes. +// +// This interface will only be provided when the RemoteFrame is a main frame. +interface RemoteMainFrame { + // Makes the TextAutosizerPageInfo received from a local main frame available + // to remote main frame renderers. + UpdateTextAutosizerPageInfo(blink.mojom.TextAutosizerPageInfo page_info); }; // Implemented in Browser, this interface defines local-main-frame-specific @@ -848,4 +959,8 @@ interface LocalMainFrameHost { interface RemoteMainFrameHost { // Asks the browser process to activate the page associated to the main frame. FocusPage(); + + // Sent from an inactive renderer for the browser to route to the active + // renderer, instructing it to close. + RouteCloseEvent(); }; |