command_line->AppendSwitchASCII(
switches::kNodeIntegration,
info.node_integration ? "true" : "false");
+ if (info.plugins)
+ command_line->AppendSwitch(switches::kEnablePlugins);
}
}
guestInstanceId: id
storagePartitionId: params.storagePartitionId
guestInstances[id] = {guest, embedder}
- webViewManager.addGuest id, embedder, guest, params.nodeIntegration
+ webViewManager.addGuest id, embedder, guest, params.nodeIntegration, params.plugins
# Destroy guest when the embedder is gone.
embedder.once 'render-view-deleted', ->
void WebViewManager::AddGuest(int guest_instance_id,
content::WebContents* embedder,
content::WebContents* web_contents,
- bool node_integration) {
+ bool node_integration,
+ bool plugins) {
web_contents_map_[guest_instance_id] = { web_contents, embedder };
WebViewRendererState::WebViewInfo web_view_info = {
- guest_instance_id, node_integration
+ guest_instance_id, node_integration, plugins
};
content::BrowserThread::PostTask(
content::BrowserThread::IO,
void AddGuest(int guest_instance_id,
content::WebContents* embedder,
content::WebContents* web_contents,
- bool node_integration);
+ bool node_integration,
+ bool plugins);
void RemoveGuest(int guest_instance_id);
protected:
struct WebViewInfo {
int guest_instance_id;
bool node_integration;
+ bool plugins;
};
static WebViewRendererState* GetInstance();
WEB_VIEW_ATTRIBUTE_MINWIDTH = 'minwidth'
WEB_VIEW_ATTRIBUTE_PARTITION = 'partition'
WEB_VIEW_ATTRIBUTE_NODEINTEGRATION = 'nodeintegration'
+WEB_VIEW_ATTRIBUTE_PLUGINS = 'plugins'
AUTO_SIZE_ATTRIBUTES = [
WEB_VIEW_ATTRIBUTE_AUTOSIZE,
WEB_VIEW_ATTRIBUTE_MAXHEIGHT,
params =
storagePartitionId: storagePartitionId
nodeIntegration: @webviewNode.hasAttribute WEB_VIEW_ATTRIBUTE_NODEINTEGRATION
+ plugins: @webviewNode.hasAttribute WEB_VIEW_ATTRIBUTE_PLUGINS
guestViewInternal.createGuest 'webview', params, (guestInstanceId) =>
@pendingGuestCreation = false
unless @elementAttached