OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ppapi/shared_impl/private/ppb_char_set_shared.h" | 5 #include "ppapi/shared_impl/private/ppb_char_set_shared.h" |
6 | 6 |
| 7 #include <string.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 | 10 |
9 #include "base/i18n/icu_string_conversions.h" | 11 #include "base/i18n/icu_string_conversions.h" |
10 #include "ppapi/c/dev/ppb_memory_dev.h" | 12 #include "ppapi/c/dev/ppb_memory_dev.h" |
11 #include "ppapi/thunk/thunk.h" | 13 #include "ppapi/thunk/thunk.h" |
12 #include "third_party/icu/source/common/unicode/ucnv.h" | 14 #include "third_party/icu/source/common/unicode/ucnv.h" |
13 #include "third_party/icu/source/common/unicode/ucnv_cb.h" | 15 #include "third_party/icu/source/common/unicode/ucnv_cb.h" |
14 #include "third_party/icu/source/common/unicode/ucnv_err.h" | 16 #include "third_party/icu/source/common/unicode/ucnv_err.h" |
15 #include "third_party/icu/source/common/unicode/ustring.h" | 17 #include "third_party/icu/source/common/unicode/ustring.h" |
16 | 18 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 if (output_buffer) { | 232 if (output_buffer) { |
231 memcpy(output_buffer, output.c_str(), | 233 memcpy(output_buffer, output.c_str(), |
232 std::min(*output_utf16_length, static_cast<uint32_t>(output.size())) | 234 std::min(*output_utf16_length, static_cast<uint32_t>(output.size())) |
233 * sizeof(uint16_t)); | 235 * sizeof(uint16_t)); |
234 } | 236 } |
235 *output_utf16_length = static_cast<uint32_t>(output.size()); | 237 *output_utf16_length = static_cast<uint32_t>(output.size()); |
236 return PP_TRUE; | 238 return PP_TRUE; |
237 } | 239 } |
238 | 240 |
239 } // namespace ppapi | 241 } // namespace ppapi |
OLD | NEW |