summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authordharani@google.com <dharani@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-09 03:07:45 +0000
committerdharani@google.com <dharani@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-09 03:07:45 +0000
commitb3520c076d552f69efafff85dbc96bfde14de091 (patch)
treed81c7a0b70fa8e29ee9cf9b5afed669c0ef6045f /chrome_frame
parent124aff4eaf05a3ad67758982e7e41d5f9a7b4c43 (diff)
downloadchromium_src-b3520c076d552f69efafff85dbc96bfde14de091.zip
chromium_src-b3520c076d552f69efafff85dbc96bfde14de091.tar.gz
chromium_src-b3520c076d552f69efafff85dbc96bfde14de091.tar.bz2
Revert 155468 - Change how ui::Clipboard is accessed so there's only one per thread.
Currently, there can be any number of Clipboard objects, which can be massively simplified. This removes interfaces for fetching the Clipboard and makes everyone go through a single static ui::Clipboard::GetForCurrentThread() access point. BUG=130805 TBR=tc (change in webkit/ is trivial) Review URL: https://chromiumcodereview.appspot.com/10911074 TBR=erg@chromium.org Review URL: https://chromiumcodereview.appspot.com/10919180 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index d8d1e13..ec79019 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -491,17 +491,19 @@ std::wstring GetPathAndQueryFromUrl(const std::wstring& url) {
}
std::wstring GetClipboardText() {
+ ui::Clipboard clipboard;
string16 text16;
- ui::Clipboard::GetForCurrentThread()->ReadText(
- ui::Clipboard::BUFFER_STANDARD, &text16);
+ clipboard.ReadText(ui::Clipboard::BUFFER_STANDARD, &text16);
return UTF16ToWide(text16);
}
void SetClipboardText(const std::wstring& text) {
- ui::ScopedClipboardWriter clipboard_writer(
- ui::Clipboard::GetForCurrentThread(),
- ui::Clipboard::BUFFER_STANDARD);
- clipboard_writer.WriteText(WideToUTF16(text));
+ ui::Clipboard clipboard;
+ {
+ ui::ScopedClipboardWriter clipboard_writer(&clipboard,
+ ui::Clipboard::BUFFER_STANDARD);
+ clipboard_writer.WriteText(WideToUTF16(text));
+ }
}
bool AddCFMetaTag(std::string* html_data) {