Chromium Code Reviews| Index: ui/base/clipboard/clipboard.h |
| diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h |
| index 4dc7a380557640a94b1d6cf426d6712104a1987a..0182c65a877b72472cf164c43ed26626c3add927 100644 |
| --- a/ui/base/clipboard/clipboard.h |
| +++ b/ui/base/clipboard/clipboard.h |
| @@ -130,9 +130,7 @@ class UI_EXPORT Clipboard { |
| // Buffer designates which clipboard the action should be applied to. |
| // Only platforms that use the X Window System support the selection |
| - // buffer. Furthermore we currently only use a buffer other than the |
| - // standard buffer when reading from the clipboard so only those |
| - // functions accept a buffer parameter. |
| + // buffer. |
| enum Buffer { |
| BUFFER_STANDARD, |
| BUFFER_SELECTION, |
| @@ -161,14 +159,14 @@ class UI_EXPORT Clipboard { |
| // contents of |objects|. On Windows they are copied to the system clipboard. |
| // On linux they are copied into a structure owned by the Clipboard object and |
| // kept until the system clipboard is set again. |
| - void WriteObjects(const ObjectMap& objects); |
| + void WriteObjects(Buffer buffer, const ObjectMap& objects); |
| // On Linux/BSD, we need to know when the clipboard is set to a URL. Most |
| // platforms don't care. |
| #if defined(OS_WIN) || defined(OS_MACOSX) || defined(USE_AURA) |
| - void DidWriteURL(const std::string& utf8_text) {} |
| + void DidWriteURL(Buffer buffer, const std::string& utf8_text) {} |
|
dcheng
2012/02/03 21:53:58
It seems like we don't need the buffer parameter s
peter1
2012/02/04 00:54:46
We need to check in DidWriteURL that the write was
dcheng
2012/02/04 01:11:05
Right, but this is only called from ScopedClipboar
peter1
2012/02/04 02:05:43
I see. Well, I don't think it matters too much wh
|
| #else // !defined(OS_WIN) && !defined(OS_MACOSX) |
| - void DidWriteURL(const std::string& utf8_text); |
| + void DidWriteURL(Buffer buffer, const std::string& utf8_text); |
| #endif |
| // Returns a sequence number which uniquely identifies clipboard state. |
| @@ -311,7 +309,7 @@ class UI_EXPORT Clipboard { |
| private: |
| // Write changes to gtk clipboard. |
| - void SetGtkClipboard(); |
| + void SetGtkClipboard(Buffer buffer); |
| // Insert a mapping into clipboard_data_. |
| void InsertMapping(const char* key, char* data, size_t data_len); |