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

Unified Diff: chrome/browser/chromeos/display/output_protection_controller_mus.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/display/output_protection_controller_mus.cc
diff --git a/chrome/browser/chromeos/display/output_protection_controller_mus.cc b/chrome/browser/chromeos/display/output_protection_controller_mus.cc
new file mode 100644
index 0000000000000000000000000000000000000000..dec09983c32fdad71fe1a7cd8c1e84ce3e94d3f3
--- /dev/null
+++ b/chrome/browser/chromeos/display/output_protection_controller_mus.cc
@@ -0,0 +1,38 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/display/output_protection_controller_mus.h"
+
+#include "content/public/common/service_manager_connection.h"
+#include "services/service_manager/public/cpp/connector.h"
+
+namespace chromeos {
+
+OutputProtectionControllerMus::OutputProtectionControllerMus() {
+ content::ServiceManagerConnection::GetForProcess()
+ ->GetConnector()
+ ->BindInterface("ui", &output_protection_);
+}
+
+OutputProtectionControllerMus::~OutputProtectionControllerMus() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+}
+
+void OutputProtectionControllerMus::QueryStatus(
+ int64_t display_id,
+ const OutputProtectionDelegate::QueryStatusCallback& callback) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ output_protection_->QueryContentProtectionStatus(display_id, callback);
+}
+
+void OutputProtectionControllerMus::SetProtection(
+ int64_t display_id,
+ uint32_t desired_method_mask,
+ const OutputProtectionDelegate::SetProtectionCallback& callback) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ output_protection_->SetContentProtection(display_id, desired_method_mask,
+ callback);
+}
+
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698