Enable intercepting devtools window.

This commit is contained in:
Cheng Zhao 2014-04-03 20:20:42 +08:00
Родитель 663ab8e0bf
Коммит ac794c8085
1 изменённых файлов: 0 добавлений и 7 удалений

Просмотреть файл

@ -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;