Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6996)

Unified Diff: chrome/views/text_field.cc

Issue 9154: Rewrote the clipboard API to be more concurrent. Added a helper class to make... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | webkit/build/glue/glue.vcproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/text_field.cc
===================================================================
--- chrome/views/text_field.cc (revision 4189)
+++ chrome/views/text_field.cc (working copy)
@@ -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 @@
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);
}
}
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | webkit/build/glue/glue.vcproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698