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

/cc @electron/code-owners 
shell/browser/electron_javascript_dialog_manager.cc
#include "shell/browser/electron_javascript_dialog_manager.h"
#include <string>
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "shell/browser/api/electron_api_web_contents.h"
#include "shell/browser/native_window.h"
#include "shell/browser/ui/message_box.h"
#include "shell/browser/web_contents_preferences.h"
#include "shell/common/options_switches.h"
#include "ui/gfx/image/image_skia.h"
using content::JavaScriptDialogType;
namespace electron {
namespace {
constexpr int kUserWantsNoMoreDialogs = -1;
}  
ElectronJavaScriptDialogManager::ElectronJavaScriptDialogManager(
    api::WebContents* api_web_contents)
    : api_web_contents_(api_web_contents) {}
ElectronJavaScriptDialogManager::~ElectronJavaScriptDialogManager() = default;