OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 // are received from the renderer to prevent abuse. | 2200 // are received from the renderer to prevent abuse. |
2201 if (request_params.page_state.IsValid()) { | 2201 if (request_params.page_state.IsValid()) { |
2202 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); | 2202 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); |
2203 } | 2203 } |
2204 } | 2204 } |
2205 | 2205 |
2206 bool RenderFrameHostImpl::CanExecuteJavaScript() { | 2206 bool RenderFrameHostImpl::CanExecuteJavaScript() { |
2207 return g_allow_injecting_javascript || | 2207 return g_allow_injecting_javascript || |
2208 !frame_tree_node_->current_url().is_valid() || | 2208 !frame_tree_node_->current_url().is_valid() || |
2209 frame_tree_node_->current_url().SchemeIs(kChromeDevToolsScheme) || | 2209 frame_tree_node_->current_url().SchemeIs(kChromeDevToolsScheme) || |
| 2210 frame_tree_node_->current_url().SchemeIs(kChromeDistillerScheme) || |
2210 ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 2211 ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
2211 GetProcess()->GetID()) || | 2212 GetProcess()->GetID()) || |
2212 // It's possible to load about:blank in a Web UI renderer. | 2213 // It's possible to load about:blank in a Web UI renderer. |
2213 // See http://crbug.com/42547 | 2214 // See http://crbug.com/42547 |
2214 (frame_tree_node_->current_url().spec() == url::kAboutBlankURL) || | 2215 (frame_tree_node_->current_url().spec() == url::kAboutBlankURL) || |
2215 // InterstitialPageImpl should be the only case matching this. | 2216 // InterstitialPageImpl should be the only case matching this. |
2216 (delegate_->GetAsWebContents() == nullptr); | 2217 (delegate_->GetAsWebContents() == nullptr); |
2217 } | 2218 } |
2218 | 2219 |
2219 } // namespace content | 2220 } // namespace content |
OLD | NEW |