diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 20:26:50 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 20:26:50 +0000 |
commit | 8919c55c25dda90fcc7443855f8f96e4a0947e86 (patch) | |
tree | 61f004f948397a75e878d5792456ea0db654a57e /chrome_frame | |
parent | fde2cb0bc16de6a5be9e671f90370fed30dc83e5 (diff) | |
download | chromium_src-8919c55c25dda90fcc7443855f8f96e4a0947e86.zip chromium_src-8919c55c25dda90fcc7443855f8f96e4a0947e86.tar.gz chromium_src-8919c55c25dda90fcc7443855f8f96e4a0947e86.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155468 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc index ec79019..d8d1e13 100644 --- a/chrome_frame/test/chrome_frame_test_utils.cc +++ b/chrome_frame/test/chrome_frame_test_utils.cc @@ -491,19 +491,17 @@ std::wstring GetPathAndQueryFromUrl(const std::wstring& url) { } std::wstring GetClipboardText() { - ui::Clipboard clipboard; string16 text16; - clipboard.ReadText(ui::Clipboard::BUFFER_STANDARD, &text16); + ui::Clipboard::GetForCurrentThread()->ReadText( + ui::Clipboard::BUFFER_STANDARD, &text16); return UTF16ToWide(text16); } void SetClipboardText(const std::wstring& text) { - ui::Clipboard clipboard; - { - ui::ScopedClipboardWriter clipboard_writer(&clipboard, - ui::Clipboard::BUFFER_STANDARD); - clipboard_writer.WriteText(WideToUTF16(text)); - } + ui::ScopedClipboardWriter clipboard_writer( + ui::Clipboard::GetForCurrentThread(), + ui::Clipboard::BUFFER_STANDARD); + clipboard_writer.WriteText(WideToUTF16(text)); } bool AddCFMetaTag(std::string* html_data) { |