diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-06 22:52:40 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-06 22:52:40 +0000 |
commit | 55a5a5252075df867707a521b927e5e24f9090e1 (patch) | |
tree | cb030c4a7ef0d0aa1dfeea5ea16090958c222a9b /ppapi/thunk/ppb_zoom_thunk.cc | |
parent | 3704633a280e1e834ea3959f57841ab718cbe3ec (diff) | |
download | chromium_src-55a5a5252075df867707a521b927e5e24f9090e1.zip chromium_src-55a5a5252075df867707a521b927e5e24f9090e1.tar.gz chromium_src-55a5a5252075df867707a521b927e5e24f9090e1.tar.bz2 |
Move PPB_Zoom and PPB_Messageing to the thunk system. Implement PPB_Messaging
proxy.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/7283020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk/ppb_zoom_thunk.cc')
-rw-r--r-- | ppapi/thunk/ppb_zoom_thunk.cc | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/ppapi/thunk/ppb_zoom_thunk.cc b/ppapi/thunk/ppb_zoom_thunk.cc new file mode 100644 index 0000000..e7e5236 --- /dev/null +++ b/ppapi/thunk/ppb_zoom_thunk.cc @@ -0,0 +1,43 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ppapi/c/dev/ppb_zoom_dev.h" +#include "ppapi/thunk/thunk.h" +#include "ppapi/thunk/enter.h" +#include "ppapi/thunk/ppb_instance_api.h" + +namespace ppapi { +namespace thunk { + +namespace { + +void ZoomChanged(PP_Instance instance, double factor) { + EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true); + if (enter.succeeded()) + enter.functions()->ZoomChanged(instance, factor); +} + +void ZoomLimitsChanged(PP_Instance instance, + double minimum_factor, + double maximum_factor) { + EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true); + if (enter.succeeded()) { + enter.functions()->ZoomLimitsChanged(instance, + minimum_factor, maximum_factor); + } +} + +const PPB_Zoom_Dev g_ppb_zoom_thunk = { + &ZoomChanged, + &ZoomLimitsChanged +}; + +} // namespace + +const PPB_Zoom_Dev* GetPPB_Zoom_Thunk() { + return &g_ppb_zoom_thunk; +} + +} // namespace thunk +} // namespace ppapi |