| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_SERVICE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_SERVICE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_SERVICE_IMPL_H_ | 6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/optional.h" | 8 #include "base/optional.h" |
| 9 #include "content/public/common/media_metadata.h" | 9 #include "content/public/common/media_metadata.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 private: | 25 private: |
| 26 explicit MediaSessionServiceImpl(RenderFrameHost* render_frame_host); | 26 explicit MediaSessionServiceImpl(RenderFrameHost* render_frame_host); |
| 27 | 27 |
| 28 void SetMetadata( | 28 void SetMetadata( |
| 29 const base::Optional<content::MediaMetadata>& metadata) override; | 29 const base::Optional<content::MediaMetadata>& metadata) override; |
| 30 | 30 |
| 31 void Bind(blink::mojom::MediaSessionServiceRequest request); | 31 void Bind(blink::mojom::MediaSessionServiceRequest request); |
| 32 | 32 |
| 33 RenderFrameHost* render_frame_host_; | 33 RenderFrameHost* render_frame_host_; |
| 34 | 34 |
| 35 base::Optional<MediaMetadata> metadata_; | |
| 36 | |
| 37 // RAII binding of |this| to an MediaSessionService interface request. | 35 // RAII binding of |this| to an MediaSessionService interface request. |
| 38 // The binding is removed when binding_ is cleared or goes out of scope. | 36 // The binding is removed when binding_ is cleared or goes out of scope. |
| 39 std::unique_ptr<mojo::Binding<blink::mojom::MediaSessionService>> binding_; | 37 std::unique_ptr<mojo::Binding<blink::mojom::MediaSessionService>> binding_; |
| 40 | 38 |
| 41 DISALLOW_COPY_AND_ASSIGN(MediaSessionServiceImpl); | 39 DISALLOW_COPY_AND_ASSIGN(MediaSessionServiceImpl); |
| 42 }; | 40 }; |
| 43 | 41 |
| 44 } // namespace content | 42 } // namespace content |
| 45 | 43 |
| 46 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_SERVICE_IMPL_H_ | 44 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_SERVICE_IMPL_H_ |
| OLD | NEW |