| Index: content/public/browser/presentation_service_delegate.h
|
| diff --git a/content/public/browser/presentation_service_delegate.h b/content/public/browser/presentation_service_delegate.h
|
| index 2929c47c5d9f5e4869ba1b1e1713453ad8fdd2b7..be18a083f21e581defd132919fcd7d57c634d430 100644
|
| --- a/content/public/browser/presentation_service_delegate.h
|
| +++ b/content/public/browser/presentation_service_delegate.h
|
| @@ -5,7 +5,9 @@
|
| #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
|
| #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
|
|
|
| +#include "base/callback.h"
|
| #include "content/common/content_export.h"
|
| +#include "content/public/browser/presentation_session.h"
|
|
|
| namespace content {
|
|
|
| @@ -25,6 +27,11 @@ class CONTENT_EXPORT PresentationServiceDelegate {
|
| virtual ~Observer() {}
|
| };
|
|
|
| + using PresentationSessionSuccessCallback =
|
| + base::Callback<void(const PresentationSessionInfo&)>;
|
| + using PresentationSessionErrorCallback =
|
| + base::Callback<void(const PresentationError&)>;
|
| +
|
| virtual ~PresentationServiceDelegate() {}
|
|
|
| // Registers an observer with this class to listen for updates to this class.
|
| @@ -59,6 +66,50 @@ class CONTENT_EXPORT PresentationServiceDelegate {
|
| virtual void RemoveAllScreenAvailabilityListeners(
|
| int render_process_id,
|
| int render_frame_id) = 0;
|
| +
|
| + // Sets the default presentation URL for frame given by |render_process_id|
|
| + // and |render_frame_id|.
|
| + // Pass in empty string to unset the default presentation URL.
|
| + virtual void SetDefaultPresentationUrl(
|
| + int render_process_id,
|
| + int render_frame_id,
|
| + const std::string& default_presentation_url) = 0;
|
| +
|
| + // Starts a new presentation session.
|
| + // This brings up a screen list for the user to select a screen to
|
| + // establish the presentation session on.
|
| + // |render_process_id|, |render_frame_id|: ID of originating frame.
|
| + // |presentation_url|: URL of the presentation.
|
| + // |presentation_id|: The caller may provide an non-empty string to be used
|
| + // as the ID of the presentation. If this is an empty string, the embedder
|
| + // will automatically generate one.
|
| + // |success_cb|: Invoked with session info, if presentation session started
|
| + // successfully.
|
| + // |error_cb|: Invoked with error reason, if presentation session did not
|
| + // start.
|
| + virtual void StartSession(
|
| + int render_process_id,
|
| + int render_frame_id,
|
| + const std::string& presentation_url,
|
| + const std::string& presentation_id,
|
| + const PresentationSessionSuccessCallback& success_cb,
|
| + const PresentationSessionErrorCallback& error_cb) = 0;
|
| +
|
| + // Joins an existing presentation session. Unlike StartSession(), this
|
| + // does not bring a screen list UI.
|
| + // |render_process_id|, |render_frame_id|: ID for originating frame.
|
| + // |presentation_url|: URL of the presentation.
|
| + // |presentation_id|: The ID of the presentation to join.
|
| + // |success_cb|: Invoked with session info, if presentation session joined
|
| + // successfully.
|
| + // |error_cb|: Invoked with error reason, if joining failed.
|
| + virtual void JoinSession(
|
| + int render_process_id,
|
| + int render_frame_id,
|
| + const std::string& presentation_url,
|
| + const std::string& presentation_id,
|
| + const PresentationSessionSuccessCallback& success_cb,
|
| + const PresentationSessionErrorCallback& error_cb) = 0;
|
| };
|
|
|
| } // namespace content
|
|
|