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

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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/accessibility/accessible_view_state.h" 10 #include "ui/base/accessibility/accessible_view_state.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 if (prompt_field_ && prompt_field_->HasFocus()) 109 if (prompt_field_ && prompt_field_->HasFocus())
110 return false; 110 return false;
111 111
112 if (!ViewsDelegate::views_delegate) 112 if (!ViewsDelegate::views_delegate)
113 return false; 113 return false;
114 114
115 ui::Clipboard* clipboard = ViewsDelegate::views_delegate->GetClipboard(); 115 ui::Clipboard* clipboard = ViewsDelegate::views_delegate->GetClipboard();
116 if (!clipboard) 116 if (!clipboard)
117 return false; 117 return false;
118 118
119 ui::ScopedClipboardWriter scw(clipboard); 119 ui::ScopedClipboardWriter scw(clipboard, ui::Clipboard::BUFFER_STANDARD);
120 scw.WriteText(message_label_->GetText()); 120 scw.WriteText(message_label_->GetText());
121 return true; 121 return true;
122 } 122 }
123 123
124 /////////////////////////////////////////////////////////////////////////////// 124 ///////////////////////////////////////////////////////////////////////////////
125 // MessageBoxView, private: 125 // MessageBoxView, private:
126 126
127 void MessageBoxView::Init(int options, 127 void MessageBoxView::Init(int options,
128 const string16& default_prompt) { 128 const string16& default_prompt) {
129 message_label_->SetMultiLine(true); 129 message_label_->SetMultiLine(true);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (checkbox_) { 217 if (checkbox_) {
218 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 218 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
219 layout->StartRow(0, checkbox_column_view_set_id); 219 layout->StartRow(0, checkbox_column_view_set_id);
220 layout->AddView(checkbox_); 220 layout->AddView(checkbox_);
221 } 221 }
222 222
223 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 223 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
224 } 224 }
225 225
226 } // namespace views 226 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698