OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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/dev/ppb_find_dev.h" | |
6 #include "ppapi/thunk/thunk.h" | |
7 #include "ppapi/thunk/enter.h" | |
8 #include "ppapi/thunk/ppb_find_api.h" | |
9 #include "ppapi/thunk/resource_creation_api.h" | |
10 | |
11 namespace ppapi { | |
12 namespace thunk { | |
13 | |
14 namespace { | |
15 | |
16 void NumberOfFindResultsChanged(PP_Instance instance, | |
17 int32_t total, | |
18 PP_Bool final) { | |
19 EnterFunction<PPB_Find_FunctionAPI> enter(instance, true); | |
20 if (enter.succeeded()) | |
21 enter.functions()->NumberOfFindResultsChanged(instance, total, final); | |
22 } | |
23 | |
24 void SelectedFindResultChanged(PP_Instance instance, int32_t index) { | |
25 EnterFunction<PPB_Find_FunctionAPI> enter(instance, true); | |
26 if (enter.succeeded()) | |
27 enter.functions()->SelectedFindResultChanged(instance, index); | |
28 } | |
29 | |
30 const PPB_Find_Dev g_ppb_find_thunk = { | |
31 &NumberOfFindResultsChanged, | |
32 &SelectedFindResultChanged | |
33 }; | |
34 | |
35 } // namespace | |
36 | |
37 const PPB_Find_Dev* GetPPB_Find_Thunk() { | |
38 return &g_ppb_find_thunk; | |
39 } | |
40 | |
41 } // namespace thunk | |
42 } // namespace ppapi | |
OLD | NEW |