Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1280)

Unified Diff: ppapi/proxy/ppb_char_set_proxy.cc

Issue 7740038: Use macros to define pepper interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New patch Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppb_char_set_proxy.h ('k') | ppapi/proxy/ppb_console_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_char_set_proxy.cc
diff --git a/ppapi/proxy/ppb_char_set_proxy.cc b/ppapi/proxy/ppb_char_set_proxy.cc
index f23626f7248f9dbf98b60e863e675c3651e90de8..52610f3929cea7a01fca91dc3d5857dde19da9ed 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) {
« no previous file with comments | « ppapi/proxy/ppb_char_set_proxy.h ('k') | ppapi/proxy/ppb_console_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698