It's going to be removed from Chromium, see https://crbug.com/812523.

/cc @electron/code-owners 
shell/browser/electron_javascript_dialog_manager.cc
settings.message = base::UTF16ToUTF8(message_text);
  electron::ShowMessageBox(
      settings,
      base::BindOnce(&ElectronJavaScriptDialogManager::OnMessageBoxCallback,
                     base::Unretained(this), base::Passed(std::move(callback)),
                     origin));
}
void ElectronJavaScriptDialogManager::RunBeforeUnloadDialog(
    content::WebContents* web_contents,
    content::RenderFrameHost* rfh,
    bool is_reload,
    DialogClosedCallback callback) {
  bool default_prevented = api_web_contents_->Emit("will-prevent-unload");
  std::move(callback).Run(default_prevented, base::string16());
  return;
}
void ElectronJavaScriptDialogManager::CancelDialogs(
    content::WebContents* web_contents,
    bool reset_state) {}
void ElectronJavaScriptDialogManager::OnMessageBoxCallback(
    DialogClosedCallback callback,
    const std::string& origin,
    int code,
    bool checkbox_checked) {
  if (checkbox_checked)
    origin_counts_[origin] = kUserWantsNoMoreDialogs;
  std::move(callback).Run(code == 0, base::string16());
}
}