blob: 9b244fef34b38a5495d839294390544e609c46ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
|