Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: content/common/frame.mojom

Issue 2821473002: Service CreateNewWindow on the UI thread with a new mojo interface (Closed)
Patch Set: Move over to render frame (but not WebFrameClient yet) + a bunch of cleanups Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/public/common/window_container_type.mojom";
7 import "services/service_manager/public/interfaces/interface_provider.mojom"; 8 import "services/service_manager/public/interfaces/interface_provider.mojom";
9 import "third_party/WebKit/public/platform/referrer.mojom";
10 import "third_party/WebKit/public/web/window_features.mojom";
11 import "ui/base/mojo/window_open_disposition.mojom";
12 import "url/mojo/url.mojom";
8 13
9 // The name of the InterfaceProviderSpec in service manifests used by the 14 // The name of the InterfaceProviderSpec in service manifests used by the
10 // frame tree to expose frame-specific interfaces between renderer and browser. 15 // frame tree to expose frame-specific interfaces between renderer and browser.
11 const string kNavigation_FrameSpec = "navigation:frame"; 16 const string kNavigation_FrameSpec = "navigation:frame";
12 17
13 // Implemented by the frame provider (e.g. renderer processes). 18 // Implemented by the frame provider (e.g. renderer processes).
14 interface Frame { 19 interface Frame {
15 GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces); 20 GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces);
16 }; 21 };
17 22
(...skipping 10 matching lines...) Expand all
28 // Implemented by the frame server (i.e. the browser process). 33 // Implemented by the frame server (i.e. the browser process).
29 interface FrameHost { 34 interface FrameHost {
30 GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces); 35 GetInterfaceProvider(service_manager.mojom.InterfaceProvider& interfaces);
31 }; 36 };
32 37
33 // Implemented by a service that provides implementations of the Frame 38 // Implemented by a service that provides implementations of the Frame
34 // interface. (e.g. renderer processes). 39 // interface. (e.g. renderer processes).
35 interface FrameFactory { 40 interface FrameFactory {
36 CreateFrame(int32 frame_routing_id, Frame& frame, FrameHost host); 41 CreateFrame(int32 frame_routing_id, Frame& frame, FrameHost host);
37 }; 42 };
43
44 // TODO(csharrison): Clean up this struct. Some of the entries (like
45 // opener_top_level_frame_url) are better suited to be computed in the browser
46 // process.
47 struct CreateNewWindowParams {
48 // The routing id of the frame initiating the open.
49 int32 opener_render_frame_id;
50
51 // True if this open request came in the context of a user gesture.
52 bool user_gesture;
53
54 // Type of window requested.
55 WindowContainerType window_container_type;
56
57 // The session storage namespace ID this view should use.
58 int64 session_storage_namespace_id;
59
60 // The name of the resulting frame that should be created (empty if none
61 // has been specified). UTF8 encoded string.
62 string frame_name;
63
64 // The URL of the frame initiating the open.
65 url.mojom.Url opener_url;
66
67 // The URL of the top frame containing the opener.
68 url.mojom.Url opener_top_level_frame_url;
69
70 // The security origin of the frame initiating the open.
71 url.mojom.Url opener_security_origin;
72
73 // Whether the opener will be suppressed in the new window, in which case
74 // scripting the new window is not allowed.
75 bool opener_suppressed;
76
77 // Whether the window should be opened in the foreground, background, etc.
78 ui.mojom.WindowOpenDisposition disposition;
79
80 // The URL that will be loaded in the new window (empty if none has been
81 // specified).
82 url.mojom.Url target_url;
83
84 // The referrer that will be used to load |target_url| (empty if none has
85 // been specified).
86 blink.mojom.Referrer referrer;
87
88 // The window features to use for the new view.
89 blink.mojom.WindowFeatures features;
90 };
91
92 struct CreateNewWindowReply {
93 // The ID of the view to be created. If the ID is MSG_ROUTING_NONE, then the
94 // opener RenderFrame should not create a RenderView in its process.
95 // MSG_ROUTING_NONE does not necessarily indicate failure; it may also occur
96 // in cases where a window was created, but the opener relationship is
97 // severed.
98 int32 route_id;
99
100 // The ID of the main frame hosted in the view.
101 int32 main_frame_route_id;
102
103 // The ID of the widget for the main frame.
104 int32 main_frame_widget_route_id;
105
106 // Duplicated from CreateNewWindowParams because legacy code.
107 int64 cloned_session_storage_namespace_id;
108 };
109
110 // Implemented by the frame server (i.e. the browser process). For messages that
111 // must be associated with the IPC channel.
112 interface FrameHostIPC {
113 // Sent by the renderer when it is creating a new window. The browser creates
114 // a tab for it. If |reply.route_id| is MSG_ROUTING_NONE, the view couldn't
115 // be created.
116 [Sync] CreateNewWindow(CreateNewWindowParams params)
117 => (CreateNewWindowReply reply);
118 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698