diff options
author | nasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 07:06:59 +0000 |
---|---|---|
committer | nasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 07:06:59 +0000 |
commit | 1961ab46f877cb4b139a6ed20f603d911da0f088 (patch) | |
tree | 6ea769dde4620e428c64e62756d3f6bfd3e3df04 /content/renderer/render_frame_impl.h | |
parent | 9ef3ea8064935a432c23e0c32deef7d7b58cdd40 (diff) | |
download | chromium_src-1961ab46f877cb4b139a6ed20f603d911da0f088.zip chromium_src-1961ab46f877cb4b139a6ed20f603d911da0f088.tar.gz chromium_src-1961ab46f877cb4b139a6ed20f603d911da0f088.tar.bz2 |
Implement WebFrameClient in RenderFrameImpl and proxy all calls to RenderView.
This is the first step in moving all WebFrameClient functionality into RenderViewImpl. Once this change is in, I will start moving methods few at a time, until all the code has migrated over.
BUG=245126
Review URL: https://chromiumcodereview.appspot.com/16223006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_frame_impl.h')
-rw-r--r-- | content/renderer/render_frame_impl.h | 186 |
1 files changed, 184 insertions, 2 deletions
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index a74077e..200a1d9 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -8,12 +8,16 @@ #include "base/basictypes.h" #include "content/public/renderer/render_frame.h" #include "ipc/ipc_message.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" namespace content { class RenderViewImpl; -class CONTENT_EXPORT RenderFrameImpl : public RenderFrame { +class CONTENT_EXPORT RenderFrameImpl + : public RenderFrame, + NON_EXPORTED_BASE(public WebKit::WebFrameClient) { public: RenderFrameImpl(RenderViewImpl* render_view, int routing_id); virtual ~RenderFrameImpl(); @@ -24,6 +28,184 @@ class CONTENT_EXPORT RenderFrameImpl : public RenderFrame { // IPC::Listener virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; + // WebKit::WebFrameClient implementation ------------------------------------- + virtual WebKit::WebPlugin* createPlugin( + WebKit::WebFrame* frame, + const WebKit::WebPluginParams& params) OVERRIDE; + virtual WebKit::WebSharedWorker* createSharedWorker( + WebKit::WebFrame* frame, + const WebKit::WebURL& url, + const WebKit::WebString& name, + unsigned long long document_id) OVERRIDE; + virtual WebKit::WebMediaPlayer* createMediaPlayer( + WebKit::WebFrame* frame, + const WebKit::WebURL& url, + WebKit::WebMediaPlayerClient* client) OVERRIDE; + virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost( + WebKit::WebFrame* frame, + WebKit::WebApplicationCacheHostClient* client) OVERRIDE; + virtual WebKit::WebCookieJar* cookieJar(WebKit::WebFrame* frame) OVERRIDE; + virtual void didAccessInitialDocument(WebKit::WebFrame* frame) OVERRIDE; + virtual void didCreateFrame(WebKit::WebFrame* parent, + WebKit::WebFrame* child) OVERRIDE; + virtual void didDisownOpener(WebKit::WebFrame* frame) OVERRIDE; + virtual void frameDetached(WebKit::WebFrame* frame) OVERRIDE; + virtual void willClose(WebKit::WebFrame* frame) OVERRIDE; + virtual void didChangeName(WebKit::WebFrame* frame, + const WebKit::WebString& name) OVERRIDE; + virtual void loadURLExternally(WebKit::WebFrame* frame, + const WebKit::WebURLRequest& request, + WebKit::WebNavigationPolicy policy) OVERRIDE; + virtual void loadURLExternally( + WebKit::WebFrame* frame, + const WebKit::WebURLRequest& request, + WebKit::WebNavigationPolicy policy, + const WebKit::WebString& suggested_name) OVERRIDE; + // The WebDataSource::ExtraData* is assumed to be a DocumentState* subclass. + virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( + WebKit::WebFrame* frame, + WebKit::WebDataSource::ExtraData* extraData, + const WebKit::WebURLRequest& request, + WebKit::WebNavigationType type, + WebKit::WebNavigationPolicy default_policy, + bool is_redirect); + // DEPRECATED. + virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( + WebKit::WebFrame* frame, + const WebKit::WebURLRequest& request, + WebKit::WebNavigationType type, + WebKit::WebNavigationPolicy default_policy, + bool is_redirect) OVERRIDE; + virtual WebKit::WebURLError cannotHandleRequestError( + WebKit::WebFrame* frame, + const WebKit::WebURLRequest& request) OVERRIDE; + virtual WebKit::WebURLError cancelledError( + WebKit::WebFrame* frame, + const WebKit::WebURLRequest& request) OVERRIDE; + virtual void unableToImplementPolicyWithError( + WebKit::WebFrame* frame, + const WebKit::WebURLError& error) OVERRIDE; + virtual void willSendSubmitEvent(WebKit::WebFrame* frame, + const WebKit::WebFormElement& form) OVERRIDE; + virtual void willSubmitForm(WebKit::WebFrame* frame, + const WebKit::WebFormElement& form) OVERRIDE; + virtual void willPerformClientRedirect(WebKit::WebFrame* frame, + const WebKit::WebURL& from, + const WebKit::WebURL& to, + double interval, + double fire_time) OVERRIDE; + virtual void didCancelClientRedirect(WebKit::WebFrame* frame) OVERRIDE; + virtual void didCompleteClientRedirect(WebKit::WebFrame* frame, + const WebKit::WebURL& from) OVERRIDE; + virtual void didCreateDataSource(WebKit::WebFrame* frame, + WebKit::WebDataSource* datasource) OVERRIDE; + virtual void didStartProvisionalLoad(WebKit::WebFrame* frame) OVERRIDE; + virtual void didReceiveServerRedirectForProvisionalLoad( + WebKit::WebFrame* frame) OVERRIDE; + virtual void didFailProvisionalLoad( + WebKit::WebFrame* frame, + const WebKit::WebURLError& error) OVERRIDE; + virtual void didReceiveDocumentData(WebKit::WebFrame* frame, + const char* data, + size_t length, + bool& prevent_default) OVERRIDE; + virtual void didCommitProvisionalLoad(WebKit::WebFrame* frame, + bool is_new_navigation) OVERRIDE; + virtual void didClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; + virtual void didCreateDocumentElement(WebKit::WebFrame* frame) OVERRIDE; + virtual void didReceiveTitle(WebKit::WebFrame* frame, + const WebKit::WebString& title, + WebKit::WebTextDirection direction) OVERRIDE; + virtual void didChangeIcon(WebKit::WebFrame* frame, + WebKit::WebIconURL::Type icon_type) OVERRIDE; + virtual void didFinishDocumentLoad(WebKit::WebFrame* frame) OVERRIDE; + virtual void didHandleOnloadEvents(WebKit::WebFrame* frame) OVERRIDE; + virtual void didFailLoad(WebKit::WebFrame* frame, + const WebKit::WebURLError& error) OVERRIDE; + virtual void didFinishLoad(WebKit::WebFrame* frame) OVERRIDE; + virtual void didNavigateWithinPage(WebKit::WebFrame* frame, + bool is_new_navigation) OVERRIDE; + virtual void didUpdateCurrentHistoryItem(WebKit::WebFrame* frame) OVERRIDE; + virtual void willSendRequest( + WebKit::WebFrame* frame, + unsigned identifier, + WebKit::WebURLRequest& request, + const WebKit::WebURLResponse& redirect_response) OVERRIDE; + virtual void didReceiveResponse( + WebKit::WebFrame* frame, + unsigned identifier, + const WebKit::WebURLResponse& response) OVERRIDE; + virtual void didFinishResourceLoad(WebKit::WebFrame* frame, + unsigned identifier) OVERRIDE; + virtual void didFailResourceLoad(WebKit::WebFrame* frame, + unsigned identifier, + const WebKit::WebURLError& error) OVERRIDE; + virtual void didLoadResourceFromMemoryCache( + WebKit::WebFrame* frame, + const WebKit::WebURLRequest& request, + const WebKit::WebURLResponse& response) OVERRIDE; + virtual void didDisplayInsecureContent(WebKit::WebFrame* frame) OVERRIDE; + virtual void didRunInsecureContent(WebKit::WebFrame* frame, + const WebKit::WebSecurityOrigin& origin, + const WebKit::WebURL& target) OVERRIDE; + virtual void didExhaustMemoryAvailableForScript( + WebKit::WebFrame* frame) OVERRIDE; + virtual void didCreateScriptContext(WebKit::WebFrame* frame, + v8::Handle<v8::Context> context, + int extension_group, + int world_id) OVERRIDE; + virtual void willReleaseScriptContext(WebKit::WebFrame* frame, + v8::Handle<v8::Context> context, + int world_id) OVERRIDE; + virtual void didFirstVisuallyNonEmptyLayout(WebKit::WebFrame* frame) OVERRIDE; + virtual void didChangeContentsSize(WebKit::WebFrame* frame, + const WebKit::WebSize& size) OVERRIDE; + virtual void didChangeScrollOffset(WebKit::WebFrame* frame) OVERRIDE; + virtual void willInsertBody(WebKit::WebFrame* frame) OVERRIDE; + virtual void reportFindInPageMatchCount(int request_id, + int count, + bool final_update) OVERRIDE; + virtual void reportFindInPageSelection(int request_id, + int active_match_ordinal, + const WebKit::WebRect& sel) OVERRIDE; + virtual void openFileSystem( + WebKit::WebFrame* frame, + WebKit::WebFileSystemType type, + long long size, + bool create, + WebKit::WebFileSystemCallbacks* callbacks) OVERRIDE; + virtual void deleteFileSystem( + WebKit::WebFrame* frame, + WebKit::WebFileSystemType type, + WebKit::WebFileSystemCallbacks* callbacks) OVERRIDE; + virtual void queryStorageUsageAndQuota( + WebKit::WebFrame* frame, + WebKit::WebStorageQuotaType type, + WebKit::WebStorageQuotaCallbacks* callbacks) OVERRIDE; + virtual void requestStorageQuota( + WebKit::WebFrame* frame, + WebKit::WebStorageQuotaType type, + unsigned long long requested_size, + WebKit::WebStorageQuotaCallbacks* callbacks) OVERRIDE; + virtual void willOpenSocketStream( + WebKit::WebSocketStreamHandle* handle) OVERRIDE; + virtual void willStartUsingPeerConnectionHandler( + WebKit::WebFrame* frame, + WebKit::WebRTCPeerConnectionHandler* handler) OVERRIDE; + virtual bool willCheckAndDispatchMessageEvent( + WebKit::WebFrame* sourceFrame, + WebKit::WebFrame* targetFrame, + WebKit::WebSecurityOrigin targetOrigin, + WebKit::WebDOMMessageEvent event) OVERRIDE; + virtual WebKit::WebString userAgentOverride( + WebKit::WebFrame* frame, + const WebKit::WebURL& url) OVERRIDE; + virtual WebKit::WebString doNotTrackValue(WebKit::WebFrame* frame) OVERRIDE; + virtual bool allowWebGL(WebKit::WebFrame* frame, bool default_value) OVERRIDE; + virtual void didLoseWebGLContext(WebKit::WebFrame* frame, + int arb_robustness_status_code) OVERRIDE; + + // RenderFrameImpl methods int routing_id() { return routing_id_; } private: @@ -35,4 +217,4 @@ class CONTENT_EXPORT RenderFrameImpl : public RenderFrame { } // namespace content -#endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ +#endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |