| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 | 865 |
| 866 void WebLocalFrameImpl::collectGarbage() | 866 void WebLocalFrameImpl::collectGarbage() |
| 867 { | 867 { |
| 868 if (!frame()) | 868 if (!frame()) |
| 869 return; | 869 return; |
| 870 if (!frame()->settings()->scriptEnabled()) | 870 if (!frame()->settings()->scriptEnabled()) |
| 871 return; | 871 return; |
| 872 V8GCController::collectGarbage(v8::Isolate::GetCurrent()); | 872 V8GCController::collectGarbage(v8::Isolate::GetCurrent()); |
| 873 } | 873 } |
| 874 | 874 |
| 875 bool WebLocalFrameImpl::checkIfRunInsecureContent(const WebURL& url) const | |
| 876 { | |
| 877 ASSERT(frame()); | |
| 878 | |
| 879 // This is only called (eventually, through proxies and delegates and IPC) f
rom | |
| 880 // PluginURLFetcher::OnReceivedRedirect for redirects of NPAPI resources. | |
| 881 // | |
| 882 // FIXME: Remove this method entirely once we smother NPAPI. | |
| 883 return !MixedContentChecker::shouldBlockFetch(frame(), WebURLRequest::Reques
tContextObject, WebURLRequest::FrameTypeNested, url); | |
| 884 } | |
| 885 | |
| 886 v8::Local<v8::Value> WebLocalFrameImpl::executeScriptAndReturnValue(const WebScr
iptSource& source) | 875 v8::Local<v8::Value> WebLocalFrameImpl::executeScriptAndReturnValue(const WebScr
iptSource& source) |
| 887 { | 876 { |
| 888 ASSERT(frame()); | 877 ASSERT(frame()); |
| 889 | 878 |
| 890 TextPosition position(OrdinalNumber::fromOneBasedInt(source.startLine), Ordi
nalNumber::first()); | 879 TextPosition position(OrdinalNumber::fromOneBasedInt(source.startLine), Ordi
nalNumber::first()); |
| 891 return frame()->script().executeScriptInMainWorldAndReturnValue(ScriptSource
Code(source.code, source.url, position)); | 880 return frame()->script().executeScriptInMainWorldAndReturnValue(ScriptSource
Code(source.code, source.url, position)); |
| 892 } | 881 } |
| 893 | 882 |
| 894 void WebLocalFrameImpl::requestExecuteScriptAndReturnValue(const WebScriptSource
& source, bool userGesture, WebScriptExecutionCallback* callback) | 883 void WebLocalFrameImpl::requestExecuteScriptAndReturnValue(const WebScriptSource
& source, bool userGesture, WebScriptExecutionCallback* callback) |
| 895 { | 884 { |
| (...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 return WebSandboxFlags::None; | 2255 return WebSandboxFlags::None; |
| 2267 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2256 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
| 2268 } | 2257 } |
| 2269 | 2258 |
| 2270 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2259 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
| 2271 { | 2260 { |
| 2272 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2261 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
| 2273 } | 2262 } |
| 2274 | 2263 |
| 2275 } // namespace blink | 2264 } // namespace blink |
| OLD | NEW |