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