fix: when building with enable_plugins=false (#20507)

This commit is contained in:
Milan Burda
2019-10-10 14:11:17 +02:00
committed by Shelley Vohr
parent 1657908fa8
commit f6894da715
6 changed files with 91 additions and 5 deletions

View File

@@ -47,6 +47,7 @@
#include "native_mate/converter.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "ppapi/buildflags/buildflags.h"
#include "shell/browser/api/atom_api_browser_window.h"
#include "shell/browser/api/atom_api_debugger.h"
#include "shell/browser/api/atom_api_session.h"
@@ -874,10 +875,12 @@ void WebContents::RenderProcessGone(base::TerminationStatus status) {
void WebContents::PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) {
#if BUILDFLAG(ENABLE_PLUGINS)
content::WebPluginInfo info;
auto* plugin_service = content::PluginService::GetInstance();
plugin_service->GetPluginInfoByPath(plugin_path, &info);
Emit("plugin-crashed", info.name, info.version);
#endif // BUILDFLAG(ENABLE_PLUIGNS)
}
void WebContents::MediaStartedPlaying(const MediaPlayerInfo& video_type,