| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // These functions return true if the corresponding mojom function is allowed | 114 // These functions return true if the corresponding mojom function is allowed |
| 115 // for this connection. | 115 // for this connection. |
| 116 bool CanRemoveNodeFromParent(const Node* node) const; | 116 bool CanRemoveNodeFromParent(const Node* node) const; |
| 117 bool CanAddNode(const Node* parent, const Node* child) const; | 117 bool CanAddNode(const Node* parent, const Node* child) const; |
| 118 bool CanReorderNode(const Node* node, | 118 bool CanReorderNode(const Node* node, |
| 119 const Node* relative_node, | 119 const Node* relative_node, |
| 120 OrderDirection direction) const; | 120 OrderDirection direction) const; |
| 121 bool CanDeleteNode(const NodeId& node_id) const; | 121 bool CanDeleteNode(const NodeId& node_id) const; |
| 122 bool CanDeleteView(const ViewId& view_id) const; | 122 bool CanDeleteView(const ViewId& view_id) const; |
| 123 bool CanSetView(const Node* node, const ViewId& view_id) const; | 123 bool CanSetView(const Node* node, const ViewId& view_id) const; |
| 124 bool CanSetFocus(const Node* node) const; |
| 124 bool CanGetNodeTree(const Node* node) const; | 125 bool CanGetNodeTree(const Node* node) const; |
| 125 bool CanEmbed(const mojo::Array<uint32_t>& node_ids) const; | 126 bool CanEmbed(const mojo::Array<uint32_t>& node_ids) const; |
| 126 | 127 |
| 127 // Deletes a node owned by this connection. Returns true on success. |source| | 128 // Deletes a node owned by this connection. Returns true on success. |source| |
| 128 // is the connection that originated the change. | 129 // is the connection that originated the change. |
| 129 bool DeleteNodeImpl(ViewManagerConnection* source, const NodeId& node_id); | 130 bool DeleteNodeImpl(ViewManagerConnection* source, const NodeId& node_id); |
| 130 | 131 |
| 131 // Deletes a view owned by this connection. Returns true on success. |source| | 132 // Deletes a view owned by this connection. Returns true on success. |source| |
| 132 // is the connection that originated the change. | 133 // is the connection that originated the change. |
| 133 bool DeleteViewImpl(ViewManagerConnection* source, const ViewId& view_id); | 134 bool DeleteViewImpl(ViewManagerConnection* source, const ViewId& view_id); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 const Callback<void(bool)>& callback) OVERRIDE; | 191 const Callback<void(bool)>& callback) OVERRIDE; |
| 191 virtual void DeleteView(Id transport_view_id, | 192 virtual void DeleteView(Id transport_view_id, |
| 192 const Callback<void(bool)>& callback) OVERRIDE; | 193 const Callback<void(bool)>& callback) OVERRIDE; |
| 193 virtual void SetView(Id transport_node_id, | 194 virtual void SetView(Id transport_node_id, |
| 194 Id transport_view_id, | 195 Id transport_view_id, |
| 195 const Callback<void(bool)>& callback) OVERRIDE; | 196 const Callback<void(bool)>& callback) OVERRIDE; |
| 196 virtual void SetViewContents(Id view_id, | 197 virtual void SetViewContents(Id view_id, |
| 197 ScopedSharedBufferHandle buffer, | 198 ScopedSharedBufferHandle buffer, |
| 198 uint32_t buffer_size, | 199 uint32_t buffer_size, |
| 199 const Callback<void(bool)>& callback) OVERRIDE; | 200 const Callback<void(bool)>& callback) OVERRIDE; |
| 201 virtual void SetFocus(Id node_id, |
| 202 const Callback<void(bool)> & callback) OVERRIDE; |
| 200 virtual void SetNodeBounds(Id node_id, | 203 virtual void SetNodeBounds(Id node_id, |
| 201 RectPtr bounds, | 204 RectPtr bounds, |
| 202 const Callback<void(bool)>& callback) OVERRIDE; | 205 const Callback<void(bool)>& callback) OVERRIDE; |
| 203 virtual void Embed(const mojo::String& url, | 206 virtual void Embed(const mojo::String& url, |
| 204 mojo::Array<uint32_t> node_ids, | 207 mojo::Array<uint32_t> node_ids, |
| 205 const mojo::Callback<void(bool)>& callback) OVERRIDE; | 208 const mojo::Callback<void(bool)>& callback) OVERRIDE; |
| 206 | 209 |
| 207 // Overridden from NodeDelegate: | 210 // Overridden from NodeDelegate: |
| 208 virtual void OnNodeHierarchyChanged(const Node* node, | 211 virtual void OnNodeHierarchyChanged(const Node* node, |
| 209 const Node* new_parent, | 212 const Node* new_parent, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 258 |
| 256 #if defined(OS_WIN) | 259 #if defined(OS_WIN) |
| 257 #pragma warning(pop) | 260 #pragma warning(pop) |
| 258 #endif | 261 #endif |
| 259 | 262 |
| 260 } // namespace service | 263 } // namespace service |
| 261 } // namespace view_manager | 264 } // namespace view_manager |
| 262 } // namespace mojo | 265 } // namespace mojo |
| 263 | 266 |
| 264 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 267 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
| OLD | NEW |