| 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 5283acfee576ed441a32b811d80ee6941c334611..44fb0e10fa36897dc12fa01d084d7f756200b6d5 100644
|
| --- a/content/browser/presentation/presentation_service_impl.h
|
| +++ b/content/browser/presentation/presentation_service_impl.h
|
| @@ -18,13 +18,13 @@
|
| #include "base/memory/scoped_vector.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "content/common/content_export.h"
|
| -#include "content/common/presentation/presentation_service.mojom.h"
|
| #include "content/public/browser/navigation_details.h"
|
| #include "content/public/browser/presentation_screen_availability_listener.h"
|
| #include "content/public/browser/presentation_service_delegate.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "content/public/common/frame_navigate_params.h"
|
| #include "mojo/public/cpp/bindings/binding.h"
|
| +#include "third_party/WebKit/public/platform/modules/presentation/presentation.mojom.h"
|
|
|
| namespace content {
|
|
|
| @@ -34,8 +34,8 @@ struct PresentationSessionMessage;
|
| class RenderFrameHost;
|
|
|
| using NewSessionMojoCallback =
|
| - mojo::Callback<void(mojom::PresentationSessionInfoPtr,
|
| - mojom::PresentationErrorPtr)>;
|
| + mojo::Callback<void(blink::mojom::PresentationSessionInfoPtr,
|
| + blink::mojom::PresentationErrorPtr)>;
|
|
|
| // Implementation of Mojo PresentationService.
|
| // It handles Presentation API requests coming from Blink / renderer process
|
| @@ -46,7 +46,7 @@ using NewSessionMojoCallback =
|
| // This class is instantiated on-demand via Mojo's ConnectToRemoteService
|
| // from the renderer when the first presentation API request is handled.
|
| class CONTENT_EXPORT PresentationServiceImpl
|
| - : public NON_EXPORTED_BASE(mojom::PresentationService),
|
| + : public NON_EXPORTED_BASE(blink::mojom::PresentationService),
|
| public WebContentsObserver,
|
| public PresentationServiceDelegate::Observer {
|
| public:
|
| @@ -57,7 +57,7 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| // |request|: The instance will be bound to this request. Used for Mojo setup.
|
| static void CreateMojoService(
|
| RenderFrameHost* render_frame_host,
|
| - mojo::InterfaceRequest<mojom::PresentationService> request);
|
| + mojo::InterfaceRequest<blink::mojom::PresentationService> request);
|
|
|
| private:
|
| friend class PresentationServiceImplTest;
|
| @@ -96,9 +96,9 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| static const int kMaxNumQueuedSessionRequests = 10;
|
|
|
| using PresentationSessionMojoCallback =
|
| - mojo::Callback<void(mojom::PresentationSessionInfoPtr)>;
|
| + mojo::Callback<void(blink::mojom::PresentationSessionInfoPtr)>;
|
| using SessionMessagesCallback =
|
| - mojo::Callback<void(mojo::Array<mojom::SessionMessagePtr>)>;
|
| + mojo::Callback<void(mojo::Array<blink::mojom::SessionMessagePtr>)>;
|
| using SendMessageMojoCallback = mojo::Callback<void(bool)>;
|
|
|
| // Listener implementation owned by PresentationServiceImpl. An instance of
|
| @@ -131,8 +131,8 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| const NewSessionMojoCallback& callback);
|
| ~NewSessionMojoCallbackWrapper();
|
|
|
| - void Run(mojom::PresentationSessionInfoPtr session,
|
| - mojom::PresentationErrorPtr error);
|
| + void Run(blink::mojom::PresentationSessionInfoPtr session,
|
| + blink::mojom::PresentationErrorPtr error);
|
|
|
| private:
|
| NewSessionMojoCallback callback_;
|
| @@ -151,7 +151,7 @@ class CONTENT_EXPORT PresentationServiceImpl
|
|
|
| // PresentationService implementation.
|
| void SetDefaultPresentationURL(const mojo::String& url) override;
|
| - void SetClient(mojom::PresentationServiceClientPtr client) override;
|
| + void SetClient(blink::mojom::PresentationServiceClientPtr client) override;
|
| void ListenForScreenAvailability(const mojo::String& url) override;
|
| void StopListeningForScreenAvailability(const mojo::String& url) override;
|
| void StartSession(
|
| @@ -161,18 +161,18 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| const mojo::String& presentation_url,
|
| const mojo::String& presentation_id,
|
| const NewSessionMojoCallback& callback) override;
|
| - void SendSessionMessage(mojom::PresentationSessionInfoPtr session_info,
|
| - mojom::SessionMessagePtr session_message,
|
| + void SendSessionMessage(blink::mojom::PresentationSessionInfoPtr session_info,
|
| + blink::mojom::SessionMessagePtr session_message,
|
| const SendMessageMojoCallback& callback) override;
|
| void CloseConnection(const mojo::String& presentation_url,
|
| const mojo::String& presentation_id) override;
|
| void Terminate(const mojo::String& presentation_url,
|
| const mojo::String& presentation_id) override;
|
| void ListenForSessionMessages(
|
| - mojom::PresentationSessionInfoPtr session) override;
|
| + blink::mojom::PresentationSessionInfoPtr session) override;
|
|
|
| // Creates a binding between this object and |request|.
|
| - void Bind(mojo::InterfaceRequest<mojom::PresentationService> request);
|
| + void Bind(mojo::InterfaceRequest<blink::mojom::PresentationService> request);
|
|
|
| // WebContentsObserver override.
|
| void DidNavigateAnyFrame(
|
| @@ -197,8 +197,8 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| // Returns true if the callback was found.
|
| bool RunAndEraseJoinSessionMojoCallback(
|
| int request_session_id,
|
| - mojom::PresentationSessionInfoPtr session,
|
| - mojom::PresentationErrorPtr error);
|
| + blink::mojom::PresentationSessionInfoPtr session,
|
| + blink::mojom::PresentationErrorPtr error);
|
|
|
| // Removes all listeners and resets default presentation URL on this instance
|
| // and informs the PresentationServiceDelegate of such.
|
| @@ -253,7 +253,7 @@ class CONTENT_EXPORT PresentationServiceImpl
|
|
|
| // Proxy to the PresentationServiceClient to send results (e.g., screen
|
| // availability) to.
|
| - mojom::PresentationServiceClientPtr client_;
|
| + blink::mojom::PresentationServiceClientPtr client_;
|
|
|
| std::string default_presentation_url_;
|
|
|
| @@ -272,7 +272,7 @@ class CONTENT_EXPORT PresentationServiceImpl
|
|
|
| // RAII binding of |this| to an Presentation interface request.
|
| // The binding is removed when binding_ is cleared or goes out of scope.
|
| - std::unique_ptr<mojo::Binding<mojom::PresentationService>> binding_;
|
| + std::unique_ptr<mojo::Binding<blink::mojom::PresentationService>> binding_;
|
|
|
| // There can be only one send message request at a time.
|
| std::unique_ptr<SendMessageMojoCallback> send_message_callback_;
|
|
|