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_CONNECTION_MANAGER_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
6 #define MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 return current_change_ && current_change_->is_delete_view(); | 103 return current_change_ && current_change_->is_delete_view(); |
104 } | 104 } |
105 | 105 |
106 // Invoked when a connection messages a client about the change. This is used | 106 // Invoked when a connection messages a client about the change. This is used |
107 // to avoid sending ServerChangeIdAdvanced() unnecessarily. | 107 // to avoid sending ServerChangeIdAdvanced() unnecessarily. |
108 void OnConnectionMessagedClient(ConnectionSpecificId id); | 108 void OnConnectionMessagedClient(ConnectionSpecificId id); |
109 | 109 |
110 // Returns true if OnConnectionMessagedClient() was invoked for id. | 110 // Returns true if OnConnectionMessagedClient() was invoked for id. |
111 bool DidConnectionMessageClient(ConnectionSpecificId id) const; | 111 bool DidConnectionMessageClient(ConnectionSpecificId id) const; |
112 | 112 |
113 ViewManagerServiceImpl* GetConnectionByCreator( | |
114 ConnectionSpecificId creator_id, | |
115 const std::string& url) const; | |
116 | |
117 // Returns the ViewManagerServiceImpl that has |id| as a root. | 113 // Returns the ViewManagerServiceImpl that has |id| as a root. |
118 ViewManagerServiceImpl* GetConnectionWithRoot(const ViewId& id) { | 114 ViewManagerServiceImpl* GetConnectionWithRoot(const ViewId& id) { |
119 return const_cast<ViewManagerServiceImpl*>( | 115 return const_cast<ViewManagerServiceImpl*>( |
120 const_cast<const ConnectionManager*>(this)->GetConnectionWithRoot(id)); | 116 const_cast<const ConnectionManager*>(this)->GetConnectionWithRoot(id)); |
121 } | 117 } |
122 const ViewManagerServiceImpl* GetConnectionWithRoot(const ViewId& id) const; | 118 const ViewManagerServiceImpl* GetConnectionWithRoot(const ViewId& id) const; |
123 | 119 |
124 void DispatchViewInputEventToWindowManager(EventPtr event); | 120 void DispatchViewInputEventToWindowManager(EventPtr event); |
125 | 121 |
126 // These functions trivially delegate to all ViewManagerServiceImpls, which in | 122 // These functions trivially delegate to all ViewManagerServiceImpls, which in |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // (it's created on the stack by ViewManagerServiceImpl). | 197 // (it's created on the stack by ViewManagerServiceImpl). |
202 ScopedChange* current_change_; | 198 ScopedChange* current_change_; |
203 | 199 |
204 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); | 200 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); |
205 }; | 201 }; |
206 | 202 |
207 } // namespace service | 203 } // namespace service |
208 } // namespace mojo | 204 } // namespace mojo |
209 | 205 |
210 #endif // MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ | 206 #endif // MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
OLD | NEW |