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

Side by Side Diff: ui/views/controls/message_box_view.cc

Issue 9232075: Have ScopedClipboardWriter and Clipboard::WriteObjects take a buffer parameter. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix build error. Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/message_box_view.h" 5 #include "ui/views/controls/message_box_view.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if (prompt_field_ && prompt_field_->HasFocus()) 146 if (prompt_field_ && prompt_field_->HasFocus())
147 return false; 147 return false;
148 148
149 if (!ViewsDelegate::views_delegate) 149 if (!ViewsDelegate::views_delegate)
150 return false; 150 return false;
151 151
152 ui::Clipboard* clipboard = ViewsDelegate::views_delegate->GetClipboard(); 152 ui::Clipboard* clipboard = ViewsDelegate::views_delegate->GetClipboard();
153 if (!clipboard) 153 if (!clipboard)
154 return false; 154 return false;
155 155
156 ui::ScopedClipboardWriter scw(clipboard); 156 ui::ScopedClipboardWriter scw(clipboard, ui::Clipboard::BUFFER_STANDARD);
157 string16 text = message_labels_[0]->GetText(); 157 string16 text = message_labels_[0]->GetText();
158 for (size_t i = 1; i < message_labels_.size(); ++i) 158 for (size_t i = 1; i < message_labels_.size(); ++i)
159 text += message_labels_[i]->GetText(); 159 text += message_labels_[i]->GetText();
160 scw.WriteText(text); 160 scw.WriteText(text);
161 return true; 161 return true;
162 } 162 }
163 163
164 /////////////////////////////////////////////////////////////////////////////// 164 ///////////////////////////////////////////////////////////////////////////////
165 // MessageBoxView, private: 165 // MessageBoxView, private:
166 166
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 if (checkbox_) { 267 if (checkbox_) {
268 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 268 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
269 layout->StartRow(0, checkbox_column_view_set_id); 269 layout->StartRow(0, checkbox_column_view_set_id);
270 layout->AddView(checkbox_); 270 layout->AddView(checkbox_);
271 } 271 }
272 272
273 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 273 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
274 } 274 }
275 275
276 } // namespace views 276 } // namespace views
OLDNEW
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_aura.cc ('k') | ui/views/controls/textfield/native_textfield_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698