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

Side by Side Diff: mojo/services/public/interfaces/view_manager/view_manager.mojom

Issue 396703002: Makes Embed() take a single node (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 5 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 | Annotate | Revision Log
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 import "mojo/services/public/interfaces/geometry/geometry.mojom" 5 import "mojo/services/public/interfaces/geometry/geometry.mojom"
6 import "mojo/services/public/interfaces/input_events/input_events.mojom" 6 import "mojo/services/public/interfaces/input_events/input_events.mojom"
7 import "mojo/services/public/interfaces/view_manager/view_manager_constants.mojo m" 7 import "mojo/services/public/interfaces/view_manager/view_manager_constants.mojo m"
8 8
9 module mojo.view_manager { 9 module mojo.view_manager {
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 SetView(uint32 node_id, uint32 view_id) => (bool success); 119 SetView(uint32 node_id, uint32 view_id) => (bool success);
120 120
121 // Shows the specified image (png encoded) in the specified view. 121 // Shows the specified image (png encoded) in the specified view.
122 SetViewContents(uint32 view_id, 122 SetViewContents(uint32 view_id,
123 handle<shared_buffer> buffer, 123 handle<shared_buffer> buffer,
124 uint32 buffer_size) => (bool success); 124 uint32 buffer_size) => (bool success);
125 125
126 // Sets focus to the specified node. 126 // Sets focus to the specified node.
127 SetFocus(uint32 node_id) => (bool success); 127 SetFocus(uint32 node_id) => (bool success);
128 128
129 // Embeds the app at |url| in the specified nodes. More specifically this 129 // Embeds the app for |url| in the specified node. More specifically this
130 // creates a new connection to the specified url, expecting to get an 130 // creates a new connection to the specified url, expecting to get an
131 // ViewManagerClient and configures it with the root nodes |nodes|. Fails 131 // ViewManagerClient and configures it with the root node |node|. Fails
132 // if |nodes| is empty or contains nodes that were not created by this 132 // if |node| was not created by this connection.
133 // connection.
134 // If a particular client invokes Embed() multiple times with the same url, 133 // If a particular client invokes Embed() multiple times with the same url,
135 // the connection is reused. When this happens the ViewManagerClient is 134 // the connection is reused. When this happens the ViewManagerClient is
136 // notified of the additional roots by way of OnRootsAdded(). 135 // notified of the additional roots by way of OnRootAdded().
137 Embed(string url, uint32[] nodes) => (bool success); 136 Embed(string url, uint32 node_id) => (bool success);
138 137
139 // TODO(sky): move these to a separate interface when FIFO works. 138 // TODO(sky): move these to a separate interface when FIFO works.
140 139
141 // Sends OnViewInputEvent() to the owner of the specified view. 140 // Sends OnViewInputEvent() to the owner of the specified view.
142 DispatchOnViewInputEvent(uint32 view_id, mojo.Event event); 141 DispatchOnViewInputEvent(uint32 view_id, mojo.Event event);
143 }; 142 };
144 143
145 // Changes to nodes/views are not sent to the connection that originated the 144 // Changes to nodes/views are not sent to the connection that originated the
146 // change. For example, if connection 1 attaches a view to a node (SetView()) 145 // change. For example, if connection 1 attaches a view to a node (SetView())
147 // connection 1 does not receive OnNodeViewReplaced(). 146 // connection 1 does not receive OnNodeViewReplaced().
148 [Client=ViewManagerService] 147 [Client=ViewManagerService]
149 interface ViewManagerClient { 148 interface ViewManagerClient {
150 // Invoked once the connection has been established. |connection_id| is the id 149 // Invoked once the connection has been established. |connection_id| is the id
151 // that uniquely identifies this connection. |next_server_change_id| is the 150 // that uniquely identifies this connection. |next_server_change_id| is the
152 // id of the next change the server is expecting. |nodes| are the nodes 151 // id of the next change the server is expecting. |nodes| are the nodes
153 // parented to the root. 152 // parented to the root.
154 OnViewManagerConnectionEstablished(uint16 connection_id, 153 OnViewManagerConnectionEstablished(uint16 connection_id,
155 string creator_url, 154 string creator_url,
156 uint32 next_server_change_id, 155 uint32 next_server_change_id,
157 NodeData[] nodes); 156 NodeData[] nodes);
158 157
159 // See description of ViewManagerService::Connect() for details as to when 158 // See description of ViewManagerService::Embed() for details as to when
160 // this is invoked. 159 // this is invoked.
161 OnRootsAdded(NodeData[] nodes); 160 OnRootAdded(NodeData[] nodes);
162 161
163 // This is sent to clients when a change is made to the server that results 162 // This is sent to clients when a change is made to the server that results
164 // in the |server_change_id| changing but the client isn't notified. This is 163 // in the |server_change_id| changing but the client isn't notified. This is
165 // not sent if the client receives a callback giving a new 164 // not sent if the client receives a callback giving a new
166 // |server_change_id|. For example, if a client 1 changes the hierarchy in 165 // |server_change_id|. For example, if a client 1 changes the hierarchy in
167 // some way but client 2 isn't notified of the change, then client 2 gets 166 // some way but client 2 isn't notified of the change, then client 2 gets
168 // OnServerChangeIdAdvanced(). 167 // OnServerChangeIdAdvanced().
169 OnServerChangeIdAdvanced(uint32 next_server_change_id); 168 OnServerChangeIdAdvanced(uint32 next_server_change_id);
170 169
171 // Invoked when a node's bounds have changed. 170 // Invoked when a node's bounds have changed.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // entirely move to the window manager and this method can be 209 // entirely move to the window manager and this method can be
211 // removed. 210 // removed.
212 OnFocusChanged(uint32 gained_focus_id, uint32 lost_focus_id); 211 OnFocusChanged(uint32 gained_focus_id, uint32 lost_focus_id);
213 212
214 // TODO(sky): move to separate interface when FIFO sorted out. 213 // TODO(sky): move to separate interface when FIFO sorted out.
215 214
216 DispatchOnViewInputEvent(uint32 view, mojo.Event event); 215 DispatchOnViewInputEvent(uint32 view, mojo.Event event);
217 }; 216 };
218 217
219 } 218 }
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc ('k') | mojo/services/view_manager/root_node_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698