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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_find.cc

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Native Client 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 "native_client/src/shared/ppapi_proxy/plugin_ppb_find.h"
6
7 #include "native_client/src/include/portability.h"
8 #include "native_client/src/shared/ppapi_proxy/plugin_callback.h"
9 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h"
10 #include "native_client/src/shared/ppapi_proxy/utility.h"
11 #include "ppapi/c/dev/ppb_find_dev.h"
12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_errors.h"
14 #include "srpcgen/ppb_rpc.h"
15
16 namespace ppapi_proxy {
17
18 namespace {
19
20 void NumberOfFindResultsChanged(PP_Instance instance,
21 int32_t total,
22 PP_Bool final_result) {
23 DebugPrintf("PPB_Find::NumberOfFindResultsChanged: "
24 "instance=%"NACL_PRIu32"\n", instance);
25
26 NaClSrpcError srpc_result =
27 PpbFindRpcClient::PPB_Find_NumberOfFindResultsChanged(
28 GetMainSrpcChannel(),
29 instance,
30 total,
31 final_result == PP_TRUE);
32
33 DebugPrintf("PPB_Find::NumberOfFindResultsChanged: %s\n",
34 NaClSrpcErrorString(srpc_result));
35 }
36
37 void SelectedFindResultChanged(PP_Instance instance,
38 int32_t index) {
39 DebugPrintf("PPB_Find::SelectedFindResultChanged: "
40 "instance=%"NACL_PRIu32"\n", instance);
41
42 NaClSrpcError srpc_result =
43 PpbFindRpcClient::PPB_Find_SelectedFindResultChanged(
44 GetMainSrpcChannel(),
45 instance,
46 index);
47
48 DebugPrintf("PPB_Find::SelectedFindResultChanged: %s\n",
49 NaClSrpcErrorString(srpc_result));
50 }
51
52 } // namespace
53
54 const PPB_Find_Dev* PluginFind::GetInterface() {
55 static const PPB_Find_Dev find_interface = {
56 NumberOfFindResultsChanged,
57 SelectedFindResultChanged
58 };
59 return &find_interface;
60 }
61
62 } // namespace ppapi_proxy
63
64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698