153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)/* 253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * Copyright (C) 2012 Google Inc. All rights reserved. 453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * 553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * Redistribution and use in source and binary forms, with or without 653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * modification, are permitted provided that the following conditions 753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * are met: 853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * 953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * 1. Redistributions of source code must retain the above copyright 1002772c6a72f1ee0b226341a4f4439970c29fc861Ben Murdoch * notice, this list of conditions and the following disclaimer. 1153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * 2. Redistributions in binary form must reproduce the above copyright 1253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * notice, this list of conditions and the following disclaimer in the 1302772c6a72f1ee0b226341a4f4439970c29fc861Ben Murdoch * documentation and/or other materials provided with the distribution. 1453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 1553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * its contributors may be used to endorse or promote products derived 1602772c6a72f1ee0b226341a4f4439970c29fc861Ben Murdoch * from this software without specific prior written permission. 1753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * 1853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 1953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 2053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 2153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 2253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 2353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 2453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 2553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) */ 2953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 3053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#ifndef FrameLoaderClient_h 3153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#define FrameLoaderClient_h 3253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 3353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#include "core/dom/IconURL.h" 34d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)#include "core/frame/FrameClient.h" 3553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#include "core/loader/FrameLoaderTypes.h" 36e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch#include "core/loader/NavigationPolicy.h" 377242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci#include "platform/heap/Handle.h" 38bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)#include "platform/network/ResourceLoadPriority.h" 3909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#include "platform/weborigin/Referrer.h" 40e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch#include "wtf/Forward.h" 41e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch#include "wtf/Vector.h" 42f6b7aed3f7ce69aca0d7a032d144cbd088b04393Torne (Richard Coles)#include <v8.h> 4353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 4451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)namespace blink { 455267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)class WebCookieJar; 4609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)class WebRTCPeerConnectionHandler; 471e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles)class WebServiceWorkerProvider; 48f6b7aed3f7ce69aca0d7a032d144cbd088b04393Torne (Richard Coles)class WebSocketHandle; 49d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)class WebApplicationCacheHost; 50d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)class WebApplicationCacheHostClient; 515267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles)} 525267f701546148b83dfbe1d151cb184385bb5c22Torne (Richard Coles) 53c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)namespace blink { 5453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 5553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class DocumentLoader; 56d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) class FetchRequest; 5753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class HTMLAppletElement; 5853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class HTMLFormElement; 5953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class HTMLFrameOwnerElement; 6053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class HTMLPlugInElement; 61d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) class HistoryItem; 6253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class KURL; 63d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) class LocalFrame; 6453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class MessageEvent; 6553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class ResourceError; 6653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class ResourceRequest; 6753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class ResourceResponse; 6853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class SecurityOrigin; 6909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) class SharedWorkerRepositoryClient; 7053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class SocketStreamHandle; 7153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class SubstituteData; 7253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) class Widget; 7353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 74d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) class FrameLoaderClient : public FrameClient { 7553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) public: 7653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual ~FrameLoaderClient() { } 7753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 7853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual bool hasWebView() const = 0; // mainly for assertions 7953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 8053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void detachedFromParent() = 0; 8153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 8253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse) = 0; 8353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchDidReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&) = 0; 8453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier) = 0; 858abfc5808a4e34d6e03867af8bc440dee641886fTorne (Richard Coles) virtual void dispatchDidLoadResourceFromMemoryCache(const ResourceRequest&, const ResourceResponse&) = 0; 8653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 8753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchDidHandleOnloadEvents() = 0; 8853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0; 8909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) virtual void dispatchDidNavigateWithinPage(HistoryItem*, HistoryCommitType) { } 9053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchWillClose() = 0; 91197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch virtual void dispatchDidStartProvisionalLoad(bool isTransitionNavigation) = 0; 92c0e19a689c8ac22cdc96b291a8d33a5d3b0b34a4Torne (Richard Coles) virtual void dispatchDidReceiveTitle(const String&) = 0; 9353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchDidChangeIcons(IconType) = 0; 94d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual void dispatchDidCommitLoad(LocalFrame*, HistoryItem*, HistoryCommitType) = 0; 9553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchDidFailProvisionalLoad(const ResourceError&) = 0; 9653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchDidFailLoad(const ResourceError&) = 0; 9753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchDidFinishDocumentLoad() = 0; 9853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchDidFinishLoad() = 0; 991e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) virtual void dispatchDidFirstVisuallyNonEmptyLayout() = 0; 100197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch virtual void dispatchDidChangeThemeColor() = 0; 10153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 102197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch virtual NavigationPolicy decidePolicyForNavigation(const ResourceRequest&, DocumentLoader*, NavigationPolicy, bool isTransitionNavigation) = 0; 10353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 104197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch virtual void dispatchAddNavigationTransitionData(const String& origin, const String& selector, const String& markup) { } 1053464d02a173573db42f8ee6bb07bb74fabf4f5f2Ben Murdoch virtual void dispatchWillRequestResource(FetchRequest*) { } 10653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 107d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) = 0; 108d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual void dispatchWillSubmitForm(HTMLFormElement*) = 0; 10953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 11007a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch virtual void didStartLoading(LoadStartType) = 0; 11107a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch virtual void progressEstimateChanged(double progressEstimate) = 0; 11207a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch virtual void didStopLoading() = 0; 11353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 114e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch virtual void loadURLExternally(const ResourceRequest&, NavigationPolicy, const String& suggestedName = String()) = 0; 11553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 116bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles) virtual bool navigateBackForward(int offset) const = 0; 11753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 11853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // Another page has accessed the initial empty document of this frame. 11953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // It is no longer safe to display a provisional URL, since a URL spoof 12053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // is now possible. 12153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didAccessInitialDocument() { } 12253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 12353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // This frame has displayed inactive content (such as an image) from an 12453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // insecure source. Inactive content cannot spread to other frames. 12553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didDisplayInsecureContent() = 0; 12653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 12753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // The indicated security origin has run active content (such as a 12853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // script) from an insecure source. Note that the insecure content can 12953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // spread to other frames in the same origin. 13053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didRunInsecureContent(SecurityOrigin*, const KURL&) = 0; 13153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didDetectXSS(const KURL&, bool didBlockEntirePage) = 0; 1321fad5ca6c42d689812b66fc493992aa6d747a6fbBen Murdoch virtual void didDispatchPingLoader(const KURL&) = 0; 13353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 1341e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) // Transmits the change in the set of watched CSS selectors property 1351e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) // that match any element on the frame. 1361e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) virtual void selectorMatchChanged(const Vector<String>& addedSelectors, const Vector<String>& removedSelectors) = 0; 1371e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) 138d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual PassRefPtr<DocumentLoader> createDocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&) = 0; 13953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 14053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual String userAgent(const KURL&) = 0; 14153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 14253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual String doNotTrackValue() = 0; 14353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 144a854de003a23bf3c7f95ec0f8154ada64092ff5cTorne (Richard Coles) virtual void transitionToCommittedForNewPage() = 0; 14553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 1467242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci virtual PassRefPtrWillBeRawPtr<LocalFrame> createFrame(const KURL&, const AtomicString& name, const Referrer&, HTMLFrameOwnerElement*) = 0; 147d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) // Whether or not plugin creation should fail if the HTMLPlugInElement isn't in the DOM after plugin initialization. 148d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) enum DetachedPluginPolicy { 149d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) FailOnDetachedPlugin, 150d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) AllowDetachedPlugin, 151d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) }; 152a9984bf9ddc3cf73fdae3f29134a2bab379e7029Ben Murdoch virtual bool canCreatePluginWithoutRenderer(const String& mimeType) const = 0; 153d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual PassRefPtr<Widget> createPlugin(HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually, DetachedPluginPolicy) = 0; 15453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 155d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual PassRefPtr<Widget> createJavaAppletWidget(HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) = 0; 15653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 15753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages) = 0; 15853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 159323480423219ecd77329f8326dc5e0e3b50926d4Torne (Richard Coles) virtual void dispatchDidClearWindowObjectInMainWorld() = 0; 16053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void documentElementAvailable() = 0; 16153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 16253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didCreateScriptContext(v8::Handle<v8::Context>, int extensionGroup, int worldId) = 0; 16353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void willReleaseScriptContext(v8::Handle<v8::Context>, int worldId) = 0; 16453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual bool allowScriptExtension(const String& extensionName, int extensionGroup, int worldId) = 0; 16553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 16653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didChangeScrollOffset() { } 167d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual void didUpdateCurrentHistoryItem() { } 168e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) virtual void didRemoveAllPendingStylesheet() { } 16953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 17053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual bool allowScript(bool enabledPerSettings) { return enabledPerSettings; } 17153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual bool allowScriptFromSource(bool enabledPerSettings, const KURL&) { return enabledPerSettings; } 17253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettings; } 17353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual bool allowImage(bool enabledPerSettings, const KURL&) { return enabledPerSettings; } 174197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch virtual bool allowMedia(const KURL&) { return true; } 17553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, SecurityOrigin*, const KURL&) { return enabledPerSettings; } 17653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual bool allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin*, const KURL&) { return enabledPerSettings; } 17753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 17853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // This callback notifies the client that the frame was about to run 17953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // JavaScript but did not because allowScript returned false. We 18053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // have a separate callback here because there are a number of places 18153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // that need to know if JavaScript is enabled but are not necessarily 18253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // preparing to execute script. 18353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didNotAllowScript() { } 18453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // This callback is similar, but for plugins. 18553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didNotAllowPlugins() { } 18653e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 18751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual blink::WebCookieJar* cookieJar() const = 0; 18853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 18953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didChangeName(const String&) { } 19053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 19153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchWillOpenSocketStream(SocketStreamHandle*) { } 192f6b7aed3f7ce69aca0d7a032d144cbd088b04393Torne (Richard Coles) virtual void dispatchWillOpenWebSocket(blink::WebSocketHandle*) { } 19353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 19409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) virtual void dispatchWillStartUsingPeerConnectionHandler(blink::WebRTCPeerConnectionHandler*) { } 19553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 196f6b7aed3f7ce69aca0d7a032d144cbd088b04393Torne (Richard Coles) virtual void didRequestAutocomplete(HTMLFormElement*) = 0; 19753e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 19853e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual bool allowWebGL(bool enabledPerSettings) { return enabledPerSettings; } 19953e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // Informs the embedder that a WebGL canvas inside this frame received a lost context 20053e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // notification with the given GL_ARB_robustness guilt/innocence code (see Extensions3D.h). 20153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void didLoseWebGLContext(int) { } 20253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 20353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) // If an HTML document is being loaded, informs the embedder that the document will have its <body> attached soon. 20453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) virtual void dispatchWillInsertBody() { } 20553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 20607a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch virtual void dispatchDidChangeResourcePriority(unsigned long identifier, ResourceLoadPriority, int intraPriorityValue) { } 2079bbd2f5e390b01907d97ecffde80aa1b06113aacTorne (Richard Coles) 208d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual PassOwnPtr<blink::WebServiceWorkerProvider> createServiceWorkerProvider() = 0; 20906f816c7c76bc45a15e452ade8a34e8af077693eTorne (Richard Coles) 2107242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci virtual bool isControlledByServiceWorker() = 0; 2117242dc3dbeb210b5e876a3c42d1ec1a667fc621aPrimiano Tucci 21209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) virtual SharedWorkerRepositoryClient* sharedWorkerRepositoryClient() { return 0; } 21309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) 214d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual PassOwnPtr<blink::WebApplicationCacheHost> createApplicationCacheHost(blink::WebApplicationCacheHostClient*) = 0; 215d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 21606f816c7c76bc45a15e452ade8a34e8af077693eTorne (Richard Coles) virtual void didStopAllLoaders() { } 2171e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) 218323480423219ecd77329f8326dc5e0e3b50926d4Torne (Richard Coles) virtual void dispatchDidChangeManifest() { } 219323480423219ecd77329f8326dc5e0e3b50926d4Torne (Richard Coles) 2201e202183a5dc46166763171984b285173f8585e5Torne (Richard Coles) virtual bool isFrameLoaderClientImpl() const { return false; } 22153e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) }; 22253e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 223c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)} // namespace blink 22453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles) 22553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#endif // FrameLoaderClient_h 226