| Index: ui/base/clipboard/clipboard.h
|
| diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
|
| index b98cfc4748953f32ad60eb5c45be673cd1afc771..31fdd3343596a497db0b1fd7419a5e56cd189a0d 100644
|
| --- a/ui/base/clipboard/clipboard.h
|
| +++ b/ui/base/clipboard/clipboard.h
|
| @@ -46,6 +46,7 @@ class NSString;
|
| #endif
|
|
|
| namespace ui {
|
| +class ClipboardTest;
|
|
|
| class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
|
| public:
|
| @@ -182,8 +183,17 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
|
| return static_cast<Buffer>(buffer);
|
| }
|
|
|
| - Clipboard();
|
| - ~Clipboard();
|
| + // Returns the clipboard object for the current thread.
|
| + //
|
| + // Most implementations will have at most one clipboard which will live on
|
| + // the main UI thread, but Windows has tricky semantics where there have to
|
| + // be two clipboards: one that lives on the UI thread and one that lives on
|
| + // the IO thread.
|
| + static Clipboard* GetForCurrentThread();
|
| +
|
| + // Destroys all thread local clipboards during shutdown. Each clipboard will
|
| + // be destructed on its associated thread.
|
| + static void DestroyClipboards();
|
|
|
| // Write a bunch of objects to the system clipboard. Copies are made of the
|
| // contents of |objects|. On Windows they are copied to the system clipboard.
|
| @@ -284,6 +294,10 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(ClipboardTest, SharedBitmapTest);
|
| FRIEND_TEST_ALL_PREFIXES(ClipboardTest, EmptyHTMLTest);
|
| + friend class ClipboardTest;
|
| +
|
| + Clipboard();
|
| + ~Clipboard();
|
|
|
| void DispatchObject(ObjectType type, const ObjectMapParams& params);
|
|
|
|
|