Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: content/browser/presentation/presentation_service_impl.h

Issue 2355723004: [Presentation API] 1-UA: send message between controller and receiver page (Closed)
Patch Set: Merge with changes in Issue 2343013002 Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 void OnJoinSessionError( 222 void OnJoinSessionError(
223 int request_session_id, 223 int request_session_id,
224 const PresentationError& error); 224 const PresentationError& error);
225 void OnSendMessageCallback(bool sent); 225 void OnSendMessageCallback(bool sent);
226 226
227 // Calls to |delegate_| to start listening for state changes for |connection|. 227 // Calls to |delegate_| to start listening for state changes for |connection|.
228 // State changes will be returned via |OnConnectionStateChanged|. 228 // State changes will be returned via |OnConnectionStateChanged|.
229 void ListenForConnectionStateChange( 229 void ListenForConnectionStateChange(
230 const PresentationSessionInfo& connection); 230 const PresentationSessionInfo& connection);
231 231
232 // OffscreenPresentationClient Implementation
232 // Passed to embedder's implementation of PresentationServiceDelegate for 233 // Passed to embedder's implementation of PresentationServiceDelegate for
233 // later invocation when session messages arrive. 234 // later invocation when session messages arrive.
234 void OnSessionMessages( 235 void OnSessionMessages(
235 const content::PresentationSessionInfo& session, 236 const content::PresentationSessionInfo& session,
236 const ScopedVector<PresentationSessionMessage>& messages, 237 const ScopedVector<PresentationSessionMessage>& messages,
237 bool pass_ownership); 238 bool pass_ownership) override;
239
240 void SetOffscreenPresentationClient(OffscreenPresentationClient*) override;
241
242 void RemoveOffscreenPresentationClient(OffscreenPresentationClient*) override;
238 243
239 void OnReceiverConnectionAvailable(const content::PresentationSessionInfo&, 244 void OnReceiverConnectionAvailable(const content::PresentationSessionInfo&,
240 OffscreenPresentationClient* controller); 245 OffscreenPresentationClient* controller);
241 246
242 // OffscreenPresentationClient Implementation
243 void SetOffscreenPresentationClient(OffscreenPresentationClient*) override;
244
245 void RemoveOffscreenPresentationClient(OffscreenPresentationClient*) override;
246
247 // Associates a JoinSession |callback| with a unique request ID and 247 // Associates a JoinSession |callback| with a unique request ID and
248 // stores it in a map. 248 // stores it in a map.
249 // Returns a positive value on success. 249 // Returns a positive value on success.
250 int RegisterJoinSessionCallback(const NewSessionCallback& callback); 250 int RegisterJoinSessionCallback(const NewSessionCallback& callback);
251 251
252 // Invoked by the embedder's PresentationServiceDelegate when a 252 // Invoked by the embedder's PresentationServiceDelegate when a
253 // PresentationConnection's state has changed. 253 // PresentationConnection's state has changed.
254 void OnConnectionStateChanged( 254 void OnConnectionStateChanged(
255 const PresentationSessionInfo& connection, 255 const PresentationSessionInfo& connection,
256 const PresentationConnectionStateChangeInfo& info); 256 const PresentationConnectionStateChangeInfo& info);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 // NOTE: Weak pointers must be invalidated before all other member variables. 303 // NOTE: Weak pointers must be invalidated before all other member variables.
304 base::WeakPtrFactory<PresentationServiceImpl> weak_factory_; 304 base::WeakPtrFactory<PresentationServiceImpl> weak_factory_;
305 305
306 DISALLOW_COPY_AND_ASSIGN(PresentationServiceImpl); 306 DISALLOW_COPY_AND_ASSIGN(PresentationServiceImpl);
307 }; 307 };
308 308
309 } // namespace content 309 } // namespace content
310 310
311 #endif // CONTENT_BROWSER_PRESENTATION_PRESENTATION_SERVICE_IMPL_H_ 311 #endif // CONTENT_BROWSER_PRESENTATION_PRESENTATION_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698