OLD | NEW |
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/browser_ppp_zoom.h" | 5 #include "native_client/src/shared/ppapi_proxy/browser_ppp_zoom.h" |
6 | 6 |
7 // Include file order cannot be observed because ppp_instance declares a | 7 // Include file order cannot be observed because ppp_instance declares a |
8 // structure return type that causes an error on Windows. | 8 // structure return type that causes an error on Windows. |
9 // TODO(sehr, brettw): fix the return types and include order in PPAPI. | 9 // TODO(sehr, brettw): fix the return types and include order in PPAPI. |
10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
11 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
12 #include "srpcgen/ppp_rpc.h" | 12 #include "srpcgen/ppp_rpc.h" |
13 #include "native_client/src/include/portability.h" | 13 #include "native_client/src/include/portability.h" |
14 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" | 14 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" |
15 #include "native_client/src/shared/ppapi_proxy/browser_ppp.h" | 15 #include "native_client/src/shared/ppapi_proxy/browser_ppp.h" |
16 #include "native_client/src/shared/ppapi_proxy/utility.h" | 16 #include "native_client/src/shared/ppapi_proxy/utility.h" |
17 | 17 |
18 namespace ppapi_proxy { | 18 namespace ppapi_proxy { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 void Zoom(PP_Instance instance, | 22 void Zoom(PP_Instance instance, |
23 double factor, | 23 double factor, |
24 PP_Bool text_only) { | 24 PP_Bool text_only) { |
25 DebugPrintf("PPP_Zoom::Zoom: instance=%"NACL_PRIu32"\n", instance); | 25 DebugPrintf("PPP_Zoom::Zoom: instance=%"NACL_PRId32"\n", instance); |
26 | 26 |
27 NaClSrpcError srpc_result = PppZoomRpcClient::PPP_Zoom_Zoom( | 27 NaClSrpcError srpc_result = PppZoomRpcClient::PPP_Zoom_Zoom( |
28 GetMainSrpcChannel(instance), | 28 GetMainSrpcChannel(instance), |
29 instance, | 29 instance, |
30 factor, | 30 factor, |
31 static_cast<int32_t>(text_only)); | 31 static_cast<int32_t>(text_only)); |
32 | 32 |
33 DebugPrintf("PPP_Zoom::Zoom: %s\n", NaClSrpcErrorString(srpc_result)); | 33 DebugPrintf("PPP_Zoom::Zoom: %s\n", NaClSrpcErrorString(srpc_result)); |
34 } | 34 } |
35 | 35 |
36 } // namespace | 36 } // namespace |
37 | 37 |
38 const PPP_Zoom_Dev* BrowserZoom::GetInterface() { | 38 const PPP_Zoom_Dev* BrowserZoom::GetInterface() { |
39 static const PPP_Zoom_Dev zoom_interface = { | 39 static const PPP_Zoom_Dev zoom_interface = { |
40 Zoom | 40 Zoom |
41 }; | 41 }; |
42 return &zoom_interface; | 42 return &zoom_interface; |
43 } | 43 } |
44 | 44 |
45 } // namespace ppapi_proxy | 45 } // namespace ppapi_proxy |
46 | |
OLD | NEW |