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

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

Issue 405163002: Add EmbedRoot to ViewManagerService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 15 matching lines...) Expand all
26 // ViewManager by embedding it at an approriate Node. 26 // ViewManager by embedding it at an approriate Node.
27 interface ViewManagerInitService { 27 interface ViewManagerInitService {
28 // Embed the application @ |url| at an appropriate Node. 28 // Embed the application @ |url| at an appropriate Node.
29 // The first time this method is called in the lifetime of a View Manager 29 // The first time this method is called in the lifetime of a View Manager
30 // application instance, the "appropriate Node" is defined as being the 30 // application instance, the "appropriate Node" is defined as being the
31 // service root Node. 31 // service root Node.
32 // Subsequent times, implementation of this method is delegated to the 32 // Subsequent times, implementation of this method is delegated to the
33 // application embedded at the service root Node. This application is 33 // application embedded at the service root Node. This application is
34 // typically referred to as the "window manager", and will have a specific 34 // typically referred to as the "window manager", and will have a specific
35 // definition of where within its Node hierarchy to embed an unparented URL. 35 // definition of where within its Node hierarchy to embed an unparented URL.
36 EmbedRoot(string url) => (bool success); 36 Embed(string url) => (bool success);
37 }; 37 };
38 38
39 // Nodes and Views are identified by a uint32. The upper 16 bits are the 39 // Nodes and Views are identified by a uint32. The upper 16 bits are the
40 // connection id, and the lower 16 the id assigned by the client. 40 // connection id, and the lower 16 the id assigned by the client.
41 // 41 //
42 // The root node is identified with a connection id of 0, and value of 1. 42 // The root node is identified with a connection id of 0, and value of 1.
43 [Client=ViewManagerClient] 43 [Client=ViewManagerClient]
44 interface ViewManagerService { 44 interface ViewManagerService {
45 // Creates a new node with the specified id. It is up to the client to ensure 45 // Creates a new node with the specified id. It is up to the client to ensure
46 // the id is unique to the connection (the id need not be globally unique). 46 // the id is unique to the connection (the id need not be globally unique).
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // 127 //
128 // If a particular client invokes Embed() multiple times with the same url, 128 // If a particular client invokes Embed() multiple times with the same url,
129 // the connection is reused. When this happens the ViewManagerClient is 129 // the connection is reused. When this happens the ViewManagerClient is
130 // notified of the additional roots by way of OnRootAdded(). 130 // notified of the additional roots by way of OnRootAdded().
131 // 131 //
132 // A node may only be a root of one connection at a time. Subsequent calls to 132 // A node may only be a root of one connection at a time. Subsequent calls to
133 // Embed() for the same node result in the node being removed from the 133 // Embed() for the same node result in the node being removed from the
134 // current connection. The current connection is told this by way of 134 // current connection. The current connection is told this by way of
135 // OnNodeDeleted(). 135 // OnNodeDeleted().
136 // 136 //
137 // If |node_id| is 0, the View Manager delegates determination of what node to
138 // embed |url| at to the app embedded at the service root node (i.e. the
139 // window manager).
140 //
137 // This advances the server change id. 141 // This advances the server change id.
138 Embed(string url, uint32 node_id) => (bool success); 142 Embed(string url, uint32 node_id) => (bool success);
139 143
140 // TODO(sky): move these to a separate interface when FIFO works. 144 // TODO(sky): move these to a separate interface when FIFO works.
141 145
142 // Sends OnViewInputEvent() to the owner of the specified view. 146 // Sends OnViewInputEvent() to the owner of the specified view.
143 DispatchOnViewInputEvent(uint32 view_id, mojo.Event event); 147 DispatchOnViewInputEvent(uint32 view_id, mojo.Event event);
144 }; 148 };
145 149
146 // Changes to nodes/views are not sent to the connection that originated the 150 // Changes to nodes/views are not sent to the connection that originated the
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // removed. 204 // removed.
201 OnFocusChanged(uint32 gained_focus_id, uint32 lost_focus_id); 205 OnFocusChanged(uint32 gained_focus_id, uint32 lost_focus_id);
202 206
203 // TODO(sky): The following methods represent an interface between the view 207 // TODO(sky): The following methods represent an interface between the view
204 // manager and the application embedded at the service root node 208 // manager and the application embedded at the service root node
205 // (i.e. the window manager). These methods are not called on 209 // (i.e. the window manager). These methods are not called on
206 // any other clients. They should be moved to a separate interface 210 // any other clients. They should be moved to a separate interface
207 // once support for derived FIFOs is landed. 211 // once support for derived FIFOs is landed.
208 212
209 // Requests the window manager create a "top level" node embedding |url|. 213 // Requests the window manager create a "top level" node embedding |url|.
210 EmbedRoot(string url); 214 Embed(string url);
211 215
212 // Requests the view manager dispatch the event targeted at |view|. 216 // Requests the view manager dispatch the event targeted at |view|.
213 DispatchOnViewInputEvent(uint32 view, mojo.Event event); 217 DispatchOnViewInputEvent(uint32 view, mojo.Event event);
214 }; 218 };
215 219
216 } 220 }
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/view_manager/window_manager_delegate.h ('k') | mojo/services/view_manager/root_node_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698