Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_H_ | |
| 6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_H_ | |
| 7 | |
| 8 #include "mojo/public/cpp/bindings/binding.h" | |
| 9 #include "third_party/WebKit/public/platform/modules/mediasession/media_session. mojom.h" | |
| 10 | |
| 11 namespace content { | |
| 12 | |
| 13 class RenderFrameHost; | |
| 14 | |
| 15 class MediaSessionService | |
|
xhwang
2016/10/03 16:46:03
nit: Now the recommendation is to call this MediaS
Zhiqiang Zhang (Slow)
2016/10/03 20:21:00
I'll keep the naming here, since there is already
| |
| 16 : public NON_EXPORTED_BASE(blink::mojom::MediaSession) { | |
| 17 public: | |
| 18 ~MediaSessionService() override; | |
| 19 | |
| 20 static void Create(RenderFrameHost* render_frame_host, | |
| 21 blink::mojom::MediaSessionRequest request); | |
| 22 | |
| 23 private: | |
| 24 explicit MediaSessionService(RenderFrameHost* render_frame_host); | |
| 25 | |
| 26 void SetMetadata( | |
| 27 const base::Optional<content::MediaMetadata>& metadata) override; | |
| 28 | |
| 29 void Bind(mojo::InterfaceRequest<blink::mojom::MediaSession> request); | |
| 30 | |
| 31 RenderFrameHost* render_frame_host_; | |
| 32 | |
| 33 // RAII binding of |this| to an MediaSession interface request. | |
| 34 // The binding is removed when binding_ is cleared or goes out of scope. | |
| 35 std::unique_ptr<mojo::Binding<blink::mojom::MediaSession>> binding_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(MediaSessionService); | |
| 38 }; | |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_H_ | |
| OLD | NEW |