| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "platform/weborigin/KURL.h" | 36 #include "platform/weborigin/KURL.h" |
| 37 #include "wtf/PassOwnPtr.h" | 37 #include "wtf/PassOwnPtr.h" |
| 38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class WebFrameImpl; | 42 class WebFrameImpl; |
| 43 class WebPluginContainerImpl; | 43 class WebPluginContainerImpl; |
| 44 class WebPluginLoadObserver; | 44 class WebPluginLoadObserver; |
| 45 | 45 |
| 46 class FrameLoaderClientImpl : public WebCore::FrameLoaderClient { | 46 class FrameLoaderClientImpl FINAL : public WebCore::FrameLoaderClient { |
| 47 public: | 47 public: |
| 48 FrameLoaderClientImpl(WebFrameImpl* webFrame); | 48 FrameLoaderClientImpl(WebFrameImpl* webFrame); |
| 49 ~FrameLoaderClientImpl(); | 49 virtual ~FrameLoaderClientImpl(); |
| 50 | 50 |
| 51 WebFrameImpl* webFrame() const { return m_webFrame; } | 51 WebFrameImpl* webFrame() const { return m_webFrame; } |
| 52 | 52 |
| 53 // WebCore::FrameLoaderClient ---------------------------------------------- | 53 // WebCore::FrameLoaderClient ---------------------------------------------- |
| 54 | 54 |
| 55 // Notifies the WebView delegate that the JS window object has been cleared, | 55 // Notifies the WebView delegate that the JS window object has been cleared, |
| 56 // giving it a chance to bind native objects to the window before script | 56 // giving it a chance to bind native objects to the window before script |
| 57 // parsing begins. | 57 // parsing begins. |
| 58 virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*); | 58 virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*)
OVERRIDE; |
| 59 virtual void documentElementAvailable(); | 59 virtual void documentElementAvailable() OVERRIDE; |
| 60 | 60 |
| 61 // Script in the page tried to allocate too much memory. | 61 // Script in the page tried to allocate too much memory. |
| 62 virtual void didExhaustMemoryAvailableForScript(); | 62 virtual void didExhaustMemoryAvailableForScript(); |
| 63 | 63 |
| 64 virtual void didCreateScriptContext(v8::Handle<v8::Context>, int extensionGr
oup, int worldId); | 64 virtual void didCreateScriptContext(v8::Handle<v8::Context>, int extensionGr
oup, int worldId) OVERRIDE; |
| 65 virtual void willReleaseScriptContext(v8::Handle<v8::Context>, int worldId); | 65 virtual void willReleaseScriptContext(v8::Handle<v8::Context>, int worldId)
OVERRIDE; |
| 66 | 66 |
| 67 // Returns true if we should allow the given V8 extension to be added to | 67 // Returns true if we should allow the given V8 extension to be added to |
| 68 // the script context at the currently loading page and given extension grou
p. | 68 // the script context at the currently loading page and given extension grou
p. |
| 69 virtual bool allowScriptExtension(const String& extensionName, int extension
Group, int worldId); | 69 virtual bool allowScriptExtension(const String& extensionName, int extension
Group, int worldId) OVERRIDE; |
| 70 | 70 |
| 71 virtual bool hasWebView() const; | 71 virtual bool hasWebView() const OVERRIDE; |
| 72 virtual bool hasFrameView() const; | 72 virtual void detachedFromParent() OVERRIDE; |
| 73 virtual void detachedFromParent(); | 73 virtual void dispatchWillRequestAfterPreconnect(WebCore::ResourceRequest&) O
VERRIDE; |
| 74 virtual void dispatchWillRequestAfterPreconnect(WebCore::ResourceRequest&); | 74 virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long
identifier, WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirec
tResponse) OVERRIDE; |
| 75 virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long
identifier, WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirec
tResponse); | 75 virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned l
ong identifier, const WebCore::ResourceResponse&) OVERRIDE; |
| 76 virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned l
ong identifier, const WebCore::ResourceResponse&); | 76 virtual void dispatchDidChangeResourcePriority(unsigned long identifier, Web
Core::ResourceLoadPriority) OVERRIDE; |
| 77 virtual void dispatchDidChangeResourcePriority(unsigned long identifier, Web
Core::ResourceLoadPriority); | 77 virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned lon
g identifier) OVERRIDE; |
| 78 virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned lon
g identifier); | 78 virtual void dispatchDidLoadResourceFromMemoryCache(const WebCore::ResourceR
equest&, const WebCore::ResourceResponse&) OVERRIDE; |
| 79 virtual void dispatchDidLoadResourceFromMemoryCache(const WebCore::ResourceR
equest&, const WebCore::ResourceResponse&); | 79 virtual void dispatchDidHandleOnloadEvents() OVERRIDE; |
| 80 virtual void dispatchDidHandleOnloadEvents(); | 80 virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() OVERRIDE; |
| 81 virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); | 81 virtual void dispatchDidNavigateWithinPage(WebCore::HistoryItem*, WebCore::H
istoryCommitType) OVERRIDE; |
| 82 virtual void dispatchDidNavigateWithinPage(WebCore::HistoryItem*, WebCore::H
istoryCommitType); | 82 virtual void dispatchWillClose() OVERRIDE; |
| 83 virtual void dispatchWillClose(); | 83 virtual void dispatchDidStartProvisionalLoad() OVERRIDE; |
| 84 virtual void dispatchDidStartProvisionalLoad(); | 84 virtual void dispatchDidReceiveTitle(const String&) OVERRIDE; |
| 85 virtual void dispatchDidReceiveTitle(const String&); | 85 virtual void dispatchDidChangeIcons(WebCore::IconType) OVERRIDE; |
| 86 virtual void dispatchDidChangeIcons(WebCore::IconType); | 86 virtual void dispatchDidCommitLoad(WebCore::Frame*, WebCore::HistoryItem*, W
ebCore::HistoryCommitType) OVERRIDE; |
| 87 virtual void dispatchDidCommitLoad(WebCore::Frame*, WebCore::HistoryItem*, W
ebCore::HistoryCommitType); | 87 virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) O
VERRIDE; |
| 88 virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&); | 88 virtual void dispatchDidFailLoad(const WebCore::ResourceError&) OVERRIDE; |
| 89 virtual void dispatchDidFailLoad(const WebCore::ResourceError&); | 89 virtual void dispatchDidFinishDocumentLoad() OVERRIDE; |
| 90 virtual void dispatchDidFinishDocumentLoad(); | 90 virtual void dispatchDidFinishLoad() OVERRIDE; |
| 91 virtual void dispatchDidFinishLoad(); | |
| 92 virtual void dispatchDidFirstVisuallyNonEmptyLayout() OVERRIDE; | 91 virtual void dispatchDidFirstVisuallyNonEmptyLayout() OVERRIDE; |
| 93 virtual WebCore::NavigationPolicy decidePolicyForNavigation(const WebCore::R
esourceRequest&, WebCore::DocumentLoader*, WebCore::NavigationPolicy); | 92 virtual WebCore::NavigationPolicy decidePolicyForNavigation(const WebCore::R
esourceRequest&, WebCore::DocumentLoader*, WebCore::NavigationPolicy) OVERRIDE; |
| 94 virtual void dispatchWillRequestResource(WebCore::FetchRequest*); | 93 virtual void dispatchWillRequestResource(WebCore::FetchRequest*) OVERRIDE; |
| 95 virtual void dispatchWillSendSubmitEvent(PassRefPtr<WebCore::FormState>); | 94 virtual void dispatchWillSendSubmitEvent(PassRefPtr<WebCore::FormState>) OVE
RRIDE; |
| 96 virtual void dispatchWillSubmitForm(PassRefPtr<WebCore::FormState>); | 95 virtual void dispatchWillSubmitForm(PassRefPtr<WebCore::FormState>) OVERRIDE
; |
| 97 virtual void postProgressStartedNotification(WebCore::LoadStartType); | 96 virtual void postProgressStartedNotification(WebCore::LoadStartType) OVERRID
E; |
| 98 virtual void postProgressEstimateChangedNotification(); | 97 virtual void postProgressEstimateChangedNotification() OVERRIDE; |
| 99 virtual void postProgressFinishedNotification(); | 98 virtual void postProgressFinishedNotification() OVERRIDE; |
| 100 virtual void loadURLExternally(const WebCore::ResourceRequest&, WebCore::Nav
igationPolicy, const String& suggestedName = String()); | 99 virtual void loadURLExternally(const WebCore::ResourceRequest&, WebCore::Nav
igationPolicy, const String& suggestedName = String()) OVERRIDE; |
| 101 virtual bool navigateBackForward(int offset) const; | 100 virtual bool navigateBackForward(int offset) const OVERRIDE; |
| 102 virtual void didAccessInitialDocument(); | 101 virtual void didAccessInitialDocument() OVERRIDE; |
| 103 virtual void didDisownOpener(); | 102 virtual void didDisownOpener() OVERRIDE; |
| 104 virtual void didDisplayInsecureContent(); | 103 virtual void didDisplayInsecureContent() OVERRIDE; |
| 105 virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::
KURL& insecureURL); | 104 virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::
KURL& insecureURL) OVERRIDE; |
| 106 virtual void didDetectXSS(const WebCore::KURL&, bool didBlockEntirePage); | 105 virtual void didDetectXSS(const WebCore::KURL&, bool didBlockEntirePage) OVE
RRIDE; |
| 107 virtual void didDispatchPingLoader(const WebCore::KURL&); | 106 virtual void didDispatchPingLoader(const WebCore::KURL&) OVERRIDE; |
| 108 virtual void selectorMatchChanged(const Vector<String>& addedSelectors, cons
t Vector<String>& removedSelectors); | 107 virtual void selectorMatchChanged(const Vector<String>& addedSelectors, cons
t Vector<String>& removedSelectors) OVERRIDE; |
| 109 virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(WebCore::Fr
ame*, const WebCore::ResourceRequest&, const WebCore::SubstituteData&); | 108 virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(WebCore::Fr
ame*, const WebCore::ResourceRequest&, const WebCore::SubstituteData&) OVERRIDE; |
| 110 virtual WTF::String userAgent(const WebCore::KURL&); | 109 virtual WTF::String userAgent(const WebCore::KURL&) OVERRIDE; |
| 111 virtual WTF::String doNotTrackValue(); | 110 virtual WTF::String doNotTrackValue() OVERRIDE; |
| 112 virtual void transitionToCommittedForNewPage(); | 111 virtual void transitionToCommittedForNewPage() OVERRIDE; |
| 113 virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL&, const W
TF::AtomicString& name, const WTF::String& referrer, WebCore::HTMLFrameOwnerElem
ent*); | 112 virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL&, const W
TF::AtomicString& name, const WTF::String& referrer, WebCore::HTMLFrameOwnerElem
ent*) OVERRIDE; |
| 114 virtual PassRefPtr<WebCore::Widget> createPlugin( | 113 virtual PassRefPtr<WebCore::Widget> createPlugin( |
| 115 const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KUR
L&, | 114 const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KUR
L&, |
| 116 const Vector<WTF::String>&, const Vector<WTF::String>&, | 115 const Vector<WTF::String>&, const Vector<WTF::String>&, |
| 117 const WTF::String&, bool loadManually); | 116 const WTF::String&, bool loadManually) OVERRIDE; |
| 118 virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget( | 117 virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget( |
| 119 const WebCore::IntSize&, | 118 const WebCore::IntSize&, |
| 120 WebCore::HTMLAppletElement*, | 119 WebCore::HTMLAppletElement*, |
| 121 const WebCore::KURL& /* base_url */, | 120 const WebCore::KURL& /* base_url */, |
| 122 const Vector<WTF::String>& paramNames, | 121 const Vector<WTF::String>& paramNames, |
| 123 const Vector<WTF::String>& paramValues); | 122 const Vector<WTF::String>& paramValues) OVERRIDE; |
| 124 virtual WebCore::ObjectContentType objectContentType( | 123 virtual WebCore::ObjectContentType objectContentType( |
| 125 const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlug
InsForImages); | 124 const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlug
InsForImages) OVERRIDE; |
| 126 virtual void didChangeScrollOffset(); | 125 virtual void didChangeScrollOffset() OVERRIDE; |
| 127 virtual bool allowScript(bool enabledPerSettings); | 126 virtual bool allowScript(bool enabledPerSettings) OVERRIDE; |
| 128 virtual bool allowScriptFromSource(bool enabledPerSettings, const WebCore::K
URL& scriptURL); | 127 virtual bool allowScriptFromSource(bool enabledPerSettings, const WebCore::K
URL& scriptURL) OVERRIDE; |
| 129 virtual bool allowPlugins(bool enabledPerSettings); | 128 virtual bool allowPlugins(bool enabledPerSettings) OVERRIDE; |
| 130 virtual bool allowImage(bool enabledPerSettings, const WebCore::KURL& imageU
RL); | 129 virtual bool allowImage(bool enabledPerSettings, const WebCore::KURL& imageU
RL) OVERRIDE; |
| 131 virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, WebCore
::SecurityOrigin*, const WebCore::KURL&); | 130 virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, WebCore
::SecurityOrigin*, const WebCore::KURL&) OVERRIDE; |
| 132 virtual bool allowRunningInsecureContent(bool enabledPerSettings, WebCore::S
ecurityOrigin*, const WebCore::KURL&); | 131 virtual bool allowRunningInsecureContent(bool enabledPerSettings, WebCore::S
ecurityOrigin*, const WebCore::KURL&) OVERRIDE; |
| 133 virtual void didNotAllowScript(); | 132 virtual void didNotAllowScript() OVERRIDE; |
| 134 virtual void didNotAllowPlugins(); | 133 virtual void didNotAllowPlugins() OVERRIDE; |
| 135 | 134 |
| 136 virtual WebCookieJar* cookieJar() const; | 135 virtual WebCookieJar* cookieJar() const OVERRIDE; |
| 137 virtual bool willCheckAndDispatchMessageEvent(WebCore::SecurityOrigin* targe
t, WebCore::MessageEvent*) const; | 136 virtual bool willCheckAndDispatchMessageEvent(WebCore::SecurityOrigin* targe
t, WebCore::MessageEvent*) const OVERRIDE; |
| 138 virtual void didChangeName(const String&); | 137 virtual void didChangeName(const String&) OVERRIDE; |
| 139 | 138 |
| 140 virtual void dispatchWillOpenSocketStream(WebCore::SocketStreamHandle*) OVER
RIDE; | 139 virtual void dispatchWillOpenSocketStream(WebCore::SocketStreamHandle*) OVER
RIDE; |
| 141 | 140 |
| 142 virtual void dispatchWillStartUsingPeerConnectionHandler(WebCore::RTCPeerCon
nectionHandler*) OVERRIDE; | 141 virtual void dispatchWillStartUsingPeerConnectionHandler(WebCore::RTCPeerCon
nectionHandler*) OVERRIDE; |
| 143 | 142 |
| 144 virtual void didRequestAutocomplete(PassRefPtr<WebCore::FormState>) OVERRIDE
; | 143 virtual void didRequestAutocomplete(PassRefPtr<WebCore::FormState>) OVERRIDE
; |
| 145 | 144 |
| 146 virtual bool allowWebGL(bool enabledPerSettings) OVERRIDE; | 145 virtual bool allowWebGL(bool enabledPerSettings) OVERRIDE; |
| 147 virtual void didLoseWebGLContext(int arbRobustnessContextLostReason) OVERRID
E; | 146 virtual void didLoseWebGLContext(int arbRobustnessContextLostReason) OVERRID
E; |
| 148 virtual bool allowWebGLDebugRendererInfo() OVERRIDE; | 147 virtual bool allowWebGLDebugRendererInfo() OVERRIDE; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 162 // The WebFrame that owns this object and manages its lifetime. Therefore, | 161 // The WebFrame that owns this object and manages its lifetime. Therefore, |
| 163 // the web frame object is guaranteed to exist. | 162 // the web frame object is guaranteed to exist. |
| 164 WebFrameImpl* m_webFrame; | 163 WebFrameImpl* m_webFrame; |
| 165 }; | 164 }; |
| 166 | 165 |
| 167 DEFINE_TYPE_CASTS(FrameLoaderClientImpl, WebCore::FrameLoaderClient, client, cli
ent->isFrameLoaderClientImpl(), client.isFrameLoaderClientImpl()); | 166 DEFINE_TYPE_CASTS(FrameLoaderClientImpl, WebCore::FrameLoaderClient, client, cli
ent->isFrameLoaderClientImpl(), client.isFrameLoaderClientImpl()); |
| 168 | 167 |
| 169 } // namespace blink | 168 } // namespace blink |
| 170 | 169 |
| 171 #endif | 170 #endif |
| OLD | NEW |