| 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 // Due to restrictions of most operating systems, we don't directly map each |   5 // Due to restrictions of most operating systems, we don't directly map each | 
|   6 // type of custom data to a native data transfer type. Instead, we serialize |   6 // type of custom data to a native data transfer type. Instead, we serialize | 
|   7 // each key-value pair into the pickle as a pair of string objects, and then |   7 // each key-value pair into the pickle as a pair of string objects, and then | 
|   8 // write the binary data in the pickle to the native data transfer object. |   8 // write the binary data in the pickle to the native data transfer object. | 
|   9  |   9  | 
|  10 #ifndef UI_BASE_CLIPBOARD_CUSTOM_DATA_HELPER_H_ |  10 #ifndef UI_BASE_CLIPBOARD_CUSTOM_DATA_HELPER_H_ | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
|  28 @class NSString; |  28 @class NSString; | 
|  29 #else |  29 #else | 
|  30 class NSString; |  30 class NSString; | 
|  31 #endif |  31 #endif | 
|  32 #endif  // defined(OS_MACOSX) |  32 #endif  // defined(OS_MACOSX) | 
|  33  |  33  | 
|  34 namespace ui { |  34 namespace ui { | 
|  35  |  35  | 
|  36 #if defined(OS_MACOSX) && !defined(USE_AURA) |  36 #if defined(OS_MACOSX) && !defined(USE_AURA) | 
|  37 UI_BASE_EXPORT extern NSString* const kWebCustomDataPboardType; |  37 UI_BASE_EXPORT extern NSString* const kWebCustomDataPboardType; | 
|  38 #elif !defined(OS_WIN) && defined(USE_AURA) |  | 
|  39 UI_BASE_EXPORT extern const char kMimeTypeWebCustomData[]; |  | 
|  40 #endif |  38 #endif | 
|  41  |  39  | 
|  42 UI_BASE_EXPORT void ReadCustomDataTypes(const void* data, |  40 UI_BASE_EXPORT void ReadCustomDataTypes(const void* data, | 
|  43                                         size_t data_length, |  41                                         size_t data_length, | 
|  44                                         std::vector<base::string16>* types); |  42                                         std::vector<base::string16>* types); | 
|  45 UI_BASE_EXPORT void ReadCustomDataForType(const void* data, |  43 UI_BASE_EXPORT void ReadCustomDataForType(const void* data, | 
|  46                                           size_t data_length, |  44                                           size_t data_length, | 
|  47                                           const base::string16& type, |  45                                           const base::string16& type, | 
|  48                                           base::string16* result); |  46                                           base::string16* result); | 
|  49 UI_BASE_EXPORT void ReadCustomDataIntoMap( |  47 UI_BASE_EXPORT void ReadCustomDataIntoMap( | 
|  50     const void* data, |  48     const void* data, | 
|  51     size_t data_length, |  49     size_t data_length, | 
|  52     std::map<base::string16, base::string16>* result); |  50     std::map<base::string16, base::string16>* result); | 
|  53  |  51  | 
|  54 UI_BASE_EXPORT void WriteCustomDataToPickle( |  52 UI_BASE_EXPORT void WriteCustomDataToPickle( | 
|  55     const std::map<base::string16, base::string16>& data, |  53     const std::map<base::string16, base::string16>& data, | 
|  56     base::Pickle* pickle); |  54     base::Pickle* pickle); | 
|  57  |  55  | 
|  58 }  // namespace ui |  56 }  // namespace ui | 
|  59  |  57  | 
|  60 #endif  // UI_BASE_CLIPBOARD_CLIPBOARD_H_ |  58 #endif  // UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 
| OLD | NEW |