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

Side by Side Diff: chrome/browser/ui/views/simple_message_box_views.cc

Issue 10378086: views: Add a new ctor to MessageBoxView that takes only a InitParams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix review Created 8 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
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 "chrome/browser/simple_message_box.h" 5 #include "chrome/browser/simple_message_box.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // SimpleMessageBoxViews, private: 129 // SimpleMessageBoxViews, private:
130 130
131 SimpleMessageBoxViews::SimpleMessageBoxViews(gfx::NativeWindow parent_window, 131 SimpleMessageBoxViews::SimpleMessageBoxViews(gfx::NativeWindow parent_window,
132 const string16& title, 132 const string16& title,
133 const string16& message, 133 const string16& message,
134 DialogType dialog_type) 134 DialogType dialog_type)
135 : window_title_(title), 135 : window_title_(title),
136 dialog_type_(dialog_type), 136 dialog_type_(dialog_type),
137 disposition_(DISPOSITION_UNKNOWN), 137 disposition_(DISPOSITION_UNKNOWN),
138 message_box_view_(new views::MessageBoxView( 138 message_box_view_(new views::MessageBoxView(
139 views::MessageBoxView::NO_OPTIONS, message, string16())) { 139 views::MessageBoxView::InitParams(message))) {
140 views::Widget::CreateWindowWithParent(this, parent_window)->Show(); 140 views::Widget::CreateWindowWithParent(this, parent_window)->Show();
141 141
142 // Add reference to be released in DeleteDelegate(). 142 // Add reference to be released in DeleteDelegate().
143 AddRef(); 143 AddRef();
144 } 144 }
145 145
146 SimpleMessageBoxViews::~SimpleMessageBoxViews() { 146 SimpleMessageBoxViews::~SimpleMessageBoxViews() {
147 } 147 }
148 148
149 int SimpleMessageBoxViews::GetDialogButtons() const { 149 int SimpleMessageBoxViews::GetDialogButtons() const {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 SimpleMessageBoxViews::ShowWarningMessageBox(parent, title, message); 212 SimpleMessageBoxViews::ShowWarningMessageBox(parent, title, message);
213 } 213 }
214 214
215 bool ShowQuestionMessageBox(gfx::NativeWindow parent, 215 bool ShowQuestionMessageBox(gfx::NativeWindow parent,
216 const string16& title, 216 const string16& title,
217 const string16& message) { 217 const string16& message) {
218 return SimpleMessageBoxViews::ShowQuestionMessageBox(parent, title, message); 218 return SimpleMessageBoxViews::ShowQuestionMessageBox(parent, title, message);
219 } 219 }
220 220
221 } // namespace browser 221 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/js_modal_dialog_views.cc ('k') | chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698