blob: 78c93efe1f55c49bcbaf4cad4961e013a10d87f2 [file] [log] [blame]
// 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 content.mojom;
import "content/common/native_types.mojom";
import "content/public/common/window_container_type.mojom";
import "gpu/ipc/common/mailbox.mojom";
import "third_party/WebKit/public/platform/referrer.mojom";
import "third_party/WebKit/public/web/window_features.mojom";
import "ui/base/mojo/window_open_disposition.mojom";
import "url/mojo/url.mojom";
struct CreateNewWindowParams {
// The routing id of the frame initiating the open.
int32 opener_render_frame_id;
// True if this open request came in the context of a user gesture.
bool user_gesture;
// Type of window requested.
WindowContainerType window_container_type;
// The session storage namespace ID this view should use.
int64 session_storage_namespace_id;
// The name of the resulting frame that should be created (empty if none
// has been specified). UTF8 encoded string.
string frame_name;
// The URL of the frame initiating the open.
url.mojom.Url opener_url;
// The URL of the top frame containing the opener.
url.mojom.Url opener_top_level_frame_url;
// The security origin of the frame initiating the open.
url.mojom.Url opener_security_origin;
// Whether the opener will be suppressed in the new window, in which case
// scripting the new window is not allowed.
bool opener_suppressed;
// Whether the window should be opened in the foreground, background, etc.
ui.mojom.WindowOpenDisposition disposition;
// The URL that will be loaded in the new window (empty if none has been
// specified).
url.mojom.Url target_url;
// The referrer that will be used to load |target_url| (empty if none has
// been specified).
blink.mojom.Referrer referrer;
// The window features to use for the new view.
blink.mojom.WindowFeatures features;
};
struct CreateNewWindowReply {
// The ID of the view to be created. If the ID is MSG_ROUTING_NONE, then the
// opener RenderFrame should not create a RenderView in its process.
// MSG_ROUTING_NONE does not necessarily indicate failure; it may also occur
// in cases where a window was created, but the opener relationship is
// severed.
int32 route_id;
// The ID of the main frame hosted in the view.
int32 main_frame_route_id;
// The ID of the widget for the main frame.
int32 main_frame_widget_route_id;
// Duplicated from CreateNewWindowParams because legacy code.
int64 cloned_session_storage_namespace_id;
};
interface RenderMessageFilter {
// Synchronously generates a new routing ID for the caller.
[Sync] GenerateRoutingID() => (int32 routing_id);
// Sent by the renderer when it is creating a new window. The browser creates
// a tab for it. If |reply.route_id| is MSG_ROUTING_NONE, the view couldn't
// be created.
[Sync] CreateNewWindow(CreateNewWindowParams params)
=> (CreateNewWindowReply reply);
// Similar to CreateWindow, except used for sub-widgets, like <select>
// dropdowns.
[Sync] CreateNewWidget(int32 opener_id, content.mojom.WebPopupType popup_type)
=> (int32 route_id);
// Similar to CreateWidget except the widget is a full screen window.
[Sync] CreateFullscreenWidget(int32 opener_id)
=> (int32 route_id);
// The 2 following methods belong to a future CC related mojom.
// For now they need to be part of this channel associated interface to
// prevent running into message ordering issues (CC trying to access a shared
// bitmap before the registration message below made it to the browser).
//
// Informs the browser that the child allocated a shared bitmap.
AllocatedSharedBitmap(handle<shared_buffer> buffer, gpu.mojom.Mailbox id);
// Informs the browser that the child deleted a shared bitmap.
DeletedSharedBitmap(gpu.mojom.Mailbox id);
};