| Index: ppapi/cpp/private/input_event_private.cc
|
| diff --git a/ppapi/cpp/private/input_event_private.cc b/ppapi/cpp/private/input_event_private.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..466894c7fbbeb2d004df5c1ad431667214a904d7
|
| --- /dev/null
|
| +++ b/ppapi/cpp/private/input_event_private.cc
|
| @@ -0,0 +1,44 @@
|
| +// Copyright (c) 2014 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/input_event_private.h"
|
| +
|
| +#include "ppapi/cpp/module_impl.h"
|
| +
|
| +namespace pp {
|
| +
|
| +namespace {
|
| +
|
| +template <> const char* interface_name<PPB_InputEvent_Private>() {
|
| + return PPB_INPUTEVENT_PRIVATE_INTERFACE;
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| +InputEventPrivate::InputEventPrivate() : InputEvent() {
|
| +}
|
| +
|
| +InputEventPrivate::InputEventPrivate(const InputEvent& event) : InputEvent() {
|
| + if (!has_interface<PPB_InputEvent_Private_0_1>())
|
| + return;
|
| + Module::Get()->core()->AddRefResource(event.pp_resource());
|
| + PassRefFromConstructor(event.pp_resource());
|
| +}
|
| +
|
| +bool InputEventPrivate::TraceInputLatency(bool has_damage) {
|
| + if (!has_interface<PPB_InputEvent_Private_0_1>())
|
| + return false;
|
| + return PP_ToBool(
|
| + get_interface<PPB_InputEvent_Private_0_1>()->TraceInputLatency(
|
| + pp_resource(), PP_FromBool(has_damage)));
|
| +}
|
| +
|
| +void InputEventPrivate::StartTrackingLatency(const InstanceHandle& instance) {
|
| + if (!has_interface<PPB_InputEvent_Private>())
|
| + return;
|
| + return get_interface<PPB_InputEvent_Private>()->StartTrackingLatency(
|
| + instance.pp_instance());
|
| +}
|
| +
|
| +} // namespace pp
|
|
|