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

Side by Side Diff: webkit/pending/FrameLoaderClient.h

Issue 6500: Cleaning up the unfork (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/pending/FrameLoader.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple 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
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 * its contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 #ifndef FrameLoaderClient_h
30 #define FrameLoaderClient_h
31
32 #include "FrameLoaderTypes.h"
33 #include <wtf/Forward.h>
34 #include <wtf/Platform.h>
35 #include <wtf/Vector.h>
36
37 typedef class _jobject* jobject;
38
39 #if PLATFORM(MAC) && !defined(__OBJC__)
40 class NSCachedURLResponse;
41 class NSView;
42 #endif
43
44 namespace WebCore {
45
46 class AuthenticationChallenge;
47 class CachedPage;
48 class DocumentLoader;
49 class Element;
50 class FormState;
51 class Frame;
52 class FrameLoader;
53 class HistoryItem;
54 class HTMLFrameOwnerElement;
55 class IntSize;
56 class KURL;
57 class NavigationAction;
58 class ResourceError;
59 class ResourceHandle;
60 class ResourceLoader;
61 class ResourceResponse;
62 class SharedBuffer;
63 class SubstituteData;
64 class String;
65 class Widget;
66
67 class ResourceRequest;
68
69 typedef void (FrameLoader::*FramePolicyFunction)(PolicyAction);
70
71 class FrameLoaderClient {
72 public:
73 virtual ~FrameLoaderClient() { }
74 virtual void frameLoaderDestroyed() = 0;
75
76 virtual bool hasWebView() const = 0; // mainly for assertions
77 virtual bool hasFrameView() const = 0; // ditto
78
79 virtual bool hasHTMLView() const { return true; }
80
81 virtual void makeRepresentation(DocumentLoader*) = 0;
82 virtual void forceLayout() = 0;
83 virtual void forceLayoutForNonHTML() = 0;
84
85 virtual void setCopiesOnScroll() = 0;
86
87 virtual void detachedFromParent2() = 0;
88 virtual void detachedFromParent3() = 0;
89 virtual void detachedFromParent4() = 0;
90
91 virtual void assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&) = 0;
92
93 virtual void dispatchWillSendRequest(DocumentLoader*, unsigned long iden tifier, ResourceRequest&, const ResourceResponse& redirectResponse) = 0;
94 virtual void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&) = 0;
95 virtual void dispatchDidCancelAuthenticationChallenge(DocumentLoader*, u nsigned long identifier, const AuthenticationChallenge&) = 0;
96 virtual void dispatchDidReceiveResponse(DocumentLoader*, unsigned long i dentifier, const ResourceResponse&) = 0;
97 virtual void dispatchDidReceiveContentLength(DocumentLoader*, unsigned l ong identifier, int lengthReceived) = 0;
98 virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long ide ntifier) = 0;
99 virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long ident ifier, const ResourceError&) = 0;
100 virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, con st ResourceRequest&, const ResourceResponse&, int length) = 0;
101
102 virtual void dispatchDidHandleOnloadEvents() = 0;
103 virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
104 virtual void dispatchDidCancelClientRedirect() = 0;
105 virtual void dispatchWillPerformClientRedirect(const KURL&, double inter val, double fireDate) = 0;
106 virtual void dispatchDidChangeLocationWithinPage() = 0;
107 virtual void dispatchWillClose() = 0;
108 virtual void dispatchDidReceiveIcon() = 0;
109 virtual void dispatchDidStartProvisionalLoad() = 0;
110 virtual void dispatchDidReceiveTitle(const String& title) = 0;
111 virtual void dispatchDidCommitLoad() = 0;
112 virtual void dispatchDidFailProvisionalLoad(const ResourceError&) = 0;
113 virtual void dispatchDidFailLoad(const ResourceError&) = 0;
114 virtual void dispatchDidFinishDocumentLoad() = 0;
115 virtual void dispatchDidFinishLoad() = 0;
116 virtual void dispatchDidFirstLayout() = 0;
117
118 virtual Frame* dispatchCreatePage() = 0;
119 virtual void dispatchShow() = 0;
120
121 virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String& MIMEType, const ResourceRequest&) = 0;
122 virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const S tring& frameName) = 0;
123 virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction , const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>) = 0;
124 virtual void cancelPolicyCheck() = 0;
125
126 virtual void dispatchUnableToImplementPolicy(const ResourceError&) = 0;
127
128 virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<Form State>) = 0;
129
130 virtual void dispatchDidLoadMainResource(DocumentLoader*) = 0;
131 virtual void revertToProvisionalState(DocumentLoader*) = 0;
132 virtual void setMainDocumentError(DocumentLoader*, const ResourceError&) = 0;
133
134 // Maybe these should go into a ProgressTrackerClient some day
135 virtual void willChangeEstimatedProgress() { }
136 virtual void didChangeEstimatedProgress() { }
137 virtual void postProgressStartedNotification() = 0;
138 virtual void postProgressEstimateChangedNotification() = 0;
139 virtual void postProgressFinishedNotification() = 0;
140
141 virtual void setMainFrameDocumentReady(bool) = 0;
142
143 virtual void startDownload(const ResourceRequest&) = 0;
144
145 virtual void willChangeTitle(DocumentLoader*) = 0;
146 virtual void didChangeTitle(DocumentLoader*) = 0;
147
148 virtual void committedLoad(DocumentLoader*, const char*, int) = 0;
149 virtual void finishedLoading(DocumentLoader*) = 0;
150
151 virtual void updateGlobalHistory(const KURL&) = 0;
152 virtual bool shouldGoToHistoryItem(HistoryItem*) const = 0;
153
154 virtual ResourceError cancelledError(const ResourceRequest&) = 0;
155 virtual ResourceError blockedError(const ResourceRequest&) = 0;
156 virtual ResourceError cannotShowURLError(const ResourceRequest&) = 0;
157 virtual ResourceError interruptForPolicyChangeError(const ResourceReques t&) = 0;
158
159 virtual ResourceError cannotShowMIMETypeError(const ResourceResponse&) = 0;
160 virtual ResourceError fileDoesNotExistError(const ResourceResponse&) = 0 ;
161 virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&) = 0;
162
163 virtual bool shouldFallBack(const ResourceError&) = 0;
164
165 virtual bool canHandleRequest(const ResourceRequest&) const = 0;
166 virtual bool canShowMIMEType(const String& MIMEType) const = 0;
167 virtual bool representationExistsForURLScheme(const String& URLScheme) c onst = 0;
168 virtual String generatedMIMETypeForURLScheme(const String& URLScheme) co nst = 0;
169
170 virtual void frameLoadCompleted() = 0;
171 virtual void saveViewStateToItem(HistoryItem*) = 0;
172 virtual void restoreViewState() = 0;
173 virtual void provisionalLoadStarted() = 0;
174 virtual void didFinishLoad() = 0;
175 virtual void prepareForDataSourceReplacement() = 0;
176
177 virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRe quest&, const SubstituteData&) = 0;
178 virtual void setTitle(const String& title, const KURL&) = 0;
179
180 virtual String userAgent(const KURL&) = 0;
181
182 virtual void savePlatformDataToCachedPage(CachedPage*) = 0;
183 virtual void transitionToCommittedFromCachedPage(CachedPage*) = 0;
184 virtual void transitionToCommittedForNewPage() = 0;
185
186 virtual bool canCachePage() const = 0;
187 virtual void download(ResourceHandle*, const ResourceRequest&, const Res ourceRequest&, const ResourceResponse&) = 0;
188
189 virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& nam e, HTMLFrameOwnerElement* ownerElement,
190 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0;
191 virtual Widget* createPlugin(const IntSize&, Element*, const KURL&, cons t Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
192 virtual void redirectDataToPlugin(Widget* pluginWidget) = 0;
193
194 virtual Widget* createJavaAppletWidget(const IntSize&, Element*, const K URL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValue s) = 0;
195
196 virtual ObjectContentType objectContentType(const KURL& url, const Strin g& mimeType) = 0;
197 virtual String overrideMediaType() const = 0;
198
199 virtual void windowObjectCleared() = 0;
200 virtual void didPerformFirstNavigation() const = 0; // "Navigation" here means a transition from one page to another that ends up in the back/forward li st.
201
202 virtual void registerForIconNotification(bool listen = true) = 0;
203
204 virtual void unloadListenerChanged() = 0;
205
206 #if PLATFORM(MAC)
207 #if ENABLE(MAC_JAVA_BRIDGE)
208 virtual jobject javaApplet(NSView*) { return 0; }
209 #endif
210 virtual NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long identifier, NSCachedURLResponse*) const = 0;
211 #endif
212 };
213
214 } // namespace WebCore
215
216 #endif // FrameLoaderClient_h
OLDNEW
« no previous file with comments | « webkit/pending/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698