Rename iframe-security to node-integration.
This commit is contained in:
parent
d4929de33c
commit
ec00da416f
8 changed files with 44 additions and 23 deletions
|
@ -63,15 +63,15 @@ bool AtomBrowserClient::ShouldSwapProcessesForNavigation(
|
|||
void AtomBrowserClient::AppendExtraCommandLineSwitches(
|
||||
CommandLine* command_line,
|
||||
int child_process_id) {
|
||||
// Append --iframe-security to renderer process.
|
||||
// Append --node-integration to renderer process.
|
||||
WindowList* list = WindowList::GetInstance();
|
||||
for (WindowList::const_iterator iter = list->begin(); iter != list->end();
|
||||
++iter) {
|
||||
NativeWindow* window = *iter;
|
||||
int id = window->GetWebContents()->GetRenderProcessHost()->GetID();
|
||||
if (id == child_process_id) {
|
||||
command_line->AppendSwitchASCII(switches::kIframeSecurity,
|
||||
window->iframe_security());
|
||||
command_line->AppendSwitchASCII(switches::kNodeIntegration,
|
||||
window->node_integration());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ NativeWindow::NativeWindow(content::WebContents* web_contents,
|
|||
: content::WebContentsObserver(web_contents),
|
||||
has_frame_(true),
|
||||
is_closed_(false),
|
||||
iframe_security_("full"),
|
||||
node_integration_("all"),
|
||||
weak_factory_(this),
|
||||
inspectable_web_contents_(
|
||||
brightray::InspectableWebContents::Create(web_contents)) {
|
||||
|
@ -60,7 +60,7 @@ NativeWindow::NativeWindow(content::WebContents* web_contents,
|
|||
LOG(ERROR) << "Failed to set icon to " << icon;
|
||||
|
||||
// Read iframe security before any navigation.
|
||||
options->GetString(switches::kIframeSecurity, &iframe_security_);
|
||||
options->GetString(switches::kNodeIntegration, &node_integration_);
|
||||
|
||||
web_contents->SetDelegate(this);
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
|||
}
|
||||
|
||||
bool has_frame() const { return has_frame_; }
|
||||
std::string iframe_security() const { return iframe_security_; }
|
||||
std::string node_integration() const { return node_integration_; }
|
||||
|
||||
protected:
|
||||
explicit NativeWindow(content::WebContents* web_contents,
|
||||
|
@ -221,7 +221,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
|||
bool is_closed_;
|
||||
|
||||
// The security token of iframe.
|
||||
std::string iframe_security_;
|
||||
std::string node_integration_;
|
||||
|
||||
// Closure that would be called when window is unresponsive when closing,
|
||||
// it should be cancelled when we can prove that the window is responsive.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue