зеркало из https://github.com/electron/electron.git
Enable intercepting devtools window.
This commit is contained in:
Родитель
663ab8e0bf
Коммит
ac794c8085
|
@ -28,9 +28,6 @@ const char* kSecurityManualEnableIframe = "manual-enable-iframe";
|
||||||
const char* kSecurityDisable = "disable";
|
const char* kSecurityDisable = "disable";
|
||||||
const char* kSecurityEnableNodeIntegration = "enable-node-integration";
|
const char* kSecurityEnableNodeIntegration = "enable-node-integration";
|
||||||
|
|
||||||
// Scheme used by devtools
|
|
||||||
const char* kChromeDevToolsScheme = "chrome-devtools";
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
AtomRendererClient::AtomRendererClient()
|
AtomRendererClient::AtomRendererClient()
|
||||||
|
@ -159,10 +156,6 @@ bool AtomRendererClient::ShouldFork(WebKit::WebFrame* frame,
|
||||||
bool AtomRendererClient::IsNodeBindingEnabled(WebKit::WebFrame* frame) {
|
bool AtomRendererClient::IsNodeBindingEnabled(WebKit::WebFrame* frame) {
|
||||||
if (node_integration_ == DISABLE)
|
if (node_integration_ == DISABLE)
|
||||||
return false;
|
return false;
|
||||||
// Do not pollute devtools.
|
|
||||||
else if (frame != NULL &&
|
|
||||||
GURL(frame->document().url()).SchemeIs(kChromeDevToolsScheme))
|
|
||||||
return false;
|
|
||||||
// Node integration is enabled in main frame unless explictly disabled.
|
// Node integration is enabled in main frame unless explictly disabled.
|
||||||
else if (frame == main_frame_)
|
else if (frame == main_frame_)
|
||||||
return true;
|
return true;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче