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

Side by Side Diff: ppapi/thunk/ppb_input_event_private_thunk.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, 7 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/thunk/ppb_input_event_api.h ('k') | ppapi/thunk/ppb_instance_api.h » ('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/c/pp_errors.h"
6 #include "ppapi/c/private/ppb_input_event_private.h"
7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_input_event_api.h"
9 #include "ppapi/thunk/thunk.h"
10
11 namespace ppapi {
12 namespace thunk {
13
14 namespace {
15
16 PP_Bool TraceInputLatency(PP_Resource event, PP_Bool has_damage) {
17 EnterResource<PPB_InputEvent_API> enter(event, true);
18 if (enter.failed())
19 return PP_FALSE;
20 return enter.object()->TraceInputLatency(has_damage);
21 }
22
23 void StartTrackingLatency(PP_Instance instance) {
24 EnterInstance enter(instance);
25 if (enter.failed())
26 return;
27 enter.functions()->StartTrackingLatency(instance);
28 }
29
30 const PPB_InputEvent_Private_0_1 g_ppb_input_event_private_thunk_0_1 = {
31 &TraceInputLatency,
32 &StartTrackingLatency
33 };
34
35 } // namespace
36
37 const PPB_InputEvent_Private_0_1* GetPPB_InputEvent_Private_0_1_Thunk() {
38 return &g_ppb_input_event_private_thunk_0_1;
39 }
40
41 } // namespace thunk
42 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_input_event_api.h ('k') | ppapi/thunk/ppb_instance_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698