OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module content.mojom; | 5 module content.mojom; |
6 | 6 |
7 import "cc/ipc/shared_bitmap_manager.mojom"; | 7 import "cc/ipc/shared_bitmap_manager.mojom"; |
8 import "content/common/native_types.mojom"; | 8 import "content/common/native_types.mojom"; |
9 import "content/public/common/window_container_type.mojom"; | |
10 import "gpu/ipc/common/mailbox.mojom"; | |
11 import "third_party/WebKit/public/platform/referrer.mojom"; | |
12 import "third_party/WebKit/public/web/window_features.mojom"; | |
13 import "ui/base/mojo/window_open_disposition.mojom"; | |
14 import "url/mojo/url.mojom"; | |
15 | |
16 struct CreateNewWindowParams { | |
17 // The routing id of the frame initiating the open. | |
18 int32 opener_render_frame_id; | |
19 | |
20 // True if this open request came in the context of a user gesture. | |
21 bool user_gesture; | |
22 | |
23 // Type of window requested. | |
24 WindowContainerType window_container_type; | |
25 | |
26 // The session storage namespace ID this view should use. | |
27 int64 session_storage_namespace_id; | |
28 | |
29 // The name of the resulting frame that should be created (empty if none | |
30 // has been specified). UTF8 encoded string. | |
31 string frame_name; | |
32 | |
33 // The URL of the frame initiating the open. | |
34 url.mojom.Url opener_url; | |
35 | |
36 // The URL of the top frame containing the opener. | |
37 url.mojom.Url opener_top_level_frame_url; | |
38 | |
39 // The security origin of the frame initiating the open. | |
40 url.mojom.Url opener_security_origin; | |
41 | |
42 // Whether the opener will be suppressed in the new window, in which case | |
43 // scripting the new window is not allowed. | |
44 bool opener_suppressed; | |
45 | |
46 // Whether the window should be opened in the foreground, background, etc. | |
47 ui.mojom.WindowOpenDisposition disposition; | |
48 | |
49 // The URL that will be loaded in the new window (empty if none has been | |
50 // specified). | |
51 url.mojom.Url target_url; | |
52 | |
53 // The referrer that will be used to load |target_url| (empty if none has | |
54 // been specified). | |
55 blink.mojom.Referrer referrer; | |
56 | |
57 // The window features to use for the new view. | |
58 blink.mojom.WindowFeatures features; | |
59 }; | |
60 | |
61 struct CreateNewWindowReply { | |
62 // The ID of the view to be created. If the ID is MSG_ROUTING_NONE, then the | |
63 // opener RenderFrame should not create a RenderView in its process. | |
64 // MSG_ROUTING_NONE does not necessarily indicate failure; it may also occur | |
65 // in cases where a window was created, but the opener relationship is | |
66 // severed. | |
67 int32 route_id; | |
68 | |
69 // The ID of the main frame hosted in the view. | |
70 int32 main_frame_route_id; | |
71 | |
72 // The ID of the widget for the main frame. | |
73 int32 main_frame_widget_route_id; | |
74 | |
75 // Duplicated from CreateNewWindowParams because legacy code. | |
76 int64 cloned_session_storage_namespace_id; | |
77 }; | |
78 | 9 |
79 interface RenderMessageFilter { | 10 interface RenderMessageFilter { |
80 // Synchronously generates a new routing ID for the caller. | 11 // Synchronously generates a new routing ID for the caller. |
81 [Sync] GenerateRoutingID() => (int32 routing_id); | 12 [Sync] GenerateRoutingID() => (int32 routing_id); |
82 | 13 |
83 // Sent by the renderer when it is creating a new window. The browser creates | |
84 // a tab for it. If |reply.route_id| is MSG_ROUTING_NONE, the view couldn't | |
85 // be created. | |
86 [Sync] CreateNewWindow(CreateNewWindowParams params) | |
87 => (CreateNewWindowReply reply); | |
88 | |
89 // Similar to CreateWindow, except used for sub-widgets, like <select> | 14 // Similar to CreateWindow, except used for sub-widgets, like <select> |
90 // dropdowns. | 15 // dropdowns. |
91 [Sync] CreateNewWidget(int32 opener_id, content.mojom.WebPopupType popup_type) | 16 [Sync] CreateNewWidget(int32 opener_id, content.mojom.WebPopupType popup_type) |
92 => (int32 route_id); | 17 => (int32 route_id); |
93 | 18 |
94 // Similar to CreateWidget except the widget is a full screen window. | 19 // Similar to CreateWidget except the widget is a full screen window. |
95 [Sync] CreateFullscreenWidget(int32 opener_id) | 20 [Sync] CreateFullscreenWidget(int32 opener_id) |
96 => (int32 route_id); | 21 => (int32 route_id); |
97 | 22 |
98 GetSharedBitmapManager(associated cc.mojom.SharedBitmapManager& bitmap_manager
); | 23 GetSharedBitmapManager(associated cc.mojom.SharedBitmapManager& bitmap_manager
); |
99 }; | 24 }; |
OLD | NEW |