Merge remote-tracking branch 'origin/master' into roller/chromium-ad1b791122c04bd91b825fbfbdf1ff4da82a0edb-1558011686736

This commit is contained in:
Jeremy Apthorp 2019-05-21 10:07:17 -07:00
commit ca283c74c9
64 changed files with 2026 additions and 3216 deletions

View file

@ -773,6 +773,10 @@ void App::SelectClientCertificate(
}
}
void App::OnGpuInfoUpdate() {
Emit("gpu-info-update");
}
void App::OnGpuProcessCrashed(base::TerminationStatus status) {
Emit("gpu-process-crashed",
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);

View file

@ -157,6 +157,7 @@ class App : public AtomBrowserClient::Delegate,
bool* no_javascript_access) override;
// content::GpuDataManagerObserver:
void OnGpuInfoUpdate() override;
void OnGpuProcessCrashed(base::TerminationStatus status) override;
// content::BrowserChildProcessObserver:

View file

@ -68,7 +68,7 @@ void BrowserView::Init(v8::Isolate* isolate,
const mate::Dictionary& options) {
mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate);
options.Get(options::kWebPreferences, &web_preferences);
web_preferences.Set("isBrowserView", true);
web_preferences.Set("type", "browserView");
mate::Handle<class WebContents> web_contents =
WebContents::Create(isolate, web_preferences);

View file

@ -297,20 +297,12 @@ WebContents::WebContents(v8::Isolate* isolate,
// Read options.
options.Get("backgroundThrottling", &background_throttling_);
// FIXME(zcbenz): We should read "type" parameter for better design, but
// on Windows we have encountered a compiler bug that if we read "type"
// from |options| and then set |type_|, a memory corruption will happen
// and Electron will soon crash.
// Remvoe this after we upgraded to use VS 2015 Update 3.
// Get type
options.Get("type", &type_);
bool b = false;
if (options.Get("isGuest", &b) && b)
type_ = Type::WEB_VIEW;
else if (options.Get("isBackgroundPage", &b) && b)
type_ = Type::BACKGROUND_PAGE;
else if (options.Get("isBrowserView", &b) && b)
type_ = Type::BROWSER_VIEW;
#if BUILDFLAG(ENABLE_OSR)
else if (options.Get(options::kOffscreen, &b) && b)
if (options.Get(options::kOffscreen, &b) && b)
type_ = Type::OFF_SCREEN;
#endif
@ -2266,7 +2258,6 @@ void WebContents::BuildPrototype(v8::Isolate* isolate,
.SetMethod("beginFrameSubscription", &WebContents::BeginFrameSubscription)
.SetMethod("endFrameSubscription", &WebContents::EndFrameSubscription)
.SetMethod("startDrag", &WebContents::StartDrag)
.SetMethod("isGuest", &WebContents::IsGuest)
.SetMethod("attachToIframe", &WebContents::AttachToIframe)
.SetMethod("detachFromOuterFrame", &WebContents::DetachFromOuterFrame)
.SetMethod("isOffscreen", &WebContents::IsOffScreen)