From: Cheng Zhao Date: Wed, 5 Nov 2014 08:05:11 +0000 (+0800) Subject: win: Implement dialog.showErrorBox X-Git-Tag: v0.19.2~33^2~6 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=10e195a44426960c8eaba07777726def4b3540d6;p=electron.git win: Implement dialog.showErrorBox --- diff --git a/atom/browser/ui/message_box_views.cc b/atom/browser/ui/message_box_views.cc index 9bfac985..df991994 100644 --- a/atom/browser/ui/message_box_views.cc +++ b/atom/browser/ui/message_box_views.cc @@ -26,6 +26,10 @@ #include "ui/views/window/native_frame_view.h" #endif +#if defined(OS_WIN) +#include "ui/base/win/message_box_win.h" +#endif + namespace atom { namespace { @@ -350,4 +354,10 @@ void ShowMessageBox(NativeWindow* parent_window, dialog->Show(); } +void ShowErrorBox(const base::string16& title, const base::string16& content) { +#if defined(OS_WIN) + ui::MessageBox(NULL, content, title, MB_OK | MB_ICONERROR | MB_TASKMODAL); +#endif +} + } // namespace atom