Add an exponential backoff to rechecking the app list doodle.
[chromium-blink-merge.git] / ppapi / cpp / private / input_event_private.cc
blob7b53358c71366fcc06dfd31ee2ffbeca2e14c4a9
1 // Copyright 2014 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.
5 #include "ppapi/cpp/private/input_event_private.h"
7 #include "ppapi/cpp/module_impl.h"
9 namespace pp {
11 namespace {
13 template <> const char* interface_name<PPB_InputEvent_Private>() {
14 return PPB_INPUTEVENT_PRIVATE_INTERFACE;
17 } // namespace
19 InputEventPrivate::InputEventPrivate() : InputEvent() {
22 InputEventPrivate::InputEventPrivate(const InputEvent& event) : InputEvent() {
23 if (!has_interface<PPB_InputEvent_Private_0_1>())
24 return;
25 Module::Get()->core()->AddRefResource(event.pp_resource());
26 PassRefFromConstructor(event.pp_resource());
29 bool InputEventPrivate::TraceInputLatency(bool has_damage) {
30 if (!has_interface<PPB_InputEvent_Private_0_1>())
31 return false;
32 return PP_ToBool(
33 get_interface<PPB_InputEvent_Private_0_1>()->TraceInputLatency(
34 pp_resource(), PP_FromBool(has_damage)));
37 void InputEventPrivate::StartTrackingLatency(const InstanceHandle& instance) {
38 if (!has_interface<PPB_InputEvent_Private>())
39 return;
40 return get_interface<PPB_InputEvent_Private>()->StartTrackingLatency(
41 instance.pp_instance());
44 } // namespace pp