diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 05:51:27 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 05:51:27 +0000 |
commit | 4697f72f5bdb2ead8aa9051b47fb0fade5acd1f5 (patch) | |
tree | 4b27e9a2b6f932059c57c20aed2f4841f5a15d0a /ppapi/thunk/ppb_file_io_trusted_thunk.cc | |
parent | 2f89b6045896d8e8efc3984da72c3bf4c63d6e0f (diff) | |
download | chromium_src-4697f72f5bdb2ead8aa9051b47fb0fade5acd1f5.zip chromium_src-4697f72f5bdb2ead8aa9051b47fb0fade5acd1f5.tar.gz chromium_src-4697f72f5bdb2ead8aa9051b47fb0fade5acd1f5.tar.bz2 |
Revert 87415 - Convert more interfaces to the new thunk system. This goes up to and including
the ones starting with "F".
Since this adds a lot more interfaces, I added the macro stuff we used for the
old system to generate the various template specializations. This involded a
lot of renaming since the As* needs to match the name (I was previously leaving
off the "PPB_" part). I did other misc cleanup to the infrastructure.
Review URL: http://codereview.chromium.org/7082036
TBR=brettw@chromium.org
Review URL: http://codereview.chromium.org/7006022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk/ppb_file_io_trusted_thunk.cc')
-rw-r--r-- | ppapi/thunk/ppb_file_io_trusted_thunk.cc | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/ppapi/thunk/ppb_file_io_trusted_thunk.cc b/ppapi/thunk/ppb_file_io_trusted_thunk.cc deleted file mode 100644 index 1cba025..0000000 --- a/ppapi/thunk/ppb_file_io_trusted_thunk.cc +++ /dev/null @@ -1,57 +0,0 @@ -// 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_file_io_trusted_dev.h" -#include "ppapi/c/pp_completion_callback.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/thunk/thunk.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppb_file_io_api.h" -#include "ppapi/thunk/resource_creation_api.h" - -namespace ppapi { -namespace thunk { - -namespace { - -int32_t GetOSFileDescriptor(PP_Resource file_io) { - EnterResource<PPB_FileIO_API> enter(file_io, true); - if (enter.failed()) - return PP_ERROR_BADRESOURCE; - return enter.object()->GetOSFileDescriptor(); -} - -int32_t WillWrite(PP_Resource file_io, - int64_t offset, - int32_t bytes_to_write, - PP_CompletionCallback callback) { - EnterResource<PPB_FileIO_API> enter(file_io, true); - if (enter.failed()) - return PP_ERROR_BADRESOURCE; - return enter.object()->WillWrite(offset, bytes_to_write, callback); -} - -int32_t WillSetLength(PP_Resource file_io, - int64_t length, - PP_CompletionCallback callback) { - EnterResource<PPB_FileIO_API> enter(file_io, true); - if (enter.failed()) - return PP_ERROR_BADRESOURCE; - return enter.object()->WillSetLength(length, callback); -} - -const PPB_FileIOTrusted_Dev g_ppb_file_io_trusted_thunk = { - &GetOSFileDescriptor, - &WillWrite, - &WillSetLength -}; - -} // namespace - -const PPB_FileIOTrusted_Dev* GetPPB_FileIOTrusted_Thunk() { - return &g_ppb_file_io_trusted_thunk; -} - -} // namespace thunk -} // namespace ppapi |