| OLD | NEW |
| 1 // Copyright (c) 2011 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 #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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 Clipboard(); | 110 Clipboard(); |
| 111 ~Clipboard(); | 111 ~Clipboard(); |
| 112 | 112 |
| 113 // Write a bunch of objects to the system clipboard. Copies are made of the | 113 // Write a bunch of objects to the system clipboard. Copies are made of the |
| 114 // contents of |objects|. On Windows they are copied to the system clipboard. | 114 // contents of |objects|. On Windows they are copied to the system clipboard. |
| 115 // On linux they are copied into a structure owned by the Clipboard object and | 115 // On linux they are copied into a structure owned by the Clipboard object and |
| 116 // kept until the system clipboard is set again. | 116 // kept until the system clipboard is set again. |
| 117 void WriteObjects(const ObjectMap& objects); | 117 void WriteObjects(const ObjectMap& objects); |
| 118 | 118 |
| 119 // Behaves as above. If there is some shared memory handle passed as one of |
| 120 // the objects, it came from the process designated by |process|. This will |
| 121 // assist in turning it into a shared memory region that the current process |
| 122 // can use. |
| 123 void WriteObjects(const ObjectMap& objects, base::ProcessHandle process); |
| 124 |
| 119 // On Linux/BSD, we need to know when the clipboard is set to a URL. Most | 125 // On Linux/BSD, we need to know when the clipboard is set to a URL. Most |
| 120 // platforms don't care. | 126 // platforms don't care. |
| 121 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(USE_AURA) | 127 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(USE_AURA) |
| 122 void DidWriteURL(const std::string& utf8_text) {} | 128 void DidWriteURL(const std::string& utf8_text) {} |
| 123 #else // !defined(OS_WIN) && !defined(OS_MACOSX) | 129 #else // !defined(OS_WIN) && !defined(OS_MACOSX) |
| 124 void DidWriteURL(const std::string& utf8_text); | 130 void DidWriteURL(const std::string& utf8_text); |
| 125 #endif | 131 #endif |
| 126 | 132 |
| 127 // Returns a sequence number which uniquely identifies clipboard state. | 133 // Returns a sequence number which uniquely identifies clipboard state. |
| 128 // This can be used to version the data on the clipboard and determine | 134 // This can be used to version the data on the clipboard and determine |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 static const char kMimeTypeText[]; | 286 static const char kMimeTypeText[]; |
| 281 static const char kMimeTypeHTML[]; | 287 static const char kMimeTypeHTML[]; |
| 282 static const char kMimeTypePNG[]; | 288 static const char kMimeTypePNG[]; |
| 283 | 289 |
| 284 DISALLOW_COPY_AND_ASSIGN(Clipboard); | 290 DISALLOW_COPY_AND_ASSIGN(Clipboard); |
| 285 }; | 291 }; |
| 286 | 292 |
| 287 } // namespace ui | 293 } // namespace ui |
| 288 | 294 |
| 289 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 295 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
| OLD | NEW |