OLD | NEW |
---|---|
(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/ppb_var.h" | |
dmichael (off chromium)
2013/09/09 20:37:15
^^ You don't appear to use this
kcwu
2013/09/10 12:50:21
Done.
| |
10 #include "ppapi/c/private/ppb_output_protection_private.h" | |
11 #include "ppapi/cpp/instance.h" | |
12 #include "ppapi/cpp/instance_handle.h" | |
13 #include "ppapi/cpp/module_impl.h" | |
14 | |
15 namespace pp { | |
16 | |
17 namespace { | |
18 | |
19 template <> const char* interface_name<PPB_OutputProtection_Private_0_1>() { | |
20 return PPB_OUTPUTPROTECTION_PRIVATE_INTERFACE_0_1; | |
21 } | |
22 | |
23 } // namespace | |
24 | |
25 OutputProtection_Private::OutputProtection_Private( | |
26 const InstanceHandle& instance) { | |
27 if (has_interface<PPB_OutputProtection_Private_0_1>()) { | |
28 PassRefFromConstructor( | |
29 get_interface<PPB_OutputProtection_Private_0_1>()->Create( | |
30 instance.pp_instance())); | |
31 } | |
32 } | |
33 | |
34 OutputProtection_Private::~OutputProtection_Private() { | |
35 } | |
36 | |
37 int32_t OutputProtection_Private::QueryStatus( | |
38 uint32_t* link_mask, | |
39 uint32_t* protection_mask, | |
40 const CompletionCallback& callback) { | |
41 if (has_interface<PPB_OutputProtection_Private_0_1>()) { | |
42 return get_interface<PPB_OutputProtection_Private_0_1>()->QueryStatus( | |
43 pp_resource(), link_mask, protection_mask, | |
44 callback.pp_completion_callback()); | |
45 } | |
46 return callback.MayForce(PP_ERROR_NOINTERFACE); | |
47 } | |
48 | |
49 int32_t OutputProtection_Private::EnableProtection( | |
50 uint32_t desired_method_mask, | |
51 const CompletionCallback& callback) { | |
52 if (has_interface<PPB_OutputProtection_Private_0_1>()) { | |
53 return get_interface<PPB_OutputProtection_Private_0_1>()->EnableProtection( | |
54 pp_resource(), desired_method_mask, | |
55 callback.pp_completion_callback()); | |
56 } | |
57 return callback.MayForce(PP_ERROR_NOINTERFACE); | |
58 } | |
59 | |
60 } // namespace pp | |
OLD | NEW |