OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_BROWSER_PRESENTATION_PRESENTATION_SERVICE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_PRESENTATION_PRESENTATION_SERVICE_IMPL_H_ |
6 #define CONTENT_BROWSER_PRESENTATION_PRESENTATION_SERVICE_IMPL_H_ | 6 #define CONTENT_BROWSER_PRESENTATION_PRESENTATION_SERVICE_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 // Calls to |delegate_| to start listening for state changes for |connection|. | 225 // Calls to |delegate_| to start listening for state changes for |connection|. |
226 // State changes will be returned via |OnConnectionStateChanged|. Change | 226 // State changes will be returned via |OnConnectionStateChanged|. Change |
227 // |connection|'s state to 'connected' after listening. | 227 // |connection|'s state to 'connected' after listening. |
228 void ListenForConnectionStateChangeAndChangeState( | 228 void ListenForConnectionStateChangeAndChangeState( |
229 const PresentationSessionInfo& connection); | 229 const PresentationSessionInfo& connection); |
230 | 230 |
231 // Passed to embedder's implementation of PresentationServiceDelegate for | 231 // Passed to embedder's implementation of PresentationServiceDelegate for |
232 // later invocation when session messages arrive. | 232 // later invocation when session messages arrive. |
233 void OnConnectionMessages( | 233 void OnConnectionMessages( |
234 const content::PresentationSessionInfo& session, | 234 const content::PresentationSessionInfo& session, |
235 const ScopedVector<PresentationConnectionMessage>& messages, | 235 const std::vector<std::unique_ptr<PresentationConnectionMessage>>& |
| 236 messages, |
236 bool pass_ownership); | 237 bool pass_ownership); |
237 | 238 |
238 // Associates a JoinSession |callback| with a unique request ID and | 239 // Associates a JoinSession |callback| with a unique request ID and |
239 // stores it in a map. | 240 // stores it in a map. |
240 // Returns a positive value on success. | 241 // Returns a positive value on success. |
241 int RegisterJoinSessionCallback(const NewSessionCallback& callback); | 242 int RegisterJoinSessionCallback(const NewSessionCallback& callback); |
242 | 243 |
243 // Invoked by the embedder's PresentationServiceDelegate when a | 244 // Invoked by the embedder's PresentationServiceDelegate when a |
244 // PresentationConnection's state has changed. | 245 // PresentationConnection's state has changed. |
245 void OnConnectionStateChanged( | 246 void OnConnectionStateChanged( |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 288 |
288 // NOTE: Weak pointers must be invalidated before all other member variables. | 289 // NOTE: Weak pointers must be invalidated before all other member variables. |
289 base::WeakPtrFactory<PresentationServiceImpl> weak_factory_; | 290 base::WeakPtrFactory<PresentationServiceImpl> weak_factory_; |
290 | 291 |
291 DISALLOW_COPY_AND_ASSIGN(PresentationServiceImpl); | 292 DISALLOW_COPY_AND_ASSIGN(PresentationServiceImpl); |
292 }; | 293 }; |
293 | 294 |
294 } // namespace content | 295 } // namespace content |
295 | 296 |
296 #endif // CONTENT_BROWSER_PRESENTATION_PRESENTATION_SERVICE_IMPL_H_ | 297 #endif // CONTENT_BROWSER_PRESENTATION_PRESENTATION_SERVICE_IMPL_H_ |
OLD | NEW |