Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / ppapi / thunk / ppb_zoom_thunk.cc
blob193e856e12c0eb050e0eef44842805f5ff21a817
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.
5 #include "ppapi/c/dev/ppb_zoom_dev.h"
6 #include "ppapi/thunk/thunk.h"
7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_instance_api.h"
10 namespace ppapi {
11 namespace thunk {
13 namespace {
15 void ZoomChanged(PP_Instance instance, double factor) {
16 EnterInstance enter(instance);
17 if (enter.succeeded())
18 enter.functions()->ZoomChanged(instance, factor);
21 void ZoomLimitsChanged(PP_Instance instance,
22 double minimum_factor,
23 double maximum_factor) {
24 EnterInstance enter(instance);
25 if (enter.succeeded()) {
26 enter.functions()->ZoomLimitsChanged(instance,
27 minimum_factor, maximum_factor);
31 const PPB_Zoom_Dev g_ppb_zoom_thunk = {
32 &ZoomChanged,
33 &ZoomLimitsChanged
36 } // namespace
38 const PPB_Zoom_Dev_0_2* GetPPB_Zoom_Dev_0_2_Thunk() {
39 return &g_ppb_zoom_thunk;
42 } // namespace thunk
43 } // namespace ppapi