| 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 "services/service_manager/public/cpp/bind_source_info.h" |
| 10 | 11 |
| 11 namespace chrome { | 12 namespace chrome { |
| 12 class OutputProtectionProxy; | 13 class OutputProtectionProxy; |
| 13 } | 14 } |
| 14 | 15 |
| 15 // Implements media::mojom::OutputProtection to check display links and | 16 // Implements media::mojom::OutputProtection to check display links and |
| 16 // their statuses. On all platforms we'll check the network links. On ChromeOS | 17 // their statuses. On all platforms we'll check the network links. On ChromeOS |
| 17 // we'll also check the hardware links. Can only be used on the UI thread. | 18 // we'll also check the hardware links. Can only be used on the UI thread. |
| 18 class OutputProtectionImpl : public media::mojom::OutputProtection { | 19 class OutputProtectionImpl : public media::mojom::OutputProtection { |
| 19 public: | 20 public: |
| 20 static void Create(content::RenderFrameHost* render_frame_host, | 21 static void Create(content::RenderFrameHost* render_frame_host, |
| 22 const service_manager::BindSourceInfo& source_info, |
| 21 media::mojom::OutputProtectionRequest request); | 23 media::mojom::OutputProtectionRequest request); |
| 22 | 24 |
| 23 OutputProtectionImpl(int render_process_id, int render_frame_id); | 25 OutputProtectionImpl(int render_process_id, int render_frame_id); |
| 24 ~OutputProtectionImpl() final; | 26 ~OutputProtectionImpl() final; |
| 25 | 27 |
| 26 // media::mojom::OutputProtection implementation. | 28 // media::mojom::OutputProtection implementation. |
| 27 void QueryStatus(const QueryStatusCallback& callback) final; | 29 void QueryStatus(const QueryStatusCallback& callback) final; |
| 28 void EnableProtection(uint32_t desired_protection_mask, | 30 void EnableProtection(uint32_t desired_protection_mask, |
| 29 const EnableProtectionCallback& callback) final; | 31 const EnableProtectionCallback& callback) final; |
| 30 | 32 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 44 | 46 |
| 45 const int render_process_id_; | 47 const int render_process_id_; |
| 46 const int render_frame_id_; | 48 const int render_frame_id_; |
| 47 | 49 |
| 48 std::unique_ptr<chrome::OutputProtectionProxy> proxy_; | 50 std::unique_ptr<chrome::OutputProtectionProxy> proxy_; |
| 49 | 51 |
| 50 base::WeakPtrFactory<OutputProtectionImpl> weak_factory_; | 52 base::WeakPtrFactory<OutputProtectionImpl> weak_factory_; |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 #endif // CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ | 55 #endif // CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ |
| OLD | NEW |