diff options
author | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-21 23:31:36 +0000 |
---|---|---|
committer | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-21 23:31:36 +0000 |
commit | 6a77ef2c9b299c6e39919cabda9600680ca024c5 (patch) | |
tree | 951688c0eb5bbfbd54f6f27cd7ecaac6bd53bfae /ppapi/thunk/ppb_flash_print_thunk.cc | |
parent | ea6c4239e295ebf0c8e36199d425a482c7f5b3ac (diff) | |
download | chromium_src-6a77ef2c9b299c6e39919cabda9600680ca024c5.zip chromium_src-6a77ef2c9b299c6e39919cabda9600680ca024c5.tar.gz chromium_src-6a77ef2c9b299c6e39919cabda9600680ca024c5.tar.bz2 |
Refactor Flash Print to the new pepper resource model
This refactors PPB_Flash_Print to the new pepper resource model. This is the last function from the ppb_flash_proxy to be refactored. The old proxy is still full of stale #includes and can now be removed entirely but this will be done in a separate CL.
This was tested by printing from http://mycoloringbook.keasoftware.com/
Review URL: https://chromiumcodereview.appspot.com/11640033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174477 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk/ppb_flash_print_thunk.cc')
-rw-r--r-- | ppapi/thunk/ppb_flash_print_thunk.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ppapi/thunk/ppb_flash_print_thunk.cc b/ppapi/thunk/ppb_flash_print_thunk.cc new file mode 100644 index 0000000..1316784 --- /dev/null +++ b/ppapi/thunk/ppb_flash_print_thunk.cc @@ -0,0 +1,34 @@ +// Copyright (c) 2012 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/pp_instance.h" +#include "ppapi/c/private/ppb_flash_print.h" +#include "ppapi/thunk/enter.h" +#include "ppapi/thunk/ppb_flash_functions_api.h" +#include "ppapi/thunk/thunk.h" + +namespace ppapi { +namespace thunk { + +namespace { + +void InvokePrinting(PP_Instance instance) { + EnterInstanceAPI<PPB_Flash_Functions_API> enter(instance); + if (enter.failed()) + return; + enter.functions()->InvokePrinting(instance); +} + +const PPB_Flash_Print_1_0 g_ppb_flash_print_1_0_thunk = { + &InvokePrinting, +}; + +} // namespace + +const PPB_Flash_Print_1_0* GetPPB_Flash_Print_1_0_Thunk() { + return &g_ppb_flash_print_1_0_thunk; +} + +} // namespace thunk +} // namespace ppapi |