OLD | NEW |
1 // Copyright (c) 2012 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 // From dev/ppb_zoom_dev.idl modified Tue Aug 20 08:13:36 2013. | 5 // From dev/ppb_zoom_dev.idl modified Tue May 7 14:43:00 2013. |
6 | 6 |
7 #include "ppapi/c/dev/ppb_zoom_dev.h" | 7 #include "ppapi/c/dev/ppb_zoom_dev.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/shared_impl/tracked_callback.h" | 9 #include "ppapi/shared_impl/tracked_callback.h" |
10 #include "ppapi/thunk/enter.h" | 10 #include "ppapi/thunk/enter.h" |
11 #include "ppapi/thunk/ppapi_thunk_export.h" | 11 #include "ppapi/thunk/ppapi_thunk_export.h" |
12 | 12 |
13 namespace ppapi { | 13 namespace ppapi { |
14 namespace thunk { | 14 namespace thunk { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 void ZoomChanged(PP_Instance instance, double factor) { | 18 void ZoomChanged(PP_Instance instance, double factor) { |
19 VLOG(4) << "PPB_Zoom_Dev::ZoomChanged()"; | 19 VLOG(4) << "PPB_Zoom_Dev::ZoomChanged()"; |
20 EnterInstance enter(instance); | 20 EnterInstance enter(instance); |
21 if (enter.failed()) | 21 if (enter.failed()) |
22 return; | 22 return; |
23 enter.functions()->ZoomChanged(instance, factor); | 23 enter.functions()->ZoomChanged(instance, factor); |
24 } | 24 } |
25 | 25 |
26 void ZoomLimitsChanged(PP_Instance instance, | 26 void ZoomLimitsChanged(PP_Instance instance, |
27 double minimum_factor, | 27 double minimum_factor, |
28 double maximum_factor) { | 28 double maximum_factor) { |
29 VLOG(4) << "PPB_Zoom_Dev::ZoomLimitsChanged()"; | 29 VLOG(4) << "PPB_Zoom_Dev::ZoomLimitsChanged()"; |
30 EnterInstance enter(instance); | 30 EnterInstance enter(instance); |
31 if (enter.failed()) | 31 if (enter.failed()) |
32 return; | 32 return; |
33 enter.functions()->ZoomLimitsChanged(instance, | 33 enter.functions()->ZoomLimitsChanged(instance, minimum_factor, |
34 minimum_factor, | |
35 maximum_factor); | 34 maximum_factor); |
36 } | 35 } |
37 | 36 |
38 const PPB_Zoom_Dev_0_2 g_ppb_zoom_dev_thunk_0_2 = { | 37 const PPB_Zoom_Dev_0_2 g_ppb_zoom_dev_thunk_0_2 = {&ZoomChanged, |
39 &ZoomChanged, | 38 &ZoomLimitsChanged}; |
40 &ZoomLimitsChanged | |
41 }; | |
42 | 39 |
43 } // namespace | 40 } // namespace |
44 | 41 |
45 PPAPI_THUNK_EXPORT const PPB_Zoom_Dev_0_2* GetPPB_Zoom_Dev_0_2_Thunk() { | 42 PPAPI_THUNK_EXPORT const PPB_Zoom_Dev_0_2* GetPPB_Zoom_Dev_0_2_Thunk() { |
46 return &g_ppb_zoom_dev_thunk_0_2; | 43 return &g_ppb_zoom_dev_thunk_0_2; |
47 } | 44 } |
48 | 45 |
49 } // namespace thunk | 46 } // namespace thunk |
50 } // namespace ppapi | 47 } // namespace ppapi |
OLD | NEW |