summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_char_set_impl.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-11 04:54:31 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-11 04:54:31 +0000
commit8d770e49e726ba87cb5b91b2cbf760c57e3f0f68 (patch)
tree0453c90403154a9f001b426a36b1b4d0f98c90ef /webkit/plugins/ppapi/ppb_char_set_impl.cc
parent2cb3e6c67ad02e3bf137f74493d28f74ca772527 (diff)
downloadchromium_src-8d770e49e726ba87cb5b91b2cbf760c57e3f0f68.zip
chromium_src-8d770e49e726ba87cb5b91b2cbf760c57e3f0f68.tar.gz
chromium_src-8d770e49e726ba87cb5b91b2cbf760c57e3f0f68.tar.bz2
Convert the charset, memory, and crypto interfaces to use the thunk system.
This removes a bunch of plumbing for the proxy and impl sides, and uses the new macro system for registering the interface. This saves a lot of code and a bunch of boilerplate files could be deleted. Review URL: http://codereview.chromium.org/8159003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104850 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_char_set_impl.cc')
-rw-r--r--webkit/plugins/ppapi/ppb_char_set_impl.cc61
1 files changed, 0 insertions, 61 deletions
diff --git a/webkit/plugins/ppapi/ppb_char_set_impl.cc b/webkit/plugins/ppapi/ppb_char_set_impl.cc
deleted file mode 100644
index a21b221..0000000
--- a/webkit/plugins/ppapi/ppb_char_set_impl.cc
+++ /dev/null
@@ -1,61 +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 "webkit/plugins/ppapi/ppb_char_set_impl.h"
-
-#include "ppapi/c/dev/ppb_char_set_dev.h"
-#include "ppapi/c/dev/ppb_memory_dev.h"
-#include "ppapi/shared_impl/char_set_impl.h"
-#include "ppapi/shared_impl/var.h"
-#include "webkit/plugins/ppapi/plugin_delegate.h"
-#include "webkit/plugins/ppapi/plugin_module.h"
-#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
-
-using ppapi::StringVar;
-using ppapi::thunk::PPB_CharSet_FunctionAPI;
-
-namespace webkit {
-namespace ppapi {
-
-PPB_CharSet_Impl::PPB_CharSet_Impl(PluginInstance* instance)
- : instance_(instance) {
-}
-
-PPB_CharSet_Impl::~PPB_CharSet_Impl() {
-}
-
-PPB_CharSet_FunctionAPI* PPB_CharSet_Impl::AsPPB_CharSet_FunctionAPI() {
- return this;
-}
-
-char* PPB_CharSet_Impl::UTF16ToCharSet(PP_Instance instance,
- const uint16_t* utf16,
- uint32_t utf16_len,
- const char* output_char_set,
- PP_CharSet_ConversionError on_error,
- uint32_t* output_length) {
- return ::ppapi::CharSetImpl::UTF16ToCharSet(
- PluginModule::GetMemoryDev(), utf16, utf16_len, output_char_set, on_error,
- output_length);
-}
-
-uint16_t* PPB_CharSet_Impl::CharSetToUTF16(PP_Instance instance,
- const char* input,
- uint32_t input_len,
- const char* input_char_set,
- PP_CharSet_ConversionError on_error,
- uint32_t* output_length) {
- return ::ppapi::CharSetImpl::CharSetToUTF16(
- PluginModule::GetMemoryDev(), input, input_len, input_char_set, on_error,
- output_length);
-}
-
-PP_Var PPB_CharSet_Impl::GetDefaultCharSet(PP_Instance instance) {
- std::string encoding = instance_->delegate()->GetDefaultEncoding();
- return StringVar::StringToPPVar(instance_->module()->pp_module(), encoding);
-}
-
-} // namespace ppapi
-} // namespace webkit