Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: ppapi/cpp/private/input_event_private.cc

Issue 252663002: Track plugin input event latency (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix win & mac build Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/cpp/private/input_event_private.h ('k') | ppapi/native_client/native_client.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 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.
4
5 #include "ppapi/cpp/private/input_event_private.h"
6
7 #include "ppapi/cpp/module_impl.h"
8
9 namespace pp {
10
11 namespace {
12
13 template <> const char* interface_name<PPB_InputEvent_Private>() {
14 return PPB_INPUTEVENT_PRIVATE_INTERFACE;
15 }
16
17 } // namespace
18
19 InputEventPrivate::InputEventPrivate() : InputEvent() {
20 }
21
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());
27 }
28
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)));
35 }
36
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());
42 }
43
44 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/private/input_event_private.h ('k') | ppapi/native_client/native_client.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698