refactor: remove WebContents::CreateFrom (#15241)

This commit is contained in:
Cheng Zhao 2018-10-19 17:52:07 +09:00 committed by GitHub
parent b3f134de06
commit 94aa0762f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 85 additions and 51 deletions

View file

@ -26,7 +26,7 @@ bool IsWebContents(v8::Isolate* isolate, content::RenderProcessHost* process) {
if (!web_contents)
return false;
auto api_web_contents = WebContents::CreateFrom(isolate, web_contents);
auto api_web_contents = WebContents::FromOrCreate(isolate, web_contents);
auto type = api_web_contents->GetType();
return type == WebContents::Type::BROWSER_WINDOW ||
type == WebContents::Type::WEB_VIEW;