| 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 #ifndef MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 typedef base::hash_set<Id> NodeIdSet; | 106 typedef base::hash_set<Id> NodeIdSet; |
| 107 | 107 |
| 108 // These functions return true if the corresponding mojom function is allowed | 108 // These functions return true if the corresponding mojom function is allowed |
| 109 // for this connection. | 109 // for this connection. |
| 110 bool CanRemoveNodeFromParent(const Node* node) const; | 110 bool CanRemoveNodeFromParent(const Node* node) const; |
| 111 bool CanAddNode(const Node* parent, const Node* child) const; | 111 bool CanAddNode(const Node* parent, const Node* child) const; |
| 112 bool CanDeleteNode(const NodeId& node_id) const; | 112 bool CanDeleteNode(const NodeId& node_id) const; |
| 113 bool CanDeleteView(const ViewId& view_id) const; | 113 bool CanDeleteView(const ViewId& view_id) const; |
| 114 bool CanSetView(const Node* node, const ViewId& view_id) const; | 114 bool CanSetView(const Node* node, const ViewId& view_id) const; |
| 115 bool CanGetNodeTree(const Node* node) const; | 115 bool CanGetNodeTree(const Node* node) const; |
| 116 bool CanConnect(const mojo::Array<uint32_t>& node_ids) const; | 116 bool CanEmbed(const mojo::Array<uint32_t>& node_ids) const; |
| 117 | 117 |
| 118 // Deletes a node owned by this connection. Returns true on success. |source| | 118 // Deletes a node owned by this connection. Returns true on success. |source| |
| 119 // is the connection that originated the change. | 119 // is the connection that originated the change. |
| 120 bool DeleteNodeImpl(ViewManagerConnection* source, const NodeId& node_id); | 120 bool DeleteNodeImpl(ViewManagerConnection* source, const NodeId& node_id); |
| 121 | 121 |
| 122 // Deletes a view owned by this connection. Returns true on success. |source| | 122 // Deletes a view owned by this connection. Returns true on success. |source| |
| 123 // is the connection that originated the change. | 123 // is the connection that originated the change. |
| 124 bool DeleteViewImpl(ViewManagerConnection* source, const ViewId& view_id); | 124 bool DeleteViewImpl(ViewManagerConnection* source, const ViewId& view_id); |
| 125 | 125 |
| 126 // Sets the view associated with a node. | 126 // Sets the view associated with a node. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 virtual void SetView(Id transport_node_id, | 179 virtual void SetView(Id transport_node_id, |
| 180 Id transport_view_id, | 180 Id transport_view_id, |
| 181 const Callback<void(bool)>& callback) OVERRIDE; | 181 const Callback<void(bool)>& callback) OVERRIDE; |
| 182 virtual void SetViewContents(Id view_id, | 182 virtual void SetViewContents(Id view_id, |
| 183 ScopedSharedBufferHandle buffer, | 183 ScopedSharedBufferHandle buffer, |
| 184 uint32_t buffer_size, | 184 uint32_t buffer_size, |
| 185 const Callback<void(bool)>& callback) OVERRIDE; | 185 const Callback<void(bool)>& callback) OVERRIDE; |
| 186 virtual void SetNodeBounds(Id node_id, | 186 virtual void SetNodeBounds(Id node_id, |
| 187 RectPtr bounds, | 187 RectPtr bounds, |
| 188 const Callback<void(bool)>& callback) OVERRIDE; | 188 const Callback<void(bool)>& callback) OVERRIDE; |
| 189 virtual void Connect(const mojo::String& url, | 189 virtual void Embed(const mojo::String& url, |
| 190 mojo::Array<uint32_t> node_ids, | 190 mojo::Array<uint32_t> node_ids, |
| 191 const mojo::Callback<void(bool)>& callback) OVERRIDE; | 191 const mojo::Callback<void(bool)>& callback) OVERRIDE; |
| 192 | 192 |
| 193 // Overridden from NodeDelegate: | 193 // Overridden from NodeDelegate: |
| 194 virtual void OnNodeHierarchyChanged(const Node* node, | 194 virtual void OnNodeHierarchyChanged(const Node* node, |
| 195 const Node* new_parent, | 195 const Node* new_parent, |
| 196 const Node* old_parent) OVERRIDE; | 196 const Node* old_parent) OVERRIDE; |
| 197 virtual void OnNodeViewReplaced(const Node* node, | 197 virtual void OnNodeViewReplaced(const Node* node, |
| 198 const View* new_view, | 198 const View* new_view, |
| 199 const View* old_view) OVERRIDE; | 199 const View* old_view) OVERRIDE; |
| 200 virtual void OnViewInputEvent(const View* view, | 200 virtual void OnViewInputEvent(const View* view, |
| 201 const ui::Event* event) OVERRIDE; | 201 const ui::Event* event) OVERRIDE; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 #if defined(OS_WIN) | 239 #if defined(OS_WIN) |
| 240 #pragma warning(pop) | 240 #pragma warning(pop) |
| 241 #endif | 241 #endif |
| 242 | 242 |
| 243 } // namespace service | 243 } // namespace service |
| 244 } // namespace view_manager | 244 } // namespace view_manager |
| 245 } // namespace mojo | 245 } // namespace mojo |
| 246 | 246 |
| 247 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 247 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
| OLD | NEW |