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

Unified Diff: ppapi/cpp/private/output_protection_private.cc

Issue 24039002: Pepper API implementation for output protection. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix build for non-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
« no previous file with comments | « ppapi/cpp/private/output_protection_private.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/private/output_protection_private.cc
diff --git a/ppapi/cpp/private/output_protection_private.cc b/ppapi/cpp/private/output_protection_private.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9b244fef34b38a5495d839294390544e609c46ba
--- /dev/null
+++ b/ppapi/cpp/private/output_protection_private.cc
@@ -0,0 +1,59 @@
+// Copyright 2013 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 "ppapi/cpp/private/output_protection_private.h"
+
+#include <stdio.h>
+#include "ppapi/c/pp_errors.h"
+#include "ppapi/c/private/ppb_output_protection_private.h"
+#include "ppapi/cpp/instance.h"
+#include "ppapi/cpp/instance_handle.h"
+#include "ppapi/cpp/module_impl.h"
+
+namespace pp {
+
+namespace {
+
+template <> const char* interface_name<PPB_OutputProtection_Private_0_1>() {
+ return PPB_OUTPUTPROTECTION_PRIVATE_INTERFACE_0_1;
+}
+
+} // namespace
+
+OutputProtection_Private::OutputProtection_Private(
+ const InstanceHandle& instance) {
+ if (has_interface<PPB_OutputProtection_Private_0_1>()) {
+ PassRefFromConstructor(
+ get_interface<PPB_OutputProtection_Private_0_1>()->Create(
+ instance.pp_instance()));
+ }
+}
+
+OutputProtection_Private::~OutputProtection_Private() {
+}
+
+int32_t OutputProtection_Private::QueryStatus(
+ uint32_t* link_mask,
+ uint32_t* protection_mask,
+ const CompletionCallback& callback) {
+ if (has_interface<PPB_OutputProtection_Private_0_1>()) {
+ return get_interface<PPB_OutputProtection_Private_0_1>()->QueryStatus(
+ pp_resource(), link_mask, protection_mask,
+ callback.pp_completion_callback());
+ }
+ return callback.MayForce(PP_ERROR_NOINTERFACE);
+}
+
+int32_t OutputProtection_Private::EnableProtection(
+ uint32_t desired_method_mask,
+ const CompletionCallback& callback) {
+ if (has_interface<PPB_OutputProtection_Private_0_1>()) {
+ return get_interface<PPB_OutputProtection_Private_0_1>()->EnableProtection(
+ pp_resource(), desired_method_mask,
+ callback.pp_completion_callback());
+ }
+ return callback.MayForce(PP_ERROR_NOINTERFACE);
+}
+
+} // namespace pp
« no previous file with comments | « ppapi/cpp/private/output_protection_private.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698