Make |track_| in MediaStreamTrack const. and a couple of other cosmetic changes.
[chromium-blink-merge.git] / ppapi / thunk / ppb_input_event_private_thunk.cc
blob4bc78128fd1918e71d1f79d2953c19b744e746d8
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/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"
11 namespace ppapi {
12 namespace thunk {
14 namespace {
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);
23 void StartTrackingLatency(PP_Instance instance) {
24 EnterInstance enter(instance);
25 if (enter.failed())
26 return;
27 enter.functions()->StartTrackingLatency(instance);
30 const PPB_InputEvent_Private_0_1 g_ppb_input_event_private_thunk_0_1 = {
31 &TraceInputLatency,
32 &StartTrackingLatency
35 } // namespace
37 const PPB_InputEvent_Private_0_1* GetPPB_InputEvent_Private_0_1_Thunk() {
38 return &g_ppb_input_event_private_thunk_0_1;
41 } // namespace thunk
42 } // namespace ppapi