| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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 #include "chrome/browser/chromeos/display/output_protection_controller_mus.h" |
| 6 |
| 7 #include "content/public/common/service_manager_connection.h" |
| 8 #include "services/service_manager/public/cpp/connector.h" |
| 9 |
| 10 namespace chromeos { |
| 11 |
| 12 OutputProtectionControllerMus::OutputProtectionControllerMus() { |
| 13 content::ServiceManagerConnection::GetForProcess() |
| 14 ->GetConnector() |
| 15 ->BindInterface("ui", &output_protection_); |
| 16 } |
| 17 |
| 18 OutputProtectionControllerMus::~OutputProtectionControllerMus() { |
| 19 DCHECK(thread_checker_.CalledOnValidThread()); |
| 20 } |
| 21 |
| 22 void OutputProtectionControllerMus::QueryStatus( |
| 23 int64_t display_id, |
| 24 const OutputProtectionDelegate::QueryStatusCallback& callback) { |
| 25 DCHECK(thread_checker_.CalledOnValidThread()); |
| 26 output_protection_->QueryContentProtectionStatus(display_id, callback); |
| 27 } |
| 28 |
| 29 void OutputProtectionControllerMus::SetProtection( |
| 30 int64_t display_id, |
| 31 uint32_t desired_method_mask, |
| 32 const OutputProtectionDelegate::SetProtectionCallback& callback) { |
| 33 DCHECK(thread_checker_.CalledOnValidThread()); |
| 34 output_protection_->SetContentProtection(display_id, desired_method_mask, |
| 35 callback); |
| 36 } |
| 37 |
| 38 } // namespace chromeos |
| OLD | NEW |