Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: chrome/browser/chromeos/display/output_protection_controller_ash.cc

Issue 2675743002: PPAPI: Make output protection API work with mus+ash (Closed)
Patch Set: Addressed review issues Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_ash.h"
6
7 #include "ash/shell.h"
8
9 namespace chromeos {
10
11 OutputProtectionControllerAsh::OutputProtectionControllerAsh()
12 : client_id_(ash::Shell::GetInstance()
13 ->display_configurator()
14 ->RegisterContentProtectionClient()) {}
15
16 OutputProtectionControllerAsh::~OutputProtectionControllerAsh() {
17 DCHECK(thread_checker_.CalledOnValidThread());
18 if (client_id_ != display::DisplayConfigurator::INVALID_CLIENT_ID) {
19 display::DisplayConfigurator* configurator =
20 ash::Shell::GetInstance()->display_configurator();
21 configurator->UnregisterContentProtectionClient(client_id_);
22 }
23 }
24
25 void OutputProtectionControllerAsh::QueryStatus(
26 int64_t display_id,
27 const OutputProtectionDelegate::QueryStatusCallback& callback) {
28 DCHECK(thread_checker_.CalledOnValidThread());
29 display::DisplayConfigurator* configurator =
30 ash::Shell::GetInstance()->display_configurator();
31 configurator->QueryContentProtectionStatus(client_id_, display_id, callback);
32 }
33
34 void OutputProtectionControllerAsh::SetProtection(
35 int64_t display_id,
36 uint32_t desired_method_mask,
37 const OutputProtectionDelegate::SetProtectionCallback& callback) {
38 DCHECK(thread_checker_.CalledOnValidThread());
39 display::DisplayConfigurator* configurator =
40 ash::Shell::GetInstance()->display_configurator();
41 configurator->SetContentProtection(client_id_, display_id,
42 desired_method_mask, callback);
43 }
44
45 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698