| 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 0868ddaeef2ad3ba23625874d6c289df1d5fa545..7f179071acf464d733c8aa26cab9c53cc75780eb 100644
|
| --- a/content/browser/presentation/presentation_service_impl.h
|
| +++ b/content/browser/presentation/presentation_service_impl.h
|
| @@ -21,13 +21,13 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/optional.h"
|
| #include "content/common/content_export.h"
|
| +#include "content/common/presentation/presentation.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"
|
| #include "url/gurl.h"
|
|
|
| namespace content {
|
| @@ -46,13 +46,13 @@ class RenderFrameHost;
|
| // 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(blink::mojom::PresentationService),
|
| + : public NON_EXPORTED_BASE(content::mojom::PresentationService),
|
| public WebContentsObserver,
|
| public PresentationServiceDelegate::Observer {
|
| public:
|
| using NewSessionCallback =
|
| - base::Callback<void(blink::mojom::PresentationSessionInfoPtr,
|
| - blink::mojom::PresentationErrorPtr)>;
|
| + base::Callback<void(content::mojom::PresentationSessionInfoPtr,
|
| + content::mojom::PresentationErrorPtr)>;
|
|
|
| ~PresentationServiceImpl() override;
|
|
|
| @@ -61,7 +61,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<blink::mojom::PresentationService> request);
|
| + mojo::InterfaceRequest<content::mojom::PresentationService> request);
|
|
|
| private:
|
| friend class PresentationServiceImplTest;
|
| @@ -104,7 +104,7 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| static const int kMaxNumQueuedSessionRequests = 10;
|
|
|
| using ConnectionMessagesCallback =
|
| - base::Callback<void(std::vector<blink::mojom::ConnectionMessagePtr>)>;
|
| + base::Callback<void(std::vector<content::mojom::ConnectionMessagePtr>)>;
|
| using SendConnectionMessageCallback = base::Callback<void(bool)>;
|
|
|
| // Listener implementation owned by PresentationServiceImpl. An instance of
|
| @@ -136,8 +136,8 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| const NewSessionCallback& callback);
|
| ~NewSessionCallbackWrapper();
|
|
|
| - void Run(blink::mojom::PresentationSessionInfoPtr session,
|
| - blink::mojom::PresentationErrorPtr error);
|
| + void Run(content::mojom::PresentationSessionInfoPtr session,
|
| + content::mojom::PresentationErrorPtr error);
|
|
|
| private:
|
| NewSessionCallback callback_;
|
| @@ -162,7 +162,7 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| // PresentationService implementation.
|
| void SetDefaultPresentationUrls(
|
| const std::vector<GURL>& presentation_urls) override;
|
| - void SetClient(blink::mojom::PresentationServiceClientPtr client) override;
|
| + void SetClient(content::mojom::PresentationServiceClientPtr client) override;
|
| void ListenForScreenAvailability(const GURL& url) override;
|
| void StopListeningForScreenAvailability(const GURL& url) override;
|
| void StartSession(const std::vector<GURL>& presentation_urls,
|
| @@ -171,23 +171,24 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| const base::Optional<std::string>& presentation_id,
|
| const NewSessionCallback& callback) override;
|
| void SendConnectionMessage(
|
| - blink::mojom::PresentationSessionInfoPtr session_info,
|
| - blink::mojom::ConnectionMessagePtr connection_message,
|
| + content::mojom::PresentationSessionInfoPtr session_info,
|
| + content::mojom::ConnectionMessagePtr connection_message,
|
| const SendConnectionMessageCallback& callback) override;
|
| void CloseConnection(const GURL& presentation_url,
|
| const std::string& presentation_id) override;
|
| void Terminate(const GURL& presentation_url,
|
| const std::string& presentation_id) override;
|
| void ListenForConnectionMessages(
|
| - blink::mojom::PresentationSessionInfoPtr session) override;
|
| + content::mojom::PresentationSessionInfoPtr session) override;
|
| void SetPresentationConnection(
|
| - blink::mojom::PresentationSessionInfoPtr session,
|
| - blink::mojom::PresentationConnectionPtr controller_connection_ptr,
|
| - blink::mojom::PresentationConnectionRequest receiver_connection_request)
|
| + content::mojom::PresentationSessionInfoPtr session,
|
| + content::mojom::PresentationConnectionPtr controller_connection_ptr,
|
| + content::mojom::PresentationConnectionRequest receiver_connection_request)
|
| override;
|
|
|
| // Creates a binding between this object and |request|.
|
| - void Bind(mojo::InterfaceRequest<blink::mojom::PresentationService> request);
|
| + void Bind(
|
| + mojo::InterfaceRequest<content::mojom::PresentationService> request);
|
|
|
| // WebContentsObserver override.
|
| void DidNavigateAnyFrame(
|
| @@ -212,8 +213,8 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| // Returns true if the callback was found.
|
| bool RunAndEraseJoinSessionMojoCallback(
|
| int request_session_id,
|
| - blink::mojom::PresentationSessionInfoPtr session,
|
| - blink::mojom::PresentationErrorPtr error);
|
| + content::mojom::PresentationSessionInfoPtr session,
|
| + content::mojom::PresentationErrorPtr error);
|
|
|
| // Removes all listeners and resets default presentation URL on this instance
|
| // and informs the PresentationServiceDelegate of such.
|
| @@ -288,7 +289,7 @@ class CONTENT_EXPORT PresentationServiceImpl
|
|
|
| // Proxy to the PresentationServiceClient to send results (e.g., screen
|
| // availability) to.
|
| - blink::mojom::PresentationServiceClientPtr client_;
|
| + content::mojom::PresentationServiceClientPtr client_;
|
|
|
| std::vector<GURL> default_presentation_urls_;
|
|
|
| @@ -307,7 +308,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<blink::mojom::PresentationService>> binding_;
|
| + std::unique_ptr<mojo::Binding<content::mojom::PresentationService>> binding_;
|
|
|
| // There can be only one send message request at a time.
|
| std::unique_ptr<SendConnectionMessageCallback> send_message_callback_;
|
|
|