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

Side by Side Diff: webkit/plugins/ppapi/ppb_char_set_impl.cc

Issue 7349016: Added versioning for PPB_Core::MemAlloc and MemFree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes based on comments from dmichael Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/plugins/ppapi/ppb_char_set_impl.h" 5 #include "webkit/plugins/ppapi/ppb_char_set_impl.h"
6 6
7 #include "ppapi/c/dev/ppb_char_set_dev.h" 7 #include "ppapi/c/dev/ppb_char_set_dev.h"
8 #include "ppapi/c/dev/ppb_memory_dev.h"
8 #include "ppapi/shared_impl/char_set_impl.h" 9 #include "ppapi/shared_impl/char_set_impl.h"
9 #include "webkit/plugins/ppapi/plugin_delegate.h" 10 #include "webkit/plugins/ppapi/plugin_delegate.h"
10 #include "webkit/plugins/ppapi/plugin_module.h" 11 #include "webkit/plugins/ppapi/plugin_module.h"
11 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 12 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
12 #include "webkit/plugins/ppapi/resource_tracker.h" 13 #include "webkit/plugins/ppapi/resource_tracker.h"
13 #include "webkit/plugins/ppapi/var.h" 14 #include "webkit/plugins/ppapi/var.h"
14 15
15 using ::ppapi::thunk::PPB_CharSet_FunctionAPI; 16 using ::ppapi::thunk::PPB_CharSet_FunctionAPI;
16 17
17 namespace webkit { 18 namespace webkit {
(...skipping 10 matching lines...) Expand all
28 return this; 29 return this;
29 } 30 }
30 31
31 char* PPB_CharSet_Impl::UTF16ToCharSet(PP_Instance instance, 32 char* PPB_CharSet_Impl::UTF16ToCharSet(PP_Instance instance,
32 const uint16_t* utf16, 33 const uint16_t* utf16,
33 uint32_t utf16_len, 34 uint32_t utf16_len,
34 const char* output_char_set, 35 const char* output_char_set,
35 PP_CharSet_ConversionError on_error, 36 PP_CharSet_ConversionError on_error,
36 uint32_t* output_length) { 37 uint32_t* output_length) {
37 return ::ppapi::CharSetImpl::UTF16ToCharSet( 38 return ::ppapi::CharSetImpl::UTF16ToCharSet(
38 PluginModule::GetCore(), utf16, utf16_len, output_char_set, on_error, 39 PluginModule::GetMemoryDev(), utf16, utf16_len, output_char_set, on_error,
39 output_length); 40 output_length);
40 } 41 }
41 42
42 uint16_t* PPB_CharSet_Impl::CharSetToUTF16(PP_Instance instance, 43 uint16_t* PPB_CharSet_Impl::CharSetToUTF16(PP_Instance instance,
43 const char* input, 44 const char* input,
44 uint32_t input_len, 45 uint32_t input_len,
45 const char* input_char_set, 46 const char* input_char_set,
46 PP_CharSet_ConversionError on_error, 47 PP_CharSet_ConversionError on_error,
47 uint32_t* output_length) { 48 uint32_t* output_length) {
48 return ::ppapi::CharSetImpl::CharSetToUTF16( 49 return ::ppapi::CharSetImpl::CharSetToUTF16(
49 PluginModule::GetCore(), input, input_len, input_char_set, on_error, 50 PluginModule::GetMemoryDev(), input, input_len, input_char_set, on_error,
50 output_length); 51 output_length);
51 } 52 }
52 53
53 PP_Var PPB_CharSet_Impl::GetDefaultCharSet(PP_Instance instance) { 54 PP_Var PPB_CharSet_Impl::GetDefaultCharSet(PP_Instance instance) {
54 std::string encoding = instance_->delegate()->GetDefaultEncoding(); 55 std::string encoding = instance_->delegate()->GetDefaultEncoding();
55 return StringVar::StringToPPVar(instance_->module()->pp_module(), encoding); 56 return StringVar::StringToPPVar(instance_->module()->pp_module(), encoding);
56 } 57 }
57 58
58 } // namespace ppapi 59 } // namespace ppapi
59 } // namespace webkit 60 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698