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

Unified Diff: chromeos/display/output_configurator.cc

Issue 24039002: Pepper API implementation for output protection. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix test on chromeos Created 7 years, 3 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: chromeos/display/output_configurator.cc
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc
index 78cb31869d4bca60403cbc4c4909b547e95d431a..75a989e8db879c966900b42459ee6be0f90399a5 100644
--- a/chromeos/display/output_configurator.cc
+++ b/chromeos/display/output_configurator.cc
@@ -234,6 +234,49 @@ void OutputConfigurator::Start(uint32 background_color_argb) {
NotifyObservers(success, new_state);
}
+uint64_t OutputConfigurator::RegisterOutputProtectionClient() {
+ if (!configure_display_)
+ return 0;
+
+ return delegate_->RegisterOutputProtectionClient();
+}
+
+void OutputConfigurator::UnregisterOutputProtectionClient(uint64_t client_id) {
+ if (!configure_display_)
+ return;
+
+ delegate_->GrabServer();
+ delegate_->UnregisterOutputProtectionClient(client_id);
+ delegate_->UngrabServer();
+}
+
+bool OutputConfigurator::QueryOutputProtectionStatus(
+ uint64_t client_id,
+ uint32_t* link_mask,
+ uint32_t* protection_mask) {
+ if (!configure_display_)
+ return false;
+
+ delegate_->GrabServer();
+ bool result = delegate_->QueryOutputProtectionStatus(client_id, link_mask,
+ protection_mask);
+ delegate_->UngrabServer();
+ return result;
+}
+
+bool OutputConfigurator::EnableOutputProtection(
+ uint64_t client_id,
+ uint32_t desired_method_mask) {
+ if (!configure_display_)
+ return false;
+
+ delegate_->GrabServer();
+ bool result = delegate_->EnableOutputProtection(client_id,
+ desired_method_mask);
+ delegate_->UngrabServer();
+ return result;
+}
+
void OutputConfigurator::Stop() {
configure_display_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698