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 "chrome/browser/ui/simple_message_box.h" | 5 #include "chrome/browser/ui/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/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 #endif | 228 #endif |
229 | 229 |
230 SimpleMessageBoxViews* dialog = | 230 SimpleMessageBoxViews* dialog = |
231 new SimpleMessageBoxViews(title, | 231 new SimpleMessageBoxViews(title, |
232 message, | 232 message, |
233 type, | 233 type, |
234 yes_text, | 234 yes_text, |
235 no_text, | 235 no_text, |
236 parent == NULL // is_system_modal | 236 parent == NULL // is_system_modal |
237 ); | 237 ); |
238 CreateBrowserModalDialogViews(dialog, parent)->Show(); | 238 CreateAppModalDialogViews(dialog, parent)->Show(); |
239 | 239 |
240 // NOTE: |dialog| may have been deleted by the time |RunDialogAndGetResult()| | 240 // NOTE: |dialog| may have been deleted by the time |RunDialogAndGetResult()| |
241 // returns. | 241 // returns. |
242 return dialog->RunDialogAndGetResult(); | 242 return dialog->RunDialogAndGetResult(); |
243 } | 243 } |
244 | 244 |
245 } // namespace | 245 } // namespace |
246 | 246 |
247 MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, | 247 MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, |
248 const base::string16& title, | 248 const base::string16& title, |
249 const base::string16& message, | 249 const base::string16& message, |
250 MessageBoxType type) { | 250 MessageBoxType type) { |
251 return ShowMessageBoxImpl( | 251 return ShowMessageBoxImpl( |
252 parent, title, message, type, base::string16(), base::string16()); | 252 parent, title, message, type, base::string16(), base::string16()); |
253 } | 253 } |
254 | 254 |
255 MessageBoxResult ShowMessageBoxWithButtonText(gfx::NativeWindow parent, | 255 MessageBoxResult ShowMessageBoxWithButtonText(gfx::NativeWindow parent, |
256 const base::string16& title, | 256 const base::string16& title, |
257 const base::string16& message, | 257 const base::string16& message, |
258 const base::string16& yes_text, | 258 const base::string16& yes_text, |
259 const base::string16& no_text) { | 259 const base::string16& no_text) { |
260 return ShowMessageBoxImpl( | 260 return ShowMessageBoxImpl( |
261 parent, title, message, MESSAGE_BOX_TYPE_QUESTION, yes_text, no_text); | 261 parent, title, message, MESSAGE_BOX_TYPE_QUESTION, yes_text, no_text); |
262 } | 262 } |
263 | 263 |
264 } // namespace chrome | 264 } // namespace chrome |
OLD | NEW |