| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 22 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 22 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef FrameLoaderClient_h | 31 #ifndef LocalFrameClient_h |
| 32 #define FrameLoaderClient_h | 32 #define LocalFrameClient_h |
| 33 | 33 |
| 34 #include <v8.h> | |
| 35 #include <memory> | 34 #include <memory> |
| 35 |
| 36 #include "core/CoreExport.h" | 36 #include "core/CoreExport.h" |
| 37 #include "core/dom/Document.h" | 37 #include "core/dom/Document.h" |
| 38 #include "core/dom/IconURL.h" | 38 #include "core/dom/IconURL.h" |
| 39 #include "core/frame/FrameClient.h" | 39 #include "core/frame/FrameClient.h" |
| 40 #include "core/frame/FrameTypes.h" | 40 #include "core/frame/FrameTypes.h" |
| 41 #include "core/html/LinkResource.h" | 41 #include "core/html/LinkResource.h" |
| 42 #include "core/loader/FrameLoadRequest.h" | 42 #include "core/loader/FrameLoadRequest.h" |
| 43 #include "core/loader/FrameLoaderTypes.h" | 43 #include "core/loader/FrameLoaderTypes.h" |
| 44 #include "core/loader/NavigationPolicy.h" | 44 #include "core/loader/NavigationPolicy.h" |
| 45 #include "platform/heap/Handle.h" | 45 #include "platform/heap/Handle.h" |
| 46 #include "platform/loader/fetch/ResourceLoaderOptions.h" | 46 #include "platform/loader/fetch/ResourceLoaderOptions.h" |
| 47 #include "platform/network/ContentSecurityPolicyParsers.h" | 47 #include "platform/network/ContentSecurityPolicyParsers.h" |
| 48 #include "platform/network/ResourceLoadPriority.h" | 48 #include "platform/network/ResourceLoadPriority.h" |
| 49 #include "platform/weborigin/Referrer.h" | 49 #include "platform/weborigin/Referrer.h" |
| 50 #include "public/platform/WebContentSecurityPolicyStruct.h" | 50 #include "public/platform/WebContentSecurityPolicyStruct.h" |
| 51 #include "public/platform/WebEffectiveConnectionType.h" | 51 #include "public/platform/WebEffectiveConnectionType.h" |
| 52 #include "public/platform/WebFeaturePolicy.h" | 52 #include "public/platform/WebFeaturePolicy.h" |
| 53 #include "public/platform/WebInsecureRequestPolicy.h" | 53 #include "public/platform/WebInsecureRequestPolicy.h" |
| 54 #include "public/platform/WebLoadingBehaviorFlag.h" | 54 #include "public/platform/WebLoadingBehaviorFlag.h" |
| 55 #include "v8/include/v8.h" |
| 55 #include "wtf/Forward.h" | 56 #include "wtf/Forward.h" |
| 56 #include "wtf/Vector.h" | 57 #include "wtf/Vector.h" |
| 57 | 58 |
| 58 namespace blink { | 59 namespace blink { |
| 59 | 60 |
| 60 class Document; | 61 class Document; |
| 61 class DocumentLoader; | 62 class DocumentLoader; |
| 62 struct FrameLoadRequest; | 63 struct FrameLoadRequest; |
| 63 class HTMLFormElement; | 64 class HTMLFormElement; |
| 64 class HTMLFrameElementBase; | 65 class HTMLFrameElementBase; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 78 class WebApplicationCacheHostClient; | 79 class WebApplicationCacheHostClient; |
| 79 class WebCookieJar; | 80 class WebCookieJar; |
| 80 class WebMediaPlayer; | 81 class WebMediaPlayer; |
| 81 class WebMediaPlayerClient; | 82 class WebMediaPlayerClient; |
| 82 class WebMediaPlayerSource; | 83 class WebMediaPlayerSource; |
| 83 class WebRemotePlaybackClient; | 84 class WebRemotePlaybackClient; |
| 84 class WebRTCPeerConnectionHandler; | 85 class WebRTCPeerConnectionHandler; |
| 85 class WebServiceWorkerProvider; | 86 class WebServiceWorkerProvider; |
| 86 class Widget; | 87 class Widget; |
| 87 | 88 |
| 88 class CORE_EXPORT FrameLoaderClient : public FrameClient { | 89 class CORE_EXPORT LocalFrameClient : public FrameClient { |
| 89 public: | 90 public: |
| 90 ~FrameLoaderClient() override {} | 91 ~LocalFrameClient() override {} |
| 91 | 92 |
| 92 virtual bool hasWebView() const = 0; // mainly for assertions | 93 virtual bool hasWebView() const = 0; // mainly for assertions |
| 93 | 94 |
| 94 virtual void dispatchWillSendRequest(ResourceRequest&) = 0; | 95 virtual void dispatchWillSendRequest(ResourceRequest&) = 0; |
| 95 virtual void dispatchDidReceiveResponse(const ResourceResponse&) = 0; | 96 virtual void dispatchDidReceiveResponse(const ResourceResponse&) = 0; |
| 96 virtual void dispatchDidLoadResourceFromMemoryCache( | 97 virtual void dispatchDidLoadResourceFromMemoryCache( |
| 97 const ResourceRequest&, | 98 const ResourceRequest&, |
| 98 const ResourceResponse&) = 0; | 99 const ResourceResponse&) = 0; |
| 99 | 100 |
| 100 virtual void dispatchDidHandleOnloadEvents() = 0; | 101 virtual void dispatchDidHandleOnloadEvents() = 0; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 const KURL&, | 212 const KURL&, |
| 212 const String& mimeType, | 213 const String& mimeType, |
| 213 bool shouldPreferPlugInsForImages) = 0; | 214 bool shouldPreferPlugInsForImages) = 0; |
| 214 | 215 |
| 215 virtual void didCreateNewDocument() = 0; | 216 virtual void didCreateNewDocument() = 0; |
| 216 virtual void dispatchDidClearWindowObjectInMainWorld() = 0; | 217 virtual void dispatchDidClearWindowObjectInMainWorld() = 0; |
| 217 virtual void documentElementAvailable() = 0; | 218 virtual void documentElementAvailable() = 0; |
| 218 virtual void runScriptsAtDocumentElementAvailable() = 0; | 219 virtual void runScriptsAtDocumentElementAvailable() = 0; |
| 219 virtual void runScriptsAtDocumentReady(bool documentIsEmpty) = 0; | 220 virtual void runScriptsAtDocumentReady(bool documentIsEmpty) = 0; |
| 220 | 221 |
| 221 virtual void didCreateScriptContext(v8::Local<v8::Context>, | 222 virtual void didCreateScriptContext(v8::Local<v8::Context>, int worldId) = 0; |
| 222 int worldId) = 0; | |
| 223 virtual void willReleaseScriptContext(v8::Local<v8::Context>, | 223 virtual void willReleaseScriptContext(v8::Local<v8::Context>, |
| 224 int worldId) = 0; | 224 int worldId) = 0; |
| 225 virtual bool allowScriptExtensions() = 0; | 225 virtual bool allowScriptExtensions() = 0; |
| 226 | 226 |
| 227 virtual void didChangeScrollOffset() {} | 227 virtual void didChangeScrollOffset() {} |
| 228 virtual void didUpdateCurrentHistoryItem() {} | 228 virtual void didUpdateCurrentHistoryItem() {} |
| 229 | 229 |
| 230 virtual bool allowScript(bool enabledPerSettings) { | 230 virtual bool allowScript(bool enabledPerSettings) { |
| 231 return enabledPerSettings; | 231 return enabledPerSettings; |
| 232 } | 232 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 return 0; | 307 return 0; |
| 308 } | 308 } |
| 309 | 309 |
| 310 virtual std::unique_ptr<WebApplicationCacheHost> createApplicationCacheHost( | 310 virtual std::unique_ptr<WebApplicationCacheHost> createApplicationCacheHost( |
| 311 WebApplicationCacheHostClient*) = 0; | 311 WebApplicationCacheHostClient*) = 0; |
| 312 | 312 |
| 313 virtual void dispatchDidChangeManifest() {} | 313 virtual void dispatchDidChangeManifest() {} |
| 314 | 314 |
| 315 virtual unsigned backForwardLength() { return 0; } | 315 virtual unsigned backForwardLength() { return 0; } |
| 316 | 316 |
| 317 virtual bool isFrameLoaderClientImpl() const { return false; } | 317 virtual bool isLocalFrameClientImpl() const { return false; } |
| 318 | 318 |
| 319 // Called when elements preventing the sudden termination of the frame become | 319 // Called when elements preventing the sudden termination of the frame become |
| 320 // present or stop being present. |type| is the type of element (BeforeUnload | 320 // present or stop being present. |type| is the type of element (BeforeUnload |
| 321 // handler, Unload handler). | 321 // handler, Unload handler). |
| 322 enum SuddenTerminationDisablerType { | 322 enum SuddenTerminationDisablerType { |
| 323 BeforeUnloadHandler, | 323 BeforeUnloadHandler, |
| 324 UnloadHandler, | 324 UnloadHandler, |
| 325 }; | 325 }; |
| 326 virtual void suddenTerminationDisablerChanged(bool present, | 326 virtual void suddenTerminationDisablerChanged(bool present, |
| 327 SuddenTerminationDisablerType) { | 327 SuddenTerminationDisablerType) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 340 // returned if the URL is not overriden. | 340 // returned if the URL is not overriden. |
| 341 virtual KURL overrideFlashEmbedWithHTML(const KURL&) { return KURL(); } | 341 virtual KURL overrideFlashEmbedWithHTML(const KURL&) { return KURL(); } |
| 342 | 342 |
| 343 virtual BlameContext* frameBlameContext() { return nullptr; } | 343 virtual BlameContext* frameBlameContext() { return nullptr; } |
| 344 | 344 |
| 345 virtual void setHasReceivedUserGesture() {} | 345 virtual void setHasReceivedUserGesture() {} |
| 346 }; | 346 }; |
| 347 | 347 |
| 348 } // namespace blink | 348 } // namespace blink |
| 349 | 349 |
| 350 #endif // FrameLoaderClient_h | 350 #endif // LocalFrameClient_h |
| OLD | NEW |