Index: content/browser/presentation/presentation_service_impl.h |
diff --git a/content/browser/presentation/presentation_service_impl.h b/content/browser/presentation/presentation_service_impl.h |
index 220c256a5dc7ff31bd51271ffa98fad6ae679c34..54e1a4c14975d0589cf37ae56169a4c07ce7ead5 100644 |
--- a/content/browser/presentation/presentation_service_impl.h |
+++ b/content/browser/presentation/presentation_service_impl.h |
@@ -94,7 +94,7 @@ class CONTENT_EXPORT PresentationServiceImpl |
// Maximum number of pending JoinSession requests at any given time. |
static const int kMaxNumQueuedSessionRequests = 10; |
- using DefaultSessionMojoCallback = |
+ using PresentationSessionMojoCallback = |
mojo::Callback<void(presentation::PresentationSessionInfoPtr)>; |
using SessionStateCallback = |
mojo::Callback<void(presentation::PresentationSessionInfoPtr, |
@@ -125,27 +125,6 @@ class CONTENT_EXPORT PresentationServiceImpl |
PresentationServiceImpl* const service_; |
}; |
- class CONTENT_EXPORT DefaultSessionStartContext { |
- public: |
- DefaultSessionStartContext(); |
- ~DefaultSessionStartContext(); |
- |
- // Adds a callback. May invoke the callback immediately if |session| using |
- // default presentation URL was already started. |
- void AddCallback(const DefaultSessionMojoCallback& callback); |
- |
- // Sets the session info. Maybe invoke callbacks queued with AddCallback(). |
- void set_session(const PresentationSessionInfo& session); |
- |
- private: |
- // Flush all queued callbacks by invoking them with null |
- // PresentationSessionInfoPtr. |
- void Reset(); |
- |
- ScopedVector<DefaultSessionMojoCallback> callbacks_; |
- scoped_ptr<PresentationSessionInfo> session_; |
- }; |
- |
// Ensures the provided NewSessionMojoCallback is invoked exactly once |
// before it goes out of scope. |
class NewSessionMojoCallbackWrapper { |
@@ -177,8 +156,6 @@ class CONTENT_EXPORT PresentationServiceImpl |
void SetClient(presentation::PresentationServiceClientPtr client) override; |
void ListenForScreenAvailability(const mojo::String& url) override; |
void StopListeningForScreenAvailability(const mojo::String& url) override; |
- void ListenForDefaultSessionStart( |
- const DefaultSessionMojoCallback& callback) override; |
void StartSession( |
const mojo::String& presentation_url, |
const NewSessionMojoCallback& callback) override; |
@@ -208,8 +185,11 @@ class CONTENT_EXPORT PresentationServiceImpl |
// PresentationServiceDelegate::Observer |
void OnDelegateDestroyed() override; |
- void OnDefaultPresentationStarted(const PresentationSessionInfo& session) |
- override; |
+ |
+ // Passed to embedder's implementation of PresentationServiceDelegate for |
+ // later invocation when default presentation has started. |
+ void OnDefaultPresentationStarted( |
+ const PresentationSessionInfo& session_info); |
// Finds the callback from |pending_join_session_cbs_| using |
// |request_session_id|. |
@@ -284,8 +264,6 @@ class CONTENT_EXPORT PresentationServiceImpl |
base::hash_map<int, linked_ptr<NewSessionMojoCallbackWrapper>> |
pending_join_session_cbs_; |
- scoped_ptr<DefaultSessionStartContext> default_session_start_context_; |
- |
// RAII binding of |this| to an Presentation interface request. |
// The binding is removed when binding_ is cleared or goes out of scope. |
scoped_ptr<mojo::Binding<presentation::PresentationService>> binding_; |