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

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

Issue 115309: Remove even more ATL dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « views/controls/menu/view_menu_delegate.h ('k') | views/controls/native_control.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "views/controls/message_box_view.h" 5 #include "views/controls/message_box_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/message_box_flags.h" 8 #include "app/message_box_flags.h"
9 #include "base/clipboard.h" 9 #include "base/clipboard.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 12 matching lines...) Expand all
23 23
24 MessageBoxView::MessageBoxView(int dialog_flags, 24 MessageBoxView::MessageBoxView(int dialog_flags,
25 const std::wstring& message, 25 const std::wstring& message,
26 const std::wstring& default_prompt, 26 const std::wstring& default_prompt,
27 int message_width) 27 int message_width)
28 : message_label_(new views::Label(message)), 28 : message_label_(new views::Label(message)),
29 prompt_field_(NULL), 29 prompt_field_(NULL),
30 icon_(NULL), 30 icon_(NULL),
31 checkbox_(NULL), 31 checkbox_(NULL),
32 message_width_(message_width), 32 message_width_(message_width),
33 focus_grabber_factory_(this) { 33 ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)) {
34 Init(dialog_flags, default_prompt); 34 Init(dialog_flags, default_prompt);
35 } 35 }
36 36
37 MessageBoxView::MessageBoxView(int dialog_flags, 37 MessageBoxView::MessageBoxView(int dialog_flags,
38 const std::wstring& message, 38 const std::wstring& message,
39 const std::wstring& default_prompt) 39 const std::wstring& default_prompt)
40 : message_label_(new views::Label(message)), 40 : message_label_(new views::Label(message)),
41 prompt_field_(NULL), 41 prompt_field_(NULL),
42 icon_(NULL), 42 icon_(NULL),
43 checkbox_(NULL), 43 checkbox_(NULL),
44 message_width_(kDefaultMessageWidth), 44 message_width_(kDefaultMessageWidth),
45 focus_grabber_factory_(this) { 45 ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)) {
46 Init(dialog_flags, default_prompt); 46 Init(dialog_flags, default_prompt);
47 } 47 }
48 48
49 std::wstring MessageBoxView::GetInputText() { 49 std::wstring MessageBoxView::GetInputText() {
50 if (prompt_field_) 50 if (prompt_field_)
51 return prompt_field_->GetText(); 51 return prompt_field_->GetText();
52 return EmptyWString(); 52 return EmptyWString();
53 } 53 }
54 54
55 bool MessageBoxView::IsCheckBoxSelected() { 55 bool MessageBoxView::IsCheckBoxSelected() {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 204
205 if (checkbox_) { 205 if (checkbox_) {
206 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 206 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
207 layout->StartRow(0, checkbox_column_view_set_id); 207 layout->StartRow(0, checkbox_column_view_set_id);
208 layout->AddView(checkbox_); 208 layout->AddView(checkbox_);
209 } 209 }
210 210
211 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 211 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
212 } 212 }
OLDNEW
« no previous file with comments | « views/controls/menu/view_menu_delegate.h ('k') | views/controls/native_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698