| Index: content/browser/media/android/media_session_service_impl.h
|
| diff --git a/content/browser/media/android/media_session_service_impl.h b/content/browser/media/android/media_session_service_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..77a330238550418092debde2cd92c476f17a6eeb
|
| --- /dev/null
|
| +++ b/content/browser/media/android/media_session_service_impl.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_IMPL_H_
|
| +#define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_IMPL_H_
|
| +
|
| +#include "mojo/public/cpp/bindings/binding.h"
|
| +#include "third_party/WebKit/public/platform/modules/mediasession/media_session.mojom.h"
|
| +
|
| +namespace content {
|
| +
|
| +class RenderFrameHost;
|
| +
|
| +class MediaSessionServiceImpl
|
| + : public NON_EXPORTED_BASE(blink::mojom::MediaSessionService) {
|
| + public:
|
| + ~MediaSessionServiceImpl() override;
|
| +
|
| + static void Create(
|
| + RenderFrameHost* render_frame_host,
|
| + blink::mojom::MediaSessionServiceRequest request);
|
| +
|
| + private:
|
| + MediaSessionServiceImpl(RenderFrameHost* render_frame_host);
|
| +
|
| + void Activate(uint64_t session_id,
|
| + const ActivateCallback& callback) override;
|
| + void Deactivate(uint64_t session_id,
|
| + const DeactivateCallback& callback) override;
|
| + void SetMetadata(uint64_t session_id,
|
| + blink::mojom::MediaMetadataPtr metadata) override;
|
| +
|
| + void Bind(mojo::InterfaceRequest<blink::mojom::MediaSessionService> request);
|
| +
|
| + RenderFrameHost* render_frame_host_;
|
| +
|
| + // RAII binding of |this| to an MediaSession interface request.
|
| + // The binding is removed when binding_ is cleared or goes out of scope.
|
| + std::unique_ptr<mojo::Binding<blink::mojom::MediaSessionService>> binding_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(MediaSessionServiceImpl);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_IMPL_H_
|
|
|