Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: webkit/glue/empty_webframeclient.h

Issue 200054: Hook up WebFrameClient, replacing many WebViewDelegate methods.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/editor_client_impl.cc ('k') | webkit/glue/iframe_redirect_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/empty_webframeclient.h
===================================================================
--- webkit/glue/empty_webframeclient.h (revision 0)
+++ webkit/glue/empty_webframeclient.h (revision 0)
@@ -0,0 +1,89 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_GLUE_EMPTY_WEBFRAMECLIENT_H_
+#define WEBKIT_GLUE_EMPTY_WEBFRAMECLIENT_H_
+
+#include "webkit/api/public/WebFrameClient.h"
+
+namespace webkit_glue {
+
+// Extend from this if you only need to override a few WebFrameClient methods.
+class EmptyWebFrameClient : public WebKit::WebFrameClient {
+ public:
+ virtual WebKit::WebPlugin* createPlugin(
+ WebKit::WebFrame* frame, const WebKit::WebPluginParams& params) {
+ return NULL; }
+ virtual WebKit::WebWorker* createWorker(
+ WebKit::WebFrame* frame, WebKit::WebWorkerClient* client) {
+ return NULL; }
+ virtual WebKit::WebMediaPlayer* createMediaPlayer(
+ WebKit::WebFrame* frame, WebKit::WebMediaPlayerClient* client) {
+ return NULL; }
+ virtual void willClose(WebKit::WebFrame* frame) {}
+ virtual void loadURLExternally(
+ WebKit::WebFrame* frame, const WebKit::WebURLRequest& request,
+ WebKit::WebNavigationPolicy policy) {}
+ virtual WebKit::WebNavigationPolicy decidePolicyForNavigation(
+ WebKit::WebFrame* frame, const WebKit::WebURLRequest& request,
+ WebKit::WebNavigationType type,
+ WebKit::WebNavigationPolicy default_policy, bool is_redirect) {
+ return default_policy; }
+ virtual void willSubmitForm(WebKit::WebFrame* frame,
+ const WebKit::WebForm& form) {}
+ virtual void willPerformClientRedirect(
+ WebKit::WebFrame* frame, const WebKit::WebURL& from,
+ const WebKit::WebURL& to, double interval, double fire_time) {}
+ virtual void didCancelClientRedirect(WebKit::WebFrame* frame) {}
+ virtual void didCompleteClientRedirect(
+ WebKit::WebFrame* frame, const WebKit::WebURL& from) {}
+ virtual void didCreateDataSource(
+ WebKit::WebFrame* frame, WebKit::WebDataSource* datasource) {}
+ virtual void didStartProvisionalLoad(WebKit::WebFrame* frame) {}
+ virtual void didReceiveServerRedirectForProvisionalLoad(
+ WebKit::WebFrame* frame) {}
+ virtual void didFailProvisionalLoad(
+ WebKit::WebFrame* frame, const WebKit::WebURLError& error) {}
+ virtual void didReceiveDocumentData(
+ WebKit::WebFrame* frame, const char* data, size_t length,
+ bool& prevent_default) {}
+ virtual void didCommitProvisionalLoad(
+ WebKit::WebFrame* frame, bool is_new_navigation) {}
+ virtual void didClearWindowObject(WebKit::WebFrame* frame) {}
+ virtual void didCreateDocumentElement(WebKit::WebFrame* frame) {}
+ virtual void didReceiveTitle(
+ WebKit::WebFrame* frame, const WebKit::WebString& title) {}
+ virtual void didFinishDocumentLoad(WebKit::WebFrame* frame) {}
+ virtual void didHandleOnloadEvents(WebKit::WebFrame* frame) {}
+ virtual void didFailLoad(
+ WebKit::WebFrame* frame, const WebKit::WebURLError& error) {}
+ virtual void didFinishLoad(WebKit::WebFrame* frame) {}
+ virtual void didChangeLocationWithinPage(
+ WebKit::WebFrame* frame, bool is_new_navigation) {}
+ virtual void assignIdentifierToRequest(
+ WebKit::WebFrame* frame, unsigned identifier,
+ const WebKit::WebURLRequest& request) {}
+ virtual void willSendRequest(
+ WebKit::WebFrame* frame, unsigned identifier,
+ WebKit::WebURLRequest& request,
+ const WebKit::WebURLResponse& redirect_response) {}
+ virtual void didReceiveResponse(
+ WebKit::WebFrame* frame, unsigned identifier,
+ const WebKit::WebURLResponse& response) {}
+ virtual void didFinishResourceLoad(
+ WebKit::WebFrame* frame, unsigned identifier) {}
+ virtual void didFailResourceLoad(
+ WebKit::WebFrame* frame, unsigned identifier,
+ const WebKit::WebURLError& error) {}
+ virtual void didLoadResourceFromMemoryCache(
+ WebKit::WebFrame* frame, const WebKit::WebURLRequest& request,
+ const WebKit::WebURLResponse&) {}
+ virtual void didExhaustMemoryAvailableForScript(WebKit::WebFrame* frame) {}
+ virtual void didChangeContentsSize(
+ WebKit::WebFrame* frame, const WebKit::WebSize& size) {}
+};
+
+} // namespace webkit_glue
+
+#endif // WEBKIT_GLUE_EMPTY_WEBFRAMECLIENT_H_
Property changes on: webkit\glue\empty_webframeclient.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « webkit/glue/editor_client_impl.cc ('k') | webkit/glue/iframe_redirect_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698