Chromium Code Reviews| 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 "services/ui/display/output_protection.h" | |
| 6 | |
| 7 #include "ui/display/manager/chromeos/display_configurator.h" | |
| 8 | |
| 9 namespace display { | |
| 10 | |
| 11 OutputProtection::OutputProtection(DisplayConfigurator* display_configurator) | |
| 12 : display_configurator_(display_configurator), | |
| 13 client_id_(display_configurator_->RegisterContentProtectionClient()) {} | |
| 14 | |
| 15 OutputProtection::~OutputProtection() { | |
| 16 display_configurator_->UnregisterContentProtectionClient(client_id_); | |
|
sky
2017/02/10 19:24:56
Does unregister automatically revert?
Peng
2017/02/10 20:35:47
I checked the code of DisplayConfigurator. Seems t
kcwu
2017/02/11 01:45:21
Yes, your understanding is correct.
| |
| 17 } | |
| 18 | |
| 19 void OutputProtection::QueryContentProtectionStatus( | |
| 20 int64_t display_id, | |
| 21 const QueryContentProtectionStatusCallback& callback) { | |
| 22 display_configurator_->QueryContentProtectionStatus(client_id_, display_id, | |
| 23 callback); | |
| 24 } | |
| 25 | |
| 26 void OutputProtection::EnableContentProtection( | |
| 27 int64_t display_id, | |
| 28 uint32_t desired_method_mask, | |
| 29 const EnableContentProtectionCallback& callback) { | |
| 30 display_configurator_->EnableContentProtection(client_id_, display_id, | |
| 31 desired_method_mask, callback); | |
| 32 } | |
| 33 | |
| 34 } // namespace display | |
| OLD | NEW |