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

Side by Side Diff: webkit/api/src/EmptyWebFrameClientImpl.h

Issue 342024: Adds default implementations to WebFrameClient (Closed)
Patch Set: Created 11 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef EmptyWebFrameClientImpl_h
32 #define EmptyWebFrameClientImpl_h
33
34 #include "WebFrameClient.h"
35 #include "WebURLError.h"
36
37 namespace WebKit {
38
39 // Extend from this if you only need to override a few WebFrameClient methods.
40 class EmptyWebFrameClient : public WebFrameClient {
41 public:
42 virtual WebPlugin* createPlugin(WebFrame*, const WebPluginParams&) { return 0; }
43 virtual WebWorker* createWorker(WebFrame*, WebWorkerClient*) { return 0; }
44 virtual WebMediaPlayer* createMediaPlayer(WebFrame*, WebMediaPlayerClient*) { return 0; }
45 virtual void willClose(WebFrame*) {}
46 virtual void loadURLExternally(WebFrame*, const WebURLRequest&, WebNavigationPolicy) {}
47 virtual WebNavigationPolicy decidePolicyForNavigation(
48 WebFrame*, const WebURLRequest&, WebNavigationType, const WebNode&,
49 WebNavigationPolicy defaultPolicy, bool) { return defaultPolicy; }
50 virtual bool canHandleRequest(WebFrame*, const WebURLRequest&) { return true; }
51 virtual WebURLError cannotHandleRequestError(WebFrame*, const WebURLRequest&) { return WebURLError(); }
52 virtual WebURLError cancelledError(WebFrame*, const WebURLRequest&) { return WebURLError(); }
53 virtual void unableToImplementPolicyWithError(WebFrame*, const WebURLError&) {}
54 virtual void willSubmitForm(WebFrame*, const WebForm&) {}
55 virtual void willPerformClientRedirect(WebFrame*, const WebURL&, const WebURL&, double, double) {}
56 virtual void didCancelClientRedirect(WebFrame*) {}
57 virtual void didCompleteClientRedirect(WebFrame*, const WebURL& from) {}
58 virtual void didCreateDataSource(WebFrame*, WebDataSource*) {}
59 virtual void didStartProvisionalLoad(WebFrame*) {}
60 virtual void didReceiveServerRedirectForProvisionalLoad(WebFrame*) {}
61 virtual void didFailProvisionalLoad(WebFrame*, const WebURLError&) {}
62 virtual void didReceiveDocumentData(WebFrame*, const char*, size_t, bool&) {}
63 virtual void didCommitProvisionalLoad(WebFrame*, bool) {}
64 virtual void didClearWindowObject(WebFrame*) {}
65 virtual void didCreateDocumentElement(WebFrame*) {}
66 virtual void didReceiveTitle(WebFrame*, const WebString&) {}
67 virtual void didFinishDocumentLoad(WebFrame*) {}
68 virtual void didHandleOnloadEvents(WebFrame*) {}
69 virtual void didFailLoad(WebFrame*, const WebURLError&) {}
70 virtual void didFinishLoad(WebFrame*) {}
71 virtual void didChangeLocationWithinPage(WebFrame*, bool) {}
72 virtual void didUpdateCurrentHistoryItem(WebFrame*) {}
73 virtual void assignIdentifierToRequest(WebFrame*, unsigned, const WebURLRequest&) {}
74 virtual void willSendRequest(WebFrame*, unsigned, WebURLRequest&, const WebURLResponse&) {}
75 virtual void didReceiveResponse(WebFrame*, unsigned, const WebURLResponse&) {}
76 virtual void didFinishResourceLoad(WebFrame*, unsigned) {}
77 virtual void didFailResourceLoad(WebFrame*, unsigned, const WebURLError&) {}
78 virtual void didLoadResourceFromMemoryCache(WebFrame*, const WebURLRequest&, const WebURLResponse&) {}
79 virtual void didDisplayInsecureContent(WebFrame*) {}
80 virtual void didRunInsecureContent(WebFrame*, const WebSecurityOrigin&) {}
81 virtual void didExhaustMemoryAvailableForScript(WebFrame*) {}
82 virtual void didCreateScriptContext(WebFrame*) {}
83 virtual void didDestroyScriptContext(WebFrame*) {}
84 virtual void didCreateIsolatedScriptContext(WebFrame*) {}
85 virtual void didChangeContentsSize(WebFrame*, const WebSize&) {}
86 virtual void reportFindInPageMatchCount(int, int, bool) {}
87 virtual void reportFindInPageSelection(int, int, const WebRect&) {}
88 };
89
90 } // namespace WebKit
91
92 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698