| 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 #include "chrome/browser/media/output_protection_proxy.h" | 5 #include "chrome/browser/media/output_protection_proxy.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 8 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
| 9 #include "content/public/browser/render_frame_host.h" | 9 #include "content/public/browser/render_frame_host.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #endif // defined(OS_CHROMEOS) | 39 #endif // defined(OS_CHROMEOS) |
| 40 } | 40 } |
| 41 | 41 |
| 42 void OutputProtectionProxy::EnableProtection( | 42 void OutputProtectionProxy::EnableProtection( |
| 43 uint32_t desired_method_mask, | 43 uint32_t desired_method_mask, |
| 44 const EnableProtectionCallback& callback) { | 44 const EnableProtectionCallback& callback) { |
| 45 DVLOG(1) << __func__; | 45 DVLOG(1) << __func__; |
| 46 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 46 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 47 | 47 |
| 48 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
| 49 output_protection_delegate_.EnableProtection(desired_method_mask, callback); | 49 output_protection_delegate_.SetProtection(desired_method_mask, callback); |
| 50 #else // defined(OS_CHROMEOS) | 50 #else // defined(OS_CHROMEOS) |
| 51 NOTIMPLEMENTED(); | 51 NOTIMPLEMENTED(); |
| 52 callback.Run(false); | 52 callback.Run(false); |
| 53 #endif // defined(OS_CHROMEOS) | 53 #endif // defined(OS_CHROMEOS) |
| 54 } | 54 } |
| 55 | 55 |
| 56 void OutputProtectionProxy::ProcessQueryStatusResult( | 56 void OutputProtectionProxy::ProcessQueryStatusResult( |
| 57 const QueryStatusCallback& callback, | 57 const QueryStatusCallback& callback, |
| 58 bool success, | 58 bool success, |
| 59 uint32_t link_mask, | 59 uint32_t link_mask, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 79 ->IsInsecureCapturingInProgress(render_process_id_, | 79 ->IsInsecureCapturingInProgress(render_process_id_, |
| 80 render_frame_id_); | 80 render_frame_id_); |
| 81 if (is_insecure_capture_detected) | 81 if (is_insecure_capture_detected) |
| 82 new_link_mask |= display::DISPLAY_CONNECTION_TYPE_NETWORK; | 82 new_link_mask |= display::DISPLAY_CONNECTION_TYPE_NETWORK; |
| 83 } | 83 } |
| 84 | 84 |
| 85 callback.Run(success, new_link_mask, protection_mask); | 85 callback.Run(success, new_link_mask, protection_mask); |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace chrome | 88 } // namespace chrome |
| OLD | NEW |