Only add extensions to non-remote webContents
This commit is contained in:
parent
c8c60dd313
commit
11e68ff932
3 changed files with 15 additions and 1 deletions
|
@ -744,6 +744,14 @@ int WebContents::GetID() const {
|
|||
return web_contents()->GetRenderProcessHost()->GetID();
|
||||
}
|
||||
|
||||
std::string WebContents::GetType() const {
|
||||
switch (type_) {
|
||||
case BROWSER_WINDOW: return "window";
|
||||
case WEB_VIEW: return "webview";
|
||||
case REMOTE: return "remote";
|
||||
}
|
||||
}
|
||||
|
||||
bool WebContents::Equal(const WebContents* web_contents) const {
|
||||
return GetID() == web_contents->GetID();
|
||||
}
|
||||
|
@ -1287,6 +1295,7 @@ void WebContents::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("endFrameSubscription", &WebContents::EndFrameSubscription)
|
||||
.SetMethod("setSize", &WebContents::SetSize)
|
||||
.SetMethod("isGuest", &WebContents::IsGuest)
|
||||
.SetMethod("getType", &WebContents::GetType)
|
||||
.SetMethod("getWebPreferences", &WebContents::GetWebPreferences)
|
||||
.SetMethod("getOwnerBrowserWindow", &WebContents::GetOwnerBrowserWindow)
|
||||
.SetMethod("hasServiceWorker", &WebContents::HasServiceWorker)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue