has_frame_(true),
enable_larger_than_screen_(false),
is_closed_(false),
- node_integration_("except-iframe"),
+ node_integration_(true),
has_dialog_attached_(false),
zoom_factor_(1.0),
weak_factory_(this),
options.Get(switches::kFrame, &has_frame_);
options.Get(switches::kEnableLargerThanScreen, &enable_larger_than_screen_);
+ options.Get(switches::kNodeIntegration, &node_integration_);
// Read icon before window is created.
options.Get(switches::kIcon, &icon_);
- // Read iframe security before any navigation.
- options.Get(switches::kNodeIntegration, &node_integration_);
+ // Be compatible with old API of "node-integration" option.
+ std::string old_string_token;
+ if (options.Get(switches::kNodeIntegration, &old_string_token) &&
+ old_string_token != "disable")
+ node_integration_ = true;
// Read the web preferences.
options.Get(switches::kWebPreferences, &web_preferences_);
base::CommandLine* command_line, int child_process_id) {
// Append --node-integration to renderer process.
command_line->AppendSwitchASCII(switches::kNodeIntegration,
- node_integration_);
+ node_integration_ ? "true" : "false");
// Append --zoom-factor.
if (zoom_factor_ != 1.0)
// The windows has been closed.
bool is_closed_;
- // The security token of iframe.
- std::string node_integration_;
+ // Whether node integration is enabled.
+ bool node_integration_;
// There is a dialog that has been attached to window.
bool has_dialog_attached_;
* `show` Boolean - Whether window should be shown when created
* `frame` Boolean - Specify `false` to create a
[Frameless Window](frameless-window.md)
- * `node-integration` String - Default value is `except-iframe`, can also be
- `all`, `manual-enable-iframe` or `disable`.
+ * `node-integration` Boolean - Whether node integration is enabled, default
+ is `true`
* `accept-first-mouse` Boolean - Whether the web view accepts a single
mouse-down event that simultaneously activates the window
* `auto-hide-menu-bar` Boolean - Auto hide the menu bar unless the `Alt`