]> khamidou — GitHub mirrors - electron.git/commitdiff
win: Implement dialog.showErrorBox
authorCheng Zhao <zcbenz@gmail.com>
Wed, 5 Nov 2014 08:05:11 +0000 (16:05 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 5 Nov 2014 08:05:11 +0000 (16:05 +0800)
atom/browser/ui/message_box_views.cc

index 9bfac98561146a66d140bd817d0b9edeb6922ebb..df99199445dded733b3970dec92d421f8de1e67c 100644 (file)
 #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