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 CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ |
6 #define CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ | 6 #define CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ |
7 | 7 |
8 #include "content/public/browser/render_frame_host.h" | 8 #include "content/public/browser/render_frame_host.h" |
9 #include "media/mojo/interfaces/output_protection.mojom.h" | 9 #include "media/mojo/interfaces/output_protection.mojom.h" |
10 #include "mojo/public/cpp/bindings/strong_binding.h" | 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
11 | 11 |
12 // Implements media::interfaces::OutputProtection to check display links and | 12 // Implements media::mojom::OutputProtection to check display links and |
13 // their statuses. On all platforms we'll check the network links. On ChromeOS | 13 // their statuses. On all platforms we'll check the network links. On ChromeOS |
14 // we'll also check the hardware links. Can only be used on the UI thread. | 14 // we'll also check the hardware links. Can only be used on the UI thread. |
15 class OutputProtectionImpl : public media::interfaces::OutputProtection { | 15 class OutputProtectionImpl : public media::mojom::OutputProtection { |
16 public: | 16 public: |
17 static void Create( | 17 static void Create( |
18 content::RenderFrameHost* render_frame_host, | 18 content::RenderFrameHost* render_frame_host, |
19 mojo::InterfaceRequest<media::interfaces::OutputProtection> request); | 19 mojo::InterfaceRequest<media::mojom::OutputProtection> request); |
20 | 20 |
21 OutputProtectionImpl(content::RenderFrameHost* render_frame_host, | 21 OutputProtectionImpl(content::RenderFrameHost* render_frame_host, |
22 mojo::InterfaceRequest<OutputProtection> request); | 22 mojo::InterfaceRequest<OutputProtection> request); |
23 ~OutputProtectionImpl() final; | 23 ~OutputProtectionImpl() final; |
24 | 24 |
25 // media::interfaces::OutputProtection implementation. | 25 // media::mojom::OutputProtection implementation. |
26 void QueryStatus(const QueryStatusCallback& callback) final; | 26 void QueryStatus(const QueryStatusCallback& callback) final; |
27 void EnableProtection(uint32_t desired_protection_mask, | 27 void EnableProtection(uint32_t desired_protection_mask, |
28 const EnableProtectionCallback& callback) final; | 28 const EnableProtectionCallback& callback) final; |
29 | 29 |
30 private: | 30 private: |
31 mojo::StrongBinding<media::interfaces::OutputProtection> binding_; | 31 mojo::StrongBinding<media::mojom::OutputProtection> binding_; |
32 | 32 |
33 content::RenderFrameHost* const render_frame_host_; | 33 content::RenderFrameHost* const render_frame_host_; |
34 | 34 |
35 base::WeakPtrFactory<OutputProtectionImpl> weak_factory_; | 35 base::WeakPtrFactory<OutputProtectionImpl> weak_factory_; |
36 }; | 36 }; |
37 | 37 |
38 #endif // CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ | 38 #endif // CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ |
OLD | NEW |