- add sources.
[platform/framework/web/crosswalk.git] / src / ppapi / thunk / ppb_zoom_dev_thunk.cc
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
3 // found in the LICENSE file.
4
5 // From dev/ppb_zoom_dev.idl modified Wed Apr 24 13:31:08 2013.
6
7 #include "ppapi/c/dev/ppb_zoom_dev.h"
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/shared_impl/tracked_callback.h"
10 #include "ppapi/thunk/enter.h"
11 #include "ppapi/thunk/ppb_instance_api.h"
12 #include "ppapi/thunk/resource_creation_api.h"
13 #include "ppapi/thunk/thunk.h"
14
15 namespace ppapi {
16 namespace thunk {
17
18 namespace {
19
20 void ZoomChanged(PP_Instance instance, double factor) {
21   VLOG(4) << "PPB_Zoom_Dev::ZoomChanged()";
22   EnterInstance enter(instance);
23   if (enter.failed())
24     return;
25   enter.functions()->ZoomChanged(instance, factor);
26 }
27
28 void ZoomLimitsChanged(PP_Instance instance,
29                        double minimum_factor,
30                        double maximum_factor) {
31   VLOG(4) << "PPB_Zoom_Dev::ZoomLimitsChanged()";
32   EnterInstance enter(instance);
33   if (enter.failed())
34     return;
35   enter.functions()->ZoomLimitsChanged(instance,
36                                        minimum_factor,
37                                        maximum_factor);
38 }
39
40 const PPB_Zoom_Dev_0_2 g_ppb_zoom_dev_thunk_0_2 = {
41   &ZoomChanged,
42   &ZoomLimitsChanged
43 };
44
45 }  // namespace
46
47 const PPB_Zoom_Dev_0_2* GetPPB_Zoom_Dev_0_2_Thunk() {
48   return &g_ppb_zoom_dev_thunk_0_2;
49 }
50
51 }  // namespace thunk
52 }  // namespace ppapi