summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_char_set_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/proxy/ppb_char_set_proxy.cc')
-rw-r--r--ppapi/proxy/ppb_char_set_proxy.cc40
1 files changed, 7 insertions, 33 deletions
diff --git a/ppapi/proxy/ppb_char_set_proxy.cc b/ppapi/proxy/ppb_char_set_proxy.cc
index f23626f..52610f3 100644
--- a/ppapi/proxy/ppb_char_set_proxy.cc
+++ b/ppapi/proxy/ppb_char_set_proxy.cc
@@ -9,6 +9,7 @@
#include "ppapi/c/dev/ppb_memory_dev.h"
#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/proxy/ppb_memory_proxy.h"
#include "ppapi/proxy/serialized_var.h"
#include "ppapi/shared_impl/char_set_impl.h"
#include "ppapi/thunk/enter.h"
@@ -17,40 +18,13 @@
namespace ppapi {
namespace proxy {
-namespace {
-
-const PPB_Memory_Dev* GetMemoryDevInterface() {
- return static_cast<const PPB_Memory_Dev*>(
- PluginDispatcher::GetInterfaceFromDispatcher(PPB_MEMORY_DEV_INTERFACE));
-}
-
-InterfaceProxy* CreateCharSetProxy(Dispatcher* dispatcher,
- const void* target_interface) {
- return new PPB_CharSet_Proxy(dispatcher, target_interface);
-}
-
-} // namespace
-
-PPB_CharSet_Proxy::PPB_CharSet_Proxy(Dispatcher* dispatcher,
- const void* target_interface)
- : InterfaceProxy(dispatcher, target_interface) {
+PPB_CharSet_Proxy::PPB_CharSet_Proxy(Dispatcher* dispatcher)
+ : InterfaceProxy(dispatcher) {
}
PPB_CharSet_Proxy::~PPB_CharSet_Proxy() {
}
-// static
-const InterfaceProxy::Info* PPB_CharSet_Proxy::GetInfo() {
- static const Info info = {
- ppapi::thunk::GetPPB_CharSet_Thunk(),
- PPB_CHAR_SET_DEV_INTERFACE,
- INTERFACE_ID_PPB_CHAR_SET,
- false,
- &CreateCharSetProxy,
- };
- return &info;
-}
-
ppapi::thunk::PPB_CharSet_FunctionAPI*
PPB_CharSet_Proxy::AsPPB_CharSet_FunctionAPI() {
return this;
@@ -63,8 +37,8 @@ char* PPB_CharSet_Proxy::UTF16ToCharSet(
PP_CharSet_ConversionError on_error,
uint32_t* output_length) {
return ppapi::CharSetImpl::UTF16ToCharSet(
- GetMemoryDevInterface(), utf16, utf16_len, output_char_set, on_error,
- output_length);
+ GetPPB_Memory_Interface(), utf16, utf16_len,
+ output_char_set, on_error, output_length);
}
uint16_t* PPB_CharSet_Proxy::CharSetToUTF16(
@@ -74,8 +48,8 @@ uint16_t* PPB_CharSet_Proxy::CharSetToUTF16(
PP_CharSet_ConversionError on_error,
uint32_t* output_length) {
return ppapi::CharSetImpl::CharSetToUTF16(
- GetMemoryDevInterface(), input, input_len, input_char_set, on_error,
- output_length);
+ GetPPB_Memory_Interface(), input, input_len,
+ input_char_set, on_error, output_length);
}
PP_Var PPB_CharSet_Proxy::GetDefaultCharSet(PP_Instance instance) {