| 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..b590971c36a5c93e21889b35ca3c00fd19548bc5
|
| --- /dev/null
|
| +++ b/ppapi/cpp/private/input_event_private.cc
|
| @@ -0,0 +1,36 @@
|
| +// 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_0_1>() {
|
| + return PPB_INPUTEVENT_PRIVATE_INTERFACE_0_1;
|
| +}
|
| +
|
| +} // 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());
|
| +}
|
| +
|
| +void InputEventPrivate::TraceInputLatency(bool has_damage) {
|
| + if (!has_interface<PPB_InputEvent_Private_0_1>())
|
| + return;
|
| + get_interface<PPB_InputEvent_Private_0_1>()->TraceInputLatency(
|
| + pp_resource(), PP_FromBool(has_damage));
|
| +}
|
| +
|
| +} // namespace pp
|
|
|