mac: Implement dialog.showErrorBox

This commit is contained in:
Cheng Zhao 2014-11-05 17:27:04 +08:00
parent f6ba308ff8
commit c499dfbb22

View file

@ -141,4 +141,13 @@ void ShowMessageBox(NativeWindow* parent_window,
contextInfo:nil];
}
void ShowErrorBox(const base::string16& title, const base::string16& content) {
NSAlert* alert = [[NSAlert alloc] init];
[alert setMessageText:base::SysUTF16ToNSString(title)];
[alert setInformativeText:base::SysUTF16ToNSString(content)];
[alert setAlertStyle:NSWarningAlertStyle];
[alert runModal];
[alert release];
}
} // namespace atom