OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/simple_message_box.h" |
| 6 |
| 7 #include "ui/base/message_box_win.h" |
| 8 |
| 9 namespace browser { |
| 10 |
| 11 void ShowErrorBox(gfx::NativeWindow parent, |
| 12 const string16& title, |
| 13 const string16& message) { |
| 14 UINT flags = MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST; |
| 15 ui::MessageBox(parent, message, title, flags); |
| 16 } |
| 17 |
| 18 bool ShowYesNoBox(gfx::NativeWindow parent, |
| 19 const string16& title, |
| 20 const string16& message) { |
| 21 UINT flags = MB_YESNO | MB_ICONWARNING | MB_SETFOREGROUND; |
| 22 int result = ui::MessageBox(parent, message, title, flags); |
| 23 return result == IDYES; |
| 24 } |
| 25 |
| 26 } // namespace browser |
OLD | NEW |