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

Side by Side Diff: ui/base/clipboard/custom_data_helper.h

Issue 2011833003: Implement ui::ClipboardMus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static in test by creating forwarding clipboard subclass. Created 4 years, 6 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
« no previous file with comments | « ui/base/clipboard/clipboard_unittest.cc ('k') | ui/base/clipboard/custom_data_helper_linux.cc » ('j') | 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) 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
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_
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_unittest.cc ('k') | ui/base/clipboard/custom_data_helper_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698