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

Side by Side Diff: Source/core/loader/FrameLoader.h

Issue 28983004: Split the frame tree logic out of HistoryItem (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
4 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
5 * Copyright (C) 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2011 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 class FrameLoader { 75 class FrameLoader {
76 WTF_MAKE_NONCOPYABLE(FrameLoader); 76 WTF_MAKE_NONCOPYABLE(FrameLoader);
77 public: 77 public:
78 FrameLoader(Frame*, FrameLoaderClient*); 78 FrameLoader(Frame*, FrameLoaderClient*);
79 ~FrameLoader(); 79 ~FrameLoader();
80 80
81 void init(); 81 void init();
82 82
83 Frame* frame() const { return m_frame; } 83 Frame* frame() const { return m_frame; }
84 84
85 HistoryController* history() const { return &m_history; } 85 HistoryController* history() const { return m_history; }
86 86
87 IconController* icon() const { return m_icon.get(); } 87 IconController* icon() const { return m_icon.get(); }
88 MixedContentChecker* mixedContentChecker() const { return &m_mixedContentChe cker; } 88 MixedContentChecker* mixedContentChecker() const { return &m_mixedContentChe cker; }
89 89
90 void prepareForHistoryNavigation(); 90 void prepareForHistoryNavigation();
91 91
92 // These functions start a load. All eventually call into loadWithNavigation Action() or loadInSameDocument(). 92 // These functions start a load. All eventually call into loadWithNavigation Action() or loadInSameDocument().
93 void load(const FrameLoadRequest&); // The entry point for non-reload, non-h istory loads. 93 void load(const FrameLoadRequest&); // The entry point for non-reload, non-h istory loads.
94 void reload(ReloadPolicy = NormalReload, const KURL& overrideURL = KURL(), c onst String& overrideEncoding = String()); 94 void reload(ReloadPolicy = NormalReload, const KURL& overrideURL = KURL(), c onst String& overrideEncoding = String());
95 void loadHistoryItem(HistoryItem*); // The entry point for all back/forward loads 95 void loadHistoryItem(HistoryItem*, HistoryLoadType = HistoryDifferentDocumen tLoad); // The entry point for all back/forward loads
96 96
97 static void reportLocalLoadFailed(Frame*, const String& url); 97 static void reportLocalLoadFailed(Frame*, const String& url);
98 98
99 // FIXME: These are all functions which stop loads. We have too many. 99 // FIXME: These are all functions which stop loads. We have too many.
100 // Warning: stopAllLoaders can and will detach the Frame out from under you. All callers need to either protect the Frame 100 // Warning: stopAllLoaders can and will detach the Frame out from under you. All callers need to either protect the Frame
101 // or guarantee they won't in any way access the Frame after stopAllLoaders returns. 101 // or guarantee they won't in any way access the Frame after stopAllLoaders returns.
102 void stopAllLoaders(); 102 void stopAllLoaders();
103 void stopLoading(); 103 void stopLoading();
104 bool closeURL(); 104 bool closeURL();
105 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions. 105 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions.
(...skipping 22 matching lines...) Expand all
128 FrameState state() const { return m_state; } 128 FrameState state() const { return m_state; }
129 FetchContext& fetchContext() const { return *m_fetchContext; } 129 FetchContext& fetchContext() const { return *m_fetchContext; }
130 130
131 const ResourceRequest& originalRequest() const; 131 const ResourceRequest& originalRequest() const;
132 void receivedMainResourceError(const ResourceError&); 132 void receivedMainResourceError(const ResourceError&);
133 133
134 bool isLoadingMainFrame() const; 134 bool isLoadingMainFrame() const;
135 135
136 bool subframeIsLoading() const; 136 bool subframeIsLoading() const;
137 137
138 bool shouldTreatURLAsSameAsCurrent(const KURL&) const;
138 bool shouldTreatURLAsSrcdocDocument(const KURL&) const; 139 bool shouldTreatURLAsSrcdocDocument(const KURL&) const;
139 140
140 FrameLoadType loadType() const; 141 FrameLoadType loadType() const;
141 void setLoadType(FrameLoadType loadType) { m_loadType = loadType; } 142 void setLoadType(FrameLoadType loadType) { m_loadType = loadType; }
142 143
143 CachePolicy subresourceCachePolicy() const; 144 CachePolicy subresourceCachePolicy() const;
144 145
145 void didFirstLayout(); 146 void didFirstLayout();
146 147
147 void checkLoadComplete(DocumentLoader*); 148 void checkLoadComplete(DocumentLoader*);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 FrameLoadType, PassRefPtr<FormState>, const SubstituteData&, const Strin g& overrideEncoding = String()); 246 FrameLoadType, PassRefPtr<FormState>, const SubstituteData&, const Strin g& overrideEncoding = String());
246 247
247 void detachChildren(); 248 void detachChildren();
248 void closeAndRemoveChild(Frame*); 249 void closeAndRemoveChild(Frame*);
249 250
250 void loadInSameDocument(const KURL&, PassRefPtr<SerializedScriptValue> state Object, bool isNewNavigation); 251 void loadInSameDocument(const KURL&, PassRefPtr<SerializedScriptValue> state Object, bool isNewNavigation);
251 252
252 void scheduleCheckCompleted(); 253 void scheduleCheckCompleted();
253 void startCheckCompleteTimer(); 254 void startCheckCompleteTimer();
254 255
255 bool shouldTreatURLAsSameAsCurrent(const KURL&) const;
256
257 Frame* m_frame; 256 Frame* m_frame;
258 FrameLoaderClient* m_client; 257 FrameLoaderClient* m_client;
259 258
259 HistoryController* m_history;
260
260 // FIXME: These should be OwnPtr<T> to reduce build times and simplify 261 // FIXME: These should be OwnPtr<T> to reduce build times and simplify
261 // header dependencies unless performance testing proves otherwise. 262 // header dependencies unless performance testing proves otherwise.
262 // Some of these could be lazily created for memory savings on devices. 263 // Some of these could be lazily created for memory savings on devices.
263 mutable HistoryController m_history;
264 mutable FrameLoaderStateMachine m_stateMachine; 264 mutable FrameLoaderStateMachine m_stateMachine;
265 OwnPtr<IconController> m_icon; 265 OwnPtr<IconController> m_icon;
266 mutable MixedContentChecker m_mixedContentChecker; 266 mutable MixedContentChecker m_mixedContentChecker;
267 267
268 class FrameProgressTracker; 268 class FrameProgressTracker;
269 OwnPtr<FrameProgressTracker> m_progressTracker; 269 OwnPtr<FrameProgressTracker> m_progressTracker;
270 270
271 FrameState m_state; 271 FrameState m_state;
272 FrameLoadType m_loadType; 272 FrameLoadType m_loadType;
273 273
(...skipping 25 matching lines...) Expand all
299 Timer<FrameLoader> m_didAccessInitialDocumentTimer; 299 Timer<FrameLoader> m_didAccessInitialDocumentTimer;
300 bool m_suppressOpenerInNewFrame; 300 bool m_suppressOpenerInNewFrame;
301 bool m_startingClientRedirect; 301 bool m_startingClientRedirect;
302 302
303 SandboxFlags m_forcedSandboxFlags; 303 SandboxFlags m_forcedSandboxFlags;
304 }; 304 };
305 305
306 } // namespace WebCore 306 } // namespace WebCore
307 307
308 #endif // FrameLoader_h 308 #endif // FrameLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698