author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 12 Mar 2010 15:46:37 +0200 | |
branch | RCL_3 |
changeset 5 | d3bac044e0f0 |
parent 3 | 41300fa6a67c |
child 30 | 5dc02b23752f |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
* Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
|
3 |
* Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
4 |
* Copyright (C) Research In Motion Limited 2009. All rights reserved. |
0 | 5 |
* |
6 |
* Redistribution and use in source and binary forms, with or without |
|
7 |
* modification, are permitted provided that the following conditions |
|
8 |
* are met: |
|
9 |
* |
|
10 |
* 1. Redistributions of source code must retain the above copyright |
|
11 |
* notice, this list of conditions and the following disclaimer. |
|
12 |
* 2. Redistributions in binary form must reproduce the above copyright |
|
13 |
* notice, this list of conditions and the following disclaimer in the |
|
14 |
* documentation and/or other materials provided with the distribution. |
|
15 |
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
|
16 |
* its contributors may be used to endorse or promote products derived |
|
17 |
* from this software without specific prior written permission. |
|
18 |
* |
|
19 |
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
|
20 |
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
21 |
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
22 |
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
|
23 |
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
24 |
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
25 |
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
26 |
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
27 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
|
28 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
29 |
*/ |
|
30 |
||
31 |
#ifndef FrameLoader_h |
|
32 |
#define FrameLoader_h |
|
33 |
||
34 |
#include "CachePolicy.h" |
|
35 |
#include "FrameLoaderTypes.h" |
|
36 |
#include "HistoryController.h" |
|
37 |
#include "PolicyCallback.h" |
|
38 |
#include "PolicyChecker.h" |
|
39 |
#include "RedirectScheduler.h" |
|
40 |
#include "ResourceLoadNotifier.h" |
|
41 |
#include "ResourceRequest.h" |
|
42 |
#include "ThreadableLoader.h" |
|
43 |
#include "Timer.h" |
|
44 |
#include <wtf/Forward.h> |
|
45 |
||
46 |
namespace WebCore { |
|
47 |
||
48 |
class Archive; |
|
49 |
class AuthenticationChallenge; |
|
50 |
class CachedFrameBase; |
|
51 |
class CachedPage; |
|
52 |
class CachedResource; |
|
53 |
class Document; |
|
54 |
class DocumentLoader; |
|
55 |
class Event; |
|
56 |
class FormData; |
|
57 |
class FormState; |
|
58 |
class Frame; |
|
59 |
class FrameLoaderClient; |
|
60 |
class HistoryItem; |
|
61 |
class HTMLAppletElement; |
|
62 |
class HTMLFormElement; |
|
63 |
class HTMLFrameOwnerElement; |
|
64 |
class IconLoader; |
|
65 |
class IntSize; |
|
66 |
class NavigationAction; |
|
67 |
class RenderPart; |
|
68 |
class ResourceError; |
|
69 |
class ResourceLoader; |
|
70 |
class ResourceResponse; |
|
71 |
class ScriptSourceCode; |
|
72 |
class ScriptString; |
|
73 |
class ScriptValue; |
|
74 |
class SecurityOrigin; |
|
75 |
class SharedBuffer; |
|
76 |
class SubstituteData; |
|
77 |
class TextResourceDecoder; |
|
78 |
class Widget; |
|
79 |
||
80 |
struct FrameLoadRequest; |
|
81 |
struct WindowFeatures; |
|
82 |
||
83 |
bool isBackForwardLoadType(FrameLoadType); |
|
84 |
||
85 |
class FrameLoader : public Noncopyable { |
|
86 |
public: |
|
87 |
FrameLoader(Frame*, FrameLoaderClient*); |
|
88 |
~FrameLoader(); |
|
89 |
||
90 |
void init(); |
|
91 |
||
92 |
Frame* frame() const { return m_frame; } |
|
93 |
||
94 |
PolicyChecker* policyChecker() const { return &m_policyChecker; } |
|
95 |
HistoryController* history() const { return &m_history; } |
|
96 |
ResourceLoadNotifier* notifier() const { return &m_notifer; } |
|
97 |
||
98 |
// FIXME: This is not cool, people. There are too many different functions that all start loads. |
|
99 |
// We should aim to consolidate these into a smaller set of functions, and try to reuse more of |
|
100 |
// the logic by extracting common code paths. |
|
101 |
||
102 |
void prepareForLoadStart(); |
|
103 |
void setupForReplace(); |
|
104 |
void setupForReplaceByMIMEType(const String& newMIMEType); |
|
105 |
||
106 |
void loadURLIntoChildFrame(const KURL&, const String& referer, Frame*); |
|
107 |
||
108 |
void loadFrameRequest(const FrameLoadRequest&, bool lockHistory, bool lockBackForwardList, // Called by submitForm, calls loadPostRequest and loadURL. |
|
109 |
PassRefPtr<Event>, PassRefPtr<FormState>, ReferrerPolicy); |
|
110 |
||
111 |
void load(const ResourceRequest&, bool lockHistory); // Called by WebFrame, calls load(ResourceRequest, SubstituteData). |
|
112 |
void load(const ResourceRequest&, const SubstituteData&, bool lockHistory); // Called both by WebFrame and internally, calls load(DocumentLoader*). |
|
113 |
void load(const ResourceRequest&, const String& frameName, bool lockHistory); // Called by WebPluginController. |
|
114 |
||
115 |
void loadArchive(PassRefPtr<Archive>); |
|
116 |
||
117 |
static void reportLocalLoadFailed(Frame*, const String& url); |
|
118 |
||
119 |
// Called by createWindow in JSDOMWindowBase.cpp, e.g. to fulfill a modal dialog creation |
|
120 |
Frame* createWindow(FrameLoader* frameLoaderForFrameLookup, const FrameLoadRequest&, const WindowFeatures&, bool& created); |
|
121 |
||
122 |
unsigned long loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data); |
|
123 |
||
124 |
bool canHandleRequest(const ResourceRequest&); |
|
125 |
||
126 |
// Also not cool. |
|
127 |
void stopAllLoaders(DatabasePolicy = DatabasePolicyStop); |
|
128 |
void stopForUserCancel(bool deferCheckLoadComplete = false); |
|
129 |
||
130 |
bool isLoadingMainResource() const { return m_isLoadingMainResource; } |
|
131 |
bool isLoading() const; |
|
132 |
bool frameHasLoaded() const; |
|
133 |
||
134 |
int numPendingOrLoadingRequests(bool recurse) const; |
|
135 |
String referrer() const; |
|
136 |
String outgoingReferrer() const; |
|
137 |
String outgoingOrigin() const; |
|
138 |
||
139 |
DocumentLoader* activeDocumentLoader() const; |
|
140 |
DocumentLoader* documentLoader() const { return m_documentLoader.get(); } |
|
141 |
DocumentLoader* policyDocumentLoader() const { return m_policyDocumentLoader.get(); } |
|
142 |
DocumentLoader* provisionalDocumentLoader() const { return m_provisionalDocumentLoader.get(); } |
|
143 |
FrameState state() const { return m_state; } |
|
144 |
static double timeOfLastCompletedLoad(); |
|
145 |
||
146 |
bool shouldUseCredentialStorage(ResourceLoader*); |
|
147 |
const ResourceRequest& originalRequest() const; |
|
148 |
const ResourceRequest& initialRequest() const; |
|
149 |
void receivedMainResourceError(const ResourceError&, bool isComplete); |
|
150 |
void receivedData(const char*, int); |
|
151 |
||
152 |
bool willLoadMediaElementURL(KURL&); |
|
153 |
||
154 |
void handleFallbackContent(); |
|
155 |
bool isStopping() const; |
|
156 |
||
157 |
void finishedLoading(); |
|
158 |
||
159 |
ResourceError cancelledError(const ResourceRequest&) const; |
|
160 |
ResourceError fileDoesNotExistError(const ResourceResponse&) const; |
|
161 |
ResourceError blockedError(const ResourceRequest&) const; |
|
162 |
ResourceError cannotShowURLError(const ResourceRequest&) const; |
|
163 |
ResourceError interruptionForPolicyChangeError(const ResourceRequest&); |
|
164 |
||
165 |
bool isHostedByObjectElement() const; |
|
166 |
bool isLoadingMainFrame() const; |
|
167 |
bool canShowMIMEType(const String& MIMEType) const; |
|
168 |
bool representationExistsForURLScheme(const String& URLScheme); |
|
169 |
String generatedMIMETypeForURLScheme(const String& URLScheme); |
|
170 |
||
171 |
void reload(bool endToEndReload = false); |
|
172 |
void reloadWithOverrideEncoding(const String& overrideEncoding); |
|
173 |
||
174 |
void didReceiveServerRedirectForProvisionalLoadForFrame(); |
|
175 |
void finishedLoadingDocument(DocumentLoader*); |
|
176 |
void committedLoad(DocumentLoader*, const char*, int); |
|
177 |
bool isReplacing() const; |
|
178 |
void setReplacing(); |
|
179 |
void revertToProvisional(DocumentLoader*); |
|
180 |
void setMainDocumentError(DocumentLoader*, const ResourceError&); |
|
181 |
void mainReceivedCompleteError(DocumentLoader*, const ResourceError&); |
|
182 |
bool subframeIsLoading() const; |
|
183 |
void willChangeTitle(DocumentLoader*); |
|
184 |
void didChangeTitle(DocumentLoader*); |
|
185 |
||
186 |
FrameLoadType loadType() const; |
|
187 |
CachePolicy subresourceCachePolicy() const; |
|
188 |
||
189 |
void didFirstLayout(); |
|
190 |
bool firstLayoutDone() const; |
|
191 |
||
192 |
void didFirstVisuallyNonEmptyLayout(); |
|
193 |
||
194 |
void loadedResourceFromMemoryCache(const CachedResource*); |
|
195 |
void tellClientAboutPastMemoryCacheLoads(); |
|
196 |
||
197 |
void checkLoadComplete(); |
|
198 |
void detachFromParent(); |
|
199 |
void detachViewsAndDocumentLoader(); |
|
200 |
||
201 |
void addExtraFieldsToSubresourceRequest(ResourceRequest&); |
|
202 |
void addExtraFieldsToMainResourceRequest(ResourceRequest&); |
|
203 |
||
204 |
static void addHTTPOriginIfNeeded(ResourceRequest&, String origin); |
|
205 |
||
206 |
FrameLoaderClient* client() const { return m_client; } |
|
207 |
||
208 |
void setDefersLoading(bool); |
|
209 |
||
210 |
void changeLocation(const KURL&, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true, bool userGesture = false, bool refresh = false); |
|
211 |
void urlSelected(const ResourceRequest&, const String& target, PassRefPtr<Event>, bool lockHistory, bool lockBackForwardList, bool userGesture, ReferrerPolicy); |
|
212 |
bool requestFrame(HTMLFrameOwnerElement*, const String& url, const AtomicString& frameName); |
|
213 |
||
214 |
void submitForm(const char* action, const String& url, |
|
215 |
PassRefPtr<FormData>, const String& target, const String& contentType, const String& boundary, |
|
216 |
bool lockHistory, PassRefPtr<Event>, PassRefPtr<FormState>); |
|
217 |
||
218 |
void stop(); |
|
219 |
void stopLoading(UnloadEventPolicy, DatabasePolicy = DatabasePolicyStop); |
|
220 |
bool closeURL(); |
|
221 |
||
222 |
void didExplicitOpen(); |
|
223 |
||
224 |
KURL iconURL(); |
|
225 |
void commitIconURLToIconDatabase(const KURL&); |
|
226 |
||
227 |
KURL baseURL() const; |
|
228 |
||
229 |
void replaceDocument(const String&); |
|
230 |
||
231 |
void begin(); |
|
232 |
void begin(const KURL&, bool dispatchWindowObjectAvailable = true, SecurityOrigin* forcedSecurityOrigin = 0); |
|
233 |
||
234 |
void write(const char* string, int length = -1, bool flush = false); |
|
235 |
void write(const String&); |
|
236 |
void end(); |
|
237 |
void endIfNotLoadingMainResource(); |
|
238 |
||
239 |
void setEncoding(const String& encoding, bool userChosen); |
|
240 |
String encoding() const; |
|
241 |
||
242 |
void tokenizerProcessedData(); |
|
243 |
||
244 |
void handledOnloadEvents(); |
|
245 |
String userAgent(const KURL&) const; |
|
246 |
||
247 |
PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const HashMap<String, String>& args); |
|
248 |
||
249 |
void dispatchWindowObjectAvailable(); |
|
250 |
void dispatchDocumentElementAvailable(); |
|
251 |
||
252 |
// Mixed content related functions. |
|
253 |
static bool isMixedContent(SecurityOrigin* context, const KURL&); |
|
254 |
void checkIfDisplayInsecureContent(SecurityOrigin* context, const KURL&); |
|
255 |
void checkIfRunInsecureContent(SecurityOrigin* context, const KURL&); |
|
256 |
||
257 |
Frame* opener(); |
|
258 |
void setOpener(Frame*); |
|
259 |
||
260 |
bool isProcessingUserGesture(); |
|
261 |
||
262 |
void resetMultipleFormSubmissionProtection(); |
|
263 |
||
264 |
void addData(const char* bytes, int length); |
|
265 |
||
266 |
void checkCallImplicitClose(); |
|
267 |
||
268 |
void frameDetached(); |
|
269 |
||
270 |
const KURL& url() const { return m_URL; } |
|
271 |
||
272 |
void setResponseMIMEType(const String&); |
|
273 |
const String& responseMIMEType() const; |
|
274 |
||
275 |
bool containsPlugins() const; |
|
276 |
||
277 |
void loadDone(); |
|
278 |
void finishedParsing(); |
|
279 |
void checkCompleted(); |
|
280 |
||
281 |
void checkDidPerformFirstNavigation(); |
|
282 |
||
283 |
bool isComplete() const; |
|
284 |
||
285 |
bool requestObject(RenderPart* frame, const String& url, const AtomicString& frameName, |
|
286 |
const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues); |
|
287 |
||
288 |
KURL completeURL(const String& url); |
|
289 |
||
290 |
void cancelAndClear(); |
|
291 |
||
292 |
void setTitle(const String&); |
|
293 |
||
294 |
void commitProvisionalLoad(PassRefPtr<CachedPage>); |
|
295 |
bool isLoadingFromCachedPage() const { return m_loadingFromCachedPage; } |
|
296 |
||
297 |
bool committingFirstRealLoad() const { return !m_creatingInitialEmptyDocument && !m_committedFirstRealDocumentLoad; } |
|
298 |
bool committedFirstRealDocumentLoad() const { return m_committedFirstRealDocumentLoad; } |
|
299 |
bool creatingInitialEmptyDocument() const { return m_creatingInitialEmptyDocument; } |
|
300 |
||
301 |
void iconLoadDecisionAvailable(); |
|
302 |
||
303 |
bool shouldAllowNavigation(Frame* targetFrame) const; |
|
304 |
Frame* findFrameForNavigation(const AtomicString& name); |
|
305 |
||
306 |
void startIconLoader(); |
|
307 |
||
308 |
void applyUserAgent(ResourceRequest& request); |
|
309 |
||
310 |
bool shouldInterruptLoadForXFrameOptions(const String&, const KURL&); |
|
311 |
||
312 |
void open(CachedFrameBase&); |
|
313 |
||
314 |
// FIXME: Should these really be public? |
|
315 |
void completed(); |
|
316 |
bool allAncestorsAreComplete() const; // including this |
|
317 |
bool allChildrenAreComplete() const; // immediate children, not all descendants |
|
318 |
void clientRedirected(const KURL&, double delay, double fireDate, bool lockBackForwardList); |
|
319 |
void clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress); |
|
320 |
void loadItem(HistoryItem*, FrameLoadType); |
|
321 |
||
322 |
// FIXME: This is public because this asynchronous callback from the FrameLoaderClient |
|
323 |
// uses the policy machinery (and therefore is called via the PolicyChecker). Once we |
|
324 |
// introduce a proper callback type for this function, we should make it private again. |
|
325 |
void continueLoadAfterWillSubmitForm(); |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
326 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
327 |
bool suppressOpenerInNewFrame() const { return m_suppressOpenerInNewFrame; } |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
328 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
329 |
static ObjectContentType defaultObjectContentType(const KURL& url, const String& mimeType); |
0 | 330 |
|
331 |
private: |
|
332 |
bool canCachePageContainingThisFrame(); |
|
333 |
#ifndef NDEBUG |
|
334 |
void logCanCachePageDecision(); |
|
335 |
bool logCanCacheFrameDecision(int indentLevel); |
|
336 |
#endif |
|
337 |
||
338 |
void checkTimerFired(Timer<FrameLoader>*); |
|
339 |
||
340 |
void started(); |
|
341 |
||
342 |
bool shouldUsePlugin(const KURL&, const String& mimeType, bool hasFallback, bool& useFallback); |
|
343 |
bool loadPlugin(RenderPart*, const KURL&, const String& mimeType, |
|
344 |
const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback); |
|
345 |
||
346 |
bool loadProvisionalItemFromCachedPage(); |
|
347 |
void cachePageForHistoryItem(HistoryItem*); |
|
348 |
void pageHidden(); |
|
349 |
||
350 |
void receivedFirstData(); |
|
351 |
||
352 |
void updateFirstPartyForCookies(); |
|
353 |
void setFirstPartyForCookies(const KURL&); |
|
354 |
||
355 |
void addExtraFieldsToRequest(ResourceRequest&, FrameLoadType loadType, bool isMainResource, bool cookiePolicyURLFromRequest); |
|
356 |
||
357 |
// Also not cool. |
|
358 |
void stopLoadingSubframes(); |
|
359 |
||
360 |
void clearProvisionalLoad(); |
|
361 |
void markLoadComplete(); |
|
362 |
void transitionToCommitted(PassRefPtr<CachedPage>); |
|
363 |
void frameLoadCompleted(); |
|
364 |
||
365 |
void mainReceivedError(const ResourceError&, bool isComplete); |
|
366 |
||
367 |
void setLoadType(FrameLoadType); |
|
368 |
||
369 |
static void callContinueLoadAfterNavigationPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue); |
|
370 |
static void callContinueLoadAfterNewWindowPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, bool shouldContinue); |
|
371 |
static void callContinueFragmentScrollAfterNavigationPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue); |
|
372 |
||
373 |
void continueLoadAfterNavigationPolicy(const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue); |
|
374 |
void continueLoadAfterNewWindowPolicy(const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, bool shouldContinue); |
|
375 |
void continueFragmentScrollAfterNavigationPolicy(const ResourceRequest&, bool shouldContinue); |
|
376 |
||
377 |
bool shouldScrollToAnchor(bool isFormSubmission, FrameLoadType, const KURL&); |
|
378 |
||
379 |
void checkLoadCompleteForThisFrame(); |
|
380 |
||
381 |
void setDocumentLoader(DocumentLoader*); |
|
382 |
void setPolicyDocumentLoader(DocumentLoader*); |
|
383 |
void setProvisionalDocumentLoader(DocumentLoader*); |
|
384 |
||
385 |
void setState(FrameState); |
|
386 |
||
387 |
void closeOldDataSources(); |
|
388 |
void open(CachedPage&); |
|
389 |
||
390 |
void updateHistoryAfterClientRedirect(); |
|
391 |
||
392 |
void clear(bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true); |
|
393 |
||
394 |
bool shouldReloadToHandleUnreachableURL(DocumentLoader*); |
|
395 |
||
396 |
void dispatchDidCommitLoad(); |
|
397 |
||
398 |
void loadWithDocumentLoader(DocumentLoader*, FrameLoadType, PassRefPtr<FormState>); // Calls continueLoadAfterNavigationPolicy |
|
399 |
void load(DocumentLoader*); // Calls loadWithDocumentLoader |
|
400 |
||
401 |
void loadWithNavigationAction(const ResourceRequest&, const NavigationAction&, // Calls loadWithDocumentLoader |
|
402 |
bool lockHistory, FrameLoadType, PassRefPtr<FormState>); |
|
403 |
||
404 |
void loadPostRequest(const ResourceRequest&, const String& referrer, // Called by loadFrameRequest, calls loadWithNavigationAction |
|
405 |
const String& frameName, bool lockHistory, FrameLoadType, PassRefPtr<Event>, PassRefPtr<FormState>); |
|
406 |
void loadURL(const KURL&, const String& referrer, const String& frameName, // Called by loadFrameRequest, calls loadWithNavigationAction or dispatches to navigation policy delegate |
|
407 |
bool lockHistory, FrameLoadType, PassRefPtr<Event>, PassRefPtr<FormState>); |
|
408 |
||
409 |
bool shouldReload(const KURL& currentURL, const KURL& destinationURL); |
|
410 |
||
411 |
void requestFromDelegate(ResourceRequest&, unsigned long& identifier, ResourceError&); |
|
412 |
||
413 |
void recursiveCheckLoadComplete(); |
|
414 |
||
415 |
void detachChildren(); |
|
416 |
void closeAndRemoveChild(Frame*); |
|
417 |
||
418 |
Frame* loadSubframe(HTMLFrameOwnerElement*, const KURL&, const String& name, const String& referrer); |
|
419 |
||
420 |
void scrollToAnchor(const KURL&); |
|
421 |
||
422 |
void provisionalLoadStarted(); |
|
423 |
||
424 |
bool canCachePage(); |
|
425 |
||
426 |
bool didOpenURL(const KURL&); |
|
427 |
||
428 |
void scheduleCheckCompleted(); |
|
429 |
void scheduleCheckLoadComplete(); |
|
430 |
void startCheckCompleteTimer(); |
|
431 |
||
432 |
KURL originalRequestURL() const; |
|
433 |
||
434 |
bool shouldTreatURLAsSameAsCurrent(const KURL&) const; |
|
435 |
||
436 |
Frame* m_frame; |
|
437 |
FrameLoaderClient* m_client; |
|
438 |
||
439 |
mutable PolicyChecker m_policyChecker; |
|
440 |
mutable HistoryController m_history; |
|
441 |
mutable ResourceLoadNotifier m_notifer; |
|
442 |
||
443 |
FrameState m_state; |
|
444 |
FrameLoadType m_loadType; |
|
445 |
||
446 |
// Document loaders for the three phases of frame loading. Note that while |
|
447 |
// a new request is being loaded, the old document loader may still be referenced. |
|
448 |
// E.g. while a new request is in the "policy" state, the old document loader may |
|
449 |
// be consulted in particular as it makes sense to imply certain settings on the new loader. |
|
450 |
RefPtr<DocumentLoader> m_documentLoader; |
|
451 |
RefPtr<DocumentLoader> m_provisionalDocumentLoader; |
|
452 |
RefPtr<DocumentLoader> m_policyDocumentLoader; |
|
453 |
||
454 |
bool m_delegateIsHandlingProvisionalLoadError; |
|
455 |
||
456 |
bool m_firstLayoutDone; |
|
457 |
bool m_quickRedirectComing; |
|
458 |
bool m_sentRedirectNotification; |
|
459 |
bool m_inStopAllLoaders; |
|
460 |
||
461 |
String m_outgoingReferrer; |
|
462 |
||
463 |
bool m_isExecutingJavaScriptFormAction; |
|
464 |
||
465 |
String m_responseMIMEType; |
|
466 |
||
467 |
bool m_didCallImplicitClose; |
|
468 |
bool m_wasUnloadEventEmitted; |
|
469 |
bool m_unloadEventBeingDispatched; |
|
470 |
bool m_isComplete; |
|
471 |
bool m_isLoadingMainResource; |
|
472 |
||
473 |
KURL m_URL; |
|
474 |
KURL m_workingURL; |
|
475 |
||
476 |
OwnPtr<IconLoader> m_iconLoader; |
|
477 |
bool m_mayLoadIconLater; |
|
478 |
||
479 |
bool m_cancellingWithLoadInProgress; |
|
480 |
||
481 |
bool m_needsClear; |
|
482 |
bool m_receivedData; |
|
483 |
||
484 |
bool m_encodingWasChosenByUser; |
|
485 |
String m_encoding; |
|
486 |
RefPtr<TextResourceDecoder> m_decoder; |
|
487 |
||
488 |
bool m_containsPlugIns; |
|
489 |
||
490 |
KURL m_submittedFormURL; |
|
491 |
||
492 |
Timer<FrameLoader> m_checkTimer; |
|
493 |
bool m_shouldCallCheckCompleted; |
|
494 |
bool m_shouldCallCheckLoadComplete; |
|
495 |
||
496 |
Frame* m_opener; |
|
497 |
HashSet<Frame*> m_openedFrames; |
|
498 |
||
499 |
bool m_creatingInitialEmptyDocument; |
|
500 |
bool m_isDisplayingInitialEmptyDocument; |
|
501 |
bool m_committedFirstRealDocumentLoad; |
|
502 |
||
503 |
bool m_didPerformFirstNavigation; |
|
504 |
bool m_loadingFromCachedPage; |
|
505 |
bool m_suppressOpenerInNewFrame; |
|
506 |
||
507 |
#ifndef NDEBUG |
|
508 |
bool m_didDispatchDidCommitLoad; |
|
509 |
#endif |
|
510 |
}; |
|
511 |
||
512 |
} // namespace WebCore |
|
513 |
||
514 |
#endif // FrameLoader_h |