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

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

Issue 9253011: Pepper SRPC proxy style and type nits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad license to pass presubmit check Created 8 years, 11 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_find.h" 5 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_find.h"
6 6
7 #include "native_client/src/include/portability.h" 7 #include "native_client/src/include/portability.h"
8 #include "native_client/src/shared/ppapi_proxy/plugin_callback.h" 8 #include "native_client/src/shared/ppapi_proxy/plugin_callback.h"
9 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" 9 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h"
10 #include "native_client/src/shared/ppapi_proxy/utility.h" 10 #include "native_client/src/shared/ppapi_proxy/utility.h"
11 #include "ppapi/c/dev/ppb_find_dev.h" 11 #include "ppapi/c/dev/ppb_find_dev.h"
12 #include "ppapi/c/pp_completion_callback.h" 12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_errors.h" 13 #include "ppapi/c/pp_errors.h"
14 #include "srpcgen/ppb_rpc.h" 14 #include "srpcgen/ppb_rpc.h"
15 15
16 namespace ppapi_proxy { 16 namespace ppapi_proxy {
17 17
18 namespace { 18 namespace {
19 19
20 void NumberOfFindResultsChanged(PP_Instance instance, 20 void NumberOfFindResultsChanged(PP_Instance instance,
21 int32_t total, 21 int32_t total,
22 PP_Bool final_result) { 22 PP_Bool final_result) {
23 DebugPrintf("PPB_Find::NumberOfFindResultsChanged: " 23 DebugPrintf("PPB_Find::NumberOfFindResultsChanged: "
24 "instance=%"NACL_PRIu32"\n", instance); 24 "instance=%"NACL_PRId32"\n", instance);
25 25
26 NaClSrpcError srpc_result = 26 NaClSrpcError srpc_result =
27 PpbFindRpcClient::PPB_Find_NumberOfFindResultsChanged( 27 PpbFindRpcClient::PPB_Find_NumberOfFindResultsChanged(
28 GetMainSrpcChannel(), 28 GetMainSrpcChannel(),
29 instance, 29 instance,
30 total, 30 total,
31 final_result == PP_TRUE); 31 PP_ToBool(final_result));
32 32
33 DebugPrintf("PPB_Find::NumberOfFindResultsChanged: %s\n", 33 DebugPrintf("PPB_Find::NumberOfFindResultsChanged: %s\n",
34 NaClSrpcErrorString(srpc_result)); 34 NaClSrpcErrorString(srpc_result));
35 } 35 }
36 36
37 void SelectedFindResultChanged(PP_Instance instance, 37 void SelectedFindResultChanged(PP_Instance instance,
38 int32_t index) { 38 int32_t index) {
39 DebugPrintf("PPB_Find::SelectedFindResultChanged: " 39 DebugPrintf("PPB_Find::SelectedFindResultChanged: "
40 "instance=%"NACL_PRIu32"\n", instance); 40 "instance=%"NACL_PRId32"\n", instance);
41 41
42 NaClSrpcError srpc_result = 42 NaClSrpcError srpc_result =
43 PpbFindRpcClient::PPB_Find_SelectedFindResultChanged( 43 PpbFindRpcClient::PPB_Find_SelectedFindResultChanged(
44 GetMainSrpcChannel(), 44 GetMainSrpcChannel(),
45 instance, 45 instance,
46 index); 46 index);
47 47
48 DebugPrintf("PPB_Find::SelectedFindResultChanged: %s\n", 48 DebugPrintf("PPB_Find::SelectedFindResultChanged: %s\n",
49 NaClSrpcErrorString(srpc_result)); 49 NaClSrpcErrorString(srpc_result));
50 } 50 }
51 51
52 } // namespace 52 } // namespace
53 53
54 const PPB_Find_Dev* PluginFind::GetInterface() { 54 const PPB_Find_Dev* PluginFind::GetInterface() {
55 static const PPB_Find_Dev find_interface = { 55 static const PPB_Find_Dev find_interface = {
56 NumberOfFindResultsChanged, 56 NumberOfFindResultsChanged,
57 SelectedFindResultChanged 57 SelectedFindResultChanged
58 }; 58 };
59 return &find_interface; 59 return &find_interface;
60 } 60 }
61 61
62 } // namespace ppapi_proxy 62 } // namespace ppapi_proxy
63
64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698