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 #ifndef UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 5 #ifndef UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
6 #define UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 6 #define UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 // Platform neutral holder for native data representation of a clipboard type. | 65 // Platform neutral holder for native data representation of a clipboard type. |
66 struct UI_BASE_EXPORT FormatType { | 66 struct UI_BASE_EXPORT FormatType { |
67 FormatType(); | 67 FormatType(); |
68 ~FormatType(); | 68 ~FormatType(); |
69 | 69 |
70 // Serializes and deserializes a FormatType for use in IPC messages. | 70 // Serializes and deserializes a FormatType for use in IPC messages. |
71 std::string Serialize() const; | 71 std::string Serialize() const; |
72 static FormatType Deserialize(const std::string& serialization); | 72 static FormatType Deserialize(const std::string& serialization); |
73 | 73 |
74 #if defined(USE_AURA) | 74 #if defined(TOOLKIT_VIEWS) |
75 // FormatType can be used in a set on some platforms. | 75 // FormatType can be used in a set on some platforms. |
76 bool operator<(const FormatType& other) const; | 76 bool operator<(const FormatType& other) const; |
77 #endif | 77 #endif |
78 | 78 |
79 #if defined(OS_WIN) | 79 #if defined(OS_WIN) |
80 const FORMATETC& ToFormatEtc() const { return data_; } | 80 const FORMATETC& ToFormatEtc() const { return data_; } |
81 #elif defined(USE_AURA) || defined(OS_ANDROID) | 81 #elif defined(USE_AURA) || defined(OS_ANDROID) |
82 const std::string& ToString() const { return data_; } | 82 const std::string& ToString() const { return data_; } |
83 #elif defined(OS_MACOSX) | 83 #elif defined(OS_MACOSX) |
84 NSString* ToNSString() const { return data_; } | 84 NSString* ToNSString() const { return data_; } |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 // TODO(dcheng): Remove the temporary exception for content. | 326 // TODO(dcheng): Remove the temporary exception for content. |
327 friend class content::ClipboardMessageFilter; | 327 friend class content::ClipboardMessageFilter; |
328 friend class ScopedClipboardWriter; | 328 friend class ScopedClipboardWriter; |
329 | 329 |
330 DISALLOW_COPY_AND_ASSIGN(Clipboard); | 330 DISALLOW_COPY_AND_ASSIGN(Clipboard); |
331 }; | 331 }; |
332 | 332 |
333 } // namespace ui | 333 } // namespace ui |
334 | 334 |
335 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 335 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
OLD | NEW |