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

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: avoid PostTask methods in dtor 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..a356e2643995aaf02adedbde0e5d40f5b5bace72 100644
--- a/chromeos/display/output_configurator.cc
+++ b/chromeos/display/output_configurator.cc
@@ -234,6 +234,32 @@ void OutputConfigurator::Start(uint32 background_color_argb) {
NotifyObservers(success, new_state);
}
+bool OutputConfigurator::QueryOutputProtectionStatus(
+ chrome::PepperOutputProtectionHost* client,
+ uint32_t* link_mask,
+ uint32_t* protection_mask) {
+ if (!configure_display_)
+ return false;
+
+ delegate_->GrabServer();
+ bool result = delegate_->QueryOutputProtectionStatus(client, link_mask,
+ protection_mask);
+ delegate_->UngrabServer();
dmichael (off chromium) 2013/09/09 20:37:15 I don't know anything about that delegate or what
kcwu 2013/09/10 12:50:21 Agree. However there are 4 existing GrabServer() i
dmichael (off chromium) 2013/09/11 18:22:45 Following them is fine. But it's worth considering
kcwu 2013/09/12 18:22:08 Thanks
+ return result;
+}
+
+bool OutputConfigurator::EnableOutputProtection(
+ chrome::PepperOutputProtectionHost* client,
+ uint32_t desired_method_mask) {
+ if (!configure_display_)
+ return false;
+
+ delegate_->GrabServer();
+ bool result = delegate_->EnableOutputProtection(client, desired_method_mask);
+ delegate_->UngrabServer();
+ return result;
+}
+
void OutputConfigurator::Stop() {
configure_display_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698