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_IMPL_H_ | |
6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_IMPL_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 MediaSessionServiceImpl | |
16 : public NON_EXPORTED_BASE(blink::mojom::MediaSessionService) { | |
17 public: | |
18 ~MediaSessionServiceImpl() override; | |
19 | |
20 static void Create( | |
21 RenderFrameHost* render_frame_host, | |
22 blink::mojom::MediaSessionServiceRequest request); | |
23 | |
24 private: | |
25 MediaSessionServiceImpl(RenderFrameHost* render_frame_host); | |
xhwang
2016/09/30 23:24:58
explicit just in case?
Zhiqiang Zhang (Slow)
2016/10/03 14:31:13
Done.
| |
26 | |
27 void SetMetadata(blink::mojom::MediaMetadataPtr metadata) override; | |
28 | |
29 void Bind(mojo::InterfaceRequest<blink::mojom::MediaSessionService> 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::MediaSessionService>> binding_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(MediaSessionServiceImpl); | |
38 }; | |
39 | |
40 } // namespace content | |
41 | |
42 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_IMPL_H_ | |
OLD | NEW |