diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 01:34:30 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 01:34:30 +0000 |
commit | 3ee3ffd1d79a0c1544f3bfd70c7de7606df9482f (patch) | |
tree | 0943a0925f5974478463e5d00886be29109858e6 /chrome/views | |
parent | 38733063b7e1cf0b6e67c0b590773ff4f1aaa18d (diff) | |
download | chromium_src-3ee3ffd1d79a0c1544f3bfd70c7de7606df9482f.zip chromium_src-3ee3ffd1d79a0c1544f3bfd70c7de7606df9482f.tar.gz chromium_src-3ee3ffd1d79a0c1544f3bfd70c7de7606df9482f.tar.bz2 |
Rewrote the clipboard API to be more concurrent. Added a helper class to make it more foolproof. Updated all clients and unittests. Mac port by jeremy@chromium.org
Review URL: http://codereview.chromium.org/9154
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4719 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r-- | chrome/views/text_field.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/views/text_field.cc b/chrome/views/text_field.cc index baa70a1..c36fdbb 100644 --- a/chrome/views/text_field.cc +++ b/chrome/views/text_field.cc @@ -12,6 +12,7 @@ #include <vsstyle.h> #include "base/gfx/native_theme.h" +#include "base/scoped_clipboard_writer.h" #include "base/string_util.h" #include "base/win_util.h" #include "chrome/browser/browser_process.h" @@ -371,10 +372,8 @@ void TextField::Edit::OnCopy() { const std::wstring text(GetSelectedText()); if (!text.empty()) { - ClipboardService* clipboard = g_browser_process->clipboard_service(); - - clipboard->Clear(); - clipboard->WriteText(text); + ScopedClipboardWriter scw(g_browser_process->clipboard_service()); + scw.WriteText(text); } } |