| 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_ROOT_NODE_MANAGER_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_ |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 bool is_processing_delete_node() const { | 105 bool is_processing_delete_node() const { |
| 106 return current_change_ && current_change_->is_delete_node(); } | 106 return current_change_ && current_change_->is_delete_node(); } |
| 107 | 107 |
| 108 // Invoked when a connection messages a client about the change. This is used | 108 // Invoked when a connection messages a client about the change. This is used |
| 109 // to avoid sending ServerChangeIdAdvanced() unnecessarily. | 109 // to avoid sending ServerChangeIdAdvanced() unnecessarily. |
| 110 void OnConnectionMessagedClient(ConnectionSpecificId id); | 110 void OnConnectionMessagedClient(ConnectionSpecificId id); |
| 111 | 111 |
| 112 // Returns true if OnConnectionMessagedClient() was invoked for id. | 112 // Returns true if OnConnectionMessagedClient() was invoked for id. |
| 113 bool DidConnectionMessageClient(ConnectionSpecificId id) const; | 113 bool DidConnectionMessageClient(ConnectionSpecificId id) const; |
| 114 | 114 |
| 115 ViewManagerServiceImpl* GetConnectionByCreator( | |
| 116 ConnectionSpecificId creator_id, | |
| 117 const std::string& url) const; | |
| 118 | |
| 119 // Returns the ViewManagerServiceImpl that has |id| as a root. | 115 // Returns the ViewManagerServiceImpl that has |id| as a root. |
| 120 ViewManagerServiceImpl* GetConnectionWithRoot(const NodeId& id) { | 116 ViewManagerServiceImpl* GetConnectionWithRoot(const NodeId& id) { |
| 121 return const_cast<ViewManagerServiceImpl*>( | 117 return const_cast<ViewManagerServiceImpl*>( |
| 122 const_cast<const RootNodeManager*>(this)->GetConnectionWithRoot(id)); | 118 const_cast<const RootNodeManager*>(this)->GetConnectionWithRoot(id)); |
| 123 } | 119 } |
| 124 const ViewManagerServiceImpl* GetConnectionWithRoot(const NodeId& id) const; | 120 const ViewManagerServiceImpl* GetConnectionWithRoot(const NodeId& id) const; |
| 125 | 121 |
| 126 void DispatchNodeInputEventToWindowManager(const Node* node, | 122 void DispatchNodeInputEventToWindowManager(const Node* node, |
| 127 const ui::Event* event); | 123 const ui::Event* event); |
| 128 | 124 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // (it's created on the stack by ViewManagerServiceImpl). | 206 // (it's created on the stack by ViewManagerServiceImpl). |
| 211 ScopedChange* current_change_; | 207 ScopedChange* current_change_; |
| 212 | 208 |
| 213 DISALLOW_COPY_AND_ASSIGN(RootNodeManager); | 209 DISALLOW_COPY_AND_ASSIGN(RootNodeManager); |
| 214 }; | 210 }; |
| 215 | 211 |
| 216 } // namespace service | 212 } // namespace service |
| 217 } // namespace mojo | 213 } // namespace mojo |
| 218 | 214 |
| 219 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_ | 215 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_ |
| OLD | NEW |