OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |