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

Unified Diff: ui/views/controls/textfield/native_textfield_win.cc

Issue 10911074: Change how ui::Clipboard is accessed so there's only one per thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix various windows compile failures. Created 8 years, 3 months 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
Index: ui/views/controls/textfield/native_textfield_win.cc
diff --git a/ui/views/controls/textfield/native_textfield_win.cc b/ui/views/controls/textfield/native_textfield_win.cc
index 6baebf64c00cfa612250b7dc058888e8656c8ec9..9e829d8004573d444381a2b9bc0f50d322e6dbd9 100644
--- a/ui/views/controls/textfield/native_textfield_win.cc
+++ b/ui/views/controls/textfield/native_textfield_win.cc
@@ -559,7 +559,7 @@ void NativeTextfieldWin::OnCopy() {
const string16 text(GetSelectedText());
if (!text.empty() && ViewsDelegate::views_delegate) {
ui::ScopedClipboardWriter scw(
- ViewsDelegate::views_delegate->GetClipboard(),
+ ui::Clipboard::GetForCurrentThread(),
ui::Clipboard::BUFFER_STANDARD);
scw.WriteText(text);
}
@@ -966,7 +966,7 @@ void NativeTextfieldWin::OnPaste() {
if (textfield_->read_only() || !ViewsDelegate::views_delegate)
return;
- ui::Clipboard* clipboard = ViewsDelegate::views_delegate->GetClipboard();
+ ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
if (!clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(),
ui::Clipboard::BUFFER_STANDARD))
return;

Powered by Google App Engine
This is Rietveld 408576698