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

Side by Side 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, 2 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
« no previous file with comments | « ppapi/cpp/private/output_protection_private.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 "ppapi/cpp/private/output_protection_private.h"
6
7 #include <stdio.h>
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/private/ppb_output_protection_private.h"
10 #include "ppapi/cpp/instance.h"
11 #include "ppapi/cpp/instance_handle.h"
12 #include "ppapi/cpp/module_impl.h"
13
14 namespace pp {
15
16 namespace {
17
18 template <> const char* interface_name<PPB_OutputProtection_Private_0_1>() {
19 return PPB_OUTPUTPROTECTION_PRIVATE_INTERFACE_0_1;
20 }
21
22 } // namespace
23
24 OutputProtection_Private::OutputProtection_Private(
25 const InstanceHandle& instance) {
26 if (has_interface<PPB_OutputProtection_Private_0_1>()) {
27 PassRefFromConstructor(
28 get_interface<PPB_OutputProtection_Private_0_1>()->Create(
29 instance.pp_instance()));
30 }
31 }
32
33 OutputProtection_Private::~OutputProtection_Private() {
34 }
35
36 int32_t OutputProtection_Private::QueryStatus(
37 uint32_t* link_mask,
38 uint32_t* protection_mask,
39 const CompletionCallback& callback) {
40 if (has_interface<PPB_OutputProtection_Private_0_1>()) {
41 return get_interface<PPB_OutputProtection_Private_0_1>()->QueryStatus(
42 pp_resource(), link_mask, protection_mask,
43 callback.pp_completion_callback());
44 }
45 return callback.MayForce(PP_ERROR_NOINTERFACE);
46 }
47
48 int32_t OutputProtection_Private::EnableProtection(
49 uint32_t desired_method_mask,
50 const CompletionCallback& callback) {
51 if (has_interface<PPB_OutputProtection_Private_0_1>()) {
52 return get_interface<PPB_OutputProtection_Private_0_1>()->EnableProtection(
53 pp_resource(), desired_method_mask,
54 callback.pp_completion_callback());
55 }
56 return callback.MayForce(PP_ERROR_NOINTERFACE);
57 }
58
59 } // namespace pp
OLDNEW
« 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