| // 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 extensions.mojom; |
| |
| import "content/public/common/transferrable_url_loader.mojom"; |
| import "extensions/common/api/mime_handler.mojom"; |
| import "ui/gfx/geometry/mojo/geometry.mojom"; |
| import "url/mojom/url.mojom"; |
| |
| interface GuestView { |
| // Tells the browser to create a mime handler guest view for a plugin. |
| // This method is only called when the network service is enabled, and only |
| // for plugins added using the embedded/object tag. |
| // |plugin_frame_id| is the routing ID corresponding to the frame owned by the |
| // plugin element. |
| // TODO(ekaramad): For cross-process-frame-based MimeHandlerView sending both |
| // |plugin_frame_id| and |render_frame_id| seems redundant. See if |
| // |render_frame_id| can be removed once https://crbug.com/659750 is fixed. |
| CreateEmbeddedMimeHandlerViewGuest( |
| int32 render_frame_id, |
| int32 tab_id, |
| url.mojom.Url original_url, |
| int32 element_instance_id, |
| gfx.mojom.Size element_size, |
| content.mojom.TransferrableURLLoader transferrable_url_loader, |
| int32 plugin_frame_id); |
| |
| // Tells the browser to create a mime handler guest view for a plugin. |
| // This method is called for full-frame plugins or for all plugins when the |
| // network service is disabled. |
| // |plugin_frame_id| is the routing ID corresponding to the frame owned by the |
| // plugin element. |
| // TODO(ekaramad): See if |render_frame_id| can be removed once |
| // https://crbug.com/659750 is fixed. |
| CreateMimeHandlerViewGuest( |
| int32 render_frame_id, |
| string view_id, |
| int32 element_instance_id, |
| gfx.mojom.Size element_size, |
| extensions.mime_handler.BeforeUnloadControl? before_unload_control, |
| int32 plugin_frame_id); |
| }; |
| |
| // An interface implemented by the renderer which is used for creating a |
| // MimeHandlerViewFrameContainer. This interface is exposed on RenderFrame and |
| // and is used by the browser to ask the renderer to start the MimeHandlerView |
| // creation process (by creating a MimeHandlerViewFrameContainer). |
| interface MimeHandlerViewContainerManager { |
| // Asks the renderer to set up a MimeHandlerViewFrameContainer. The passed |
| // arguments are later used in GuestView mojo calls above to create a |
| // MimeHandlerViewGuest on the browser side. |
| CreateFrameContainer(url.mojom.Url resource_url, |
| string mime_type, |
| string view_id); |
| }; |