| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 "ui/base/message_box_win.h" | 7 #include "ui/base/win/message_box_win.h" |
| 8 | 8 |
| 9 namespace browser { | 9 namespace browser { |
| 10 | 10 |
| 11 void ShowErrorBox(gfx::NativeWindow parent, | 11 void ShowErrorBox(gfx::NativeWindow parent, |
| 12 const string16& title, | 12 const string16& title, |
| 13 const string16& message) { | 13 const string16& message) { |
| 14 UINT flags = MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST; | 14 UINT flags = MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST; |
| 15 ui::MessageBox(parent, message, title, flags); | 15 ui::MessageBox(parent, message, title, flags); |
| 16 } | 16 } |
| 17 | 17 |
| 18 bool ShowYesNoBox(gfx::NativeWindow parent, | 18 bool ShowYesNoBox(gfx::NativeWindow parent, |
| 19 const string16& title, | 19 const string16& title, |
| 20 const string16& message) { | 20 const string16& message) { |
| 21 UINT flags = MB_YESNO | MB_ICONWARNING | MB_SETFOREGROUND; | 21 UINT flags = MB_YESNO | MB_ICONWARNING | MB_SETFOREGROUND; |
| 22 int result = ui::MessageBox(parent, message, title, flags); | 22 int result = ui::MessageBox(parent, message, title, flags); |
| 23 return result == IDYES; | 23 return result == IDYES; |
| 24 } | 24 } |
| 25 | 25 |
| 26 } // namespace browser | 26 } // namespace browser |
| OLD | NEW |