| OLD | NEW |
| 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 mojo.services.view_manager { | 5 module mojo.services.view_manager { |
| 6 | 6 |
| 7 struct INode { | 7 struct INode { |
| 8 uint32 parent_id; | 8 uint32 parent_id; |
| 9 uint32 node_id; | 9 uint32 node_id; |
| 10 uint32 view_id; | 10 uint32 view_id; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // Creates a new view with the specified id. It is up to the client to ensure | 47 // Creates a new view with the specified id. It is up to the client to ensure |
| 48 // the id is unique to the connection (the id need not be globally unique). | 48 // the id is unique to the connection (the id need not be globally unique). |
| 49 CreateView(uint16 view_id) => (bool success); | 49 CreateView(uint16 view_id) => (bool success); |
| 50 | 50 |
| 51 // Deletes the view with the specified id. | 51 // Deletes the view with the specified id. |
| 52 DeleteView(uint32 view_id, uint32 change_id) => (bool success); | 52 DeleteView(uint32 view_id, uint32 change_id) => (bool success); |
| 53 | 53 |
| 54 // Sets the view a node is showing. | 54 // Sets the view a node is showing. |
| 55 SetView(uint32 node_id, uint32 view_id, uint32 change_id) => (bool success); | 55 SetView(uint32 node_id, uint32 view_id, uint32 change_id) => (bool success); |
| 56 |
| 57 // Shows the specified image (png encoded) in the specified view. |
| 58 SetViewContents(uint32 view_id, |
| 59 handle<shared_buffer> buffer, |
| 60 uint32 buffer_size); |
| 56 }; | 61 }; |
| 57 | 62 |
| 58 [Peer=IViewManager] | 63 [Peer=IViewManager] |
| 59 interface IViewManagerClient { | 64 interface IViewManagerClient { |
| 60 // Invoked once the connection has been established. |connection_id| is the id | 65 // Invoked once the connection has been established. |connection_id| is the id |
| 61 // used to uniquely identify the connection. | 66 // used to uniquely identify the connection. |
| 62 OnConnectionEstablished(uint16 connection_id); | 67 OnConnectionEstablished(uint16 connection_id); |
| 63 | 68 |
| 64 // Invoked when a change is done to the hierarchy. A value of 0 is used to | 69 // Invoked when a change is done to the hierarchy. A value of 0 is used to |
| 65 // identify a null node. For example, if the old_parent is NULL, 0 is | 70 // identify a null node. For example, if the old_parent is NULL, 0 is |
| 66 // supplied. See description above ViewManager for details on |change_id|. | 71 // supplied. See description above ViewManager for details on |change_id|. |
| 67 OnNodeHierarchyChanged(uint32 node, | 72 OnNodeHierarchyChanged(uint32 node, |
| 68 uint32 new_parent, | 73 uint32 new_parent, |
| 69 uint32 old_parent, | 74 uint32 old_parent, |
| 70 uint32 change_id); | 75 uint32 change_id); |
| 71 | 76 |
| 72 // Invoked when the view associated with a node is replaced by another view. | 77 // Invoked when the view associated with a node is replaced by another view. |
| 73 // 0 is used to identify a null view. | 78 // 0 is used to identify a null view. |
| 74 OnNodeViewReplaced(uint32 node, | 79 OnNodeViewReplaced(uint32 node, |
| 75 uint32 new_view_id, | 80 uint32 new_view_id, |
| 76 uint32 old_view_id, | 81 uint32 old_view_id, |
| 77 uint32 change_id); | 82 uint32 change_id); |
| 78 }; | 83 }; |
| 79 | 84 |
| 80 } | 85 } |
| OLD | NEW |