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

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, 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
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 class FrameLoader { 74 class FrameLoader {
75 WTF_MAKE_NONCOPYABLE(FrameLoader); 75 WTF_MAKE_NONCOPYABLE(FrameLoader);
76 public: 76 public:
77 FrameLoader(Frame*, FrameLoaderClient*); 77 FrameLoader(Frame*, FrameLoaderClient*);
78 ~FrameLoader(); 78 ~FrameLoader();
79 79
80 void init(); 80 void init();
81 81
82 Frame* frame() const { return m_frame; } 82 Frame* frame() const { return m_frame; }
83 83
84 HistoryController* history() const { return &m_history; } 84 HistoryController* history() const { return m_history; }
85 85
86 IconController* icon() const { return m_icon.get(); } 86 IconController* icon() const { return m_icon.get(); }
87 MixedContentChecker* mixedContentChecker() const { return &m_mixedContentChe cker; } 87 MixedContentChecker* mixedContentChecker() const { return &m_mixedContentChe cker; }
88 88
89 void prepareForHistoryNavigation(); 89 void prepareForHistoryNavigation();
90 90
91 // These functions start a load. All eventually call into loadWithNavigation Action() or loadInSameDocument(). 91 // These functions start a load. All eventually call into loadWithNavigation Action() or loadInSameDocument().
92 void load(const FrameLoadRequest&); // The entry point for non-reload, non-h istory loads. 92 void load(const FrameLoadRequest&); // The entry point for non-reload, non-h istory loads.
93 void reload(ReloadPolicy = NormalReload, const KURL& overrideURL = KURL(), c onst String& overrideEncoding = String()); 93 void reload(ReloadPolicy = NormalReload, const KURL& overrideURL = KURL(), c onst String& overrideEncoding = String());
94 void loadHistoryItem(HistoryItem*); // The entry point for all back/forward loads 94 void loadHistoryItem(HistoryItem*); // The entry point for all back/forward loads
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 FrameState state() const { return m_state; } 127 FrameState state() const { return m_state; }
128 FetchContext& fetchContext() const { return *m_fetchContext; } 128 FetchContext& fetchContext() const { return *m_fetchContext; }
129 129
130 const ResourceRequest& originalRequest() const; 130 const ResourceRequest& originalRequest() const;
131 void receivedMainResourceError(const ResourceError&); 131 void receivedMainResourceError(const ResourceError&);
132 132
133 bool isLoadingMainFrame() const; 133 bool isLoadingMainFrame() const;
134 134
135 bool subframeIsLoading() const; 135 bool subframeIsLoading() const;
136 136
137 bool shouldTreatURLAsSameAsCurrent(const KURL&) const;
137 bool shouldTreatURLAsSrcdocDocument(const KURL&) const; 138 bool shouldTreatURLAsSrcdocDocument(const KURL&) const;
138 139
139 FrameLoadType loadType() const; 140 FrameLoadType loadType() const;
140 void setLoadType(FrameLoadType loadType) { m_loadType = loadType; } 141 void setLoadType(FrameLoadType loadType) { m_loadType = loadType; }
141 142
142 CachePolicy subresourceCachePolicy() const; 143 CachePolicy subresourceCachePolicy() const;
143 144
144 void didFirstLayout(); 145 void didFirstLayout();
145 146
146 void checkLoadComplete(DocumentLoader*); 147 void checkLoadComplete(DocumentLoader*);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 FrameLoadType, PassRefPtr<FormState>, const SubstituteData&, const Strin g& overrideEncoding = String()); 245 FrameLoadType, PassRefPtr<FormState>, const SubstituteData&, const Strin g& overrideEncoding = String());
245 246
246 void detachChildren(); 247 void detachChildren();
247 void closeAndRemoveChild(Frame*); 248 void closeAndRemoveChild(Frame*);
248 249
249 void loadInSameDocument(const KURL&, PassRefPtr<SerializedScriptValue> state Object, bool isNewNavigation); 250 void loadInSameDocument(const KURL&, PassRefPtr<SerializedScriptValue> state Object, bool isNewNavigation);
250 251
251 void scheduleCheckCompleted(); 252 void scheduleCheckCompleted();
252 void startCheckCompleteTimer(); 253 void startCheckCompleteTimer();
253 254
254 bool shouldTreatURLAsSameAsCurrent(const KURL&) const;
255
256 Frame* m_frame; 255 Frame* m_frame;
257 FrameLoaderClient* m_client; 256 FrameLoaderClient* m_client;
258 257
258 HistoryController* m_history;
259
259 // FIXME: These should be OwnPtr<T> to reduce build times and simplify 260 // FIXME: These should be OwnPtr<T> to reduce build times and simplify
260 // header dependencies unless performance testing proves otherwise. 261 // header dependencies unless performance testing proves otherwise.
261 // Some of these could be lazily created for memory savings on devices. 262 // Some of these could be lazily created for memory savings on devices.
262 mutable HistoryController m_history;
263 mutable FrameLoaderStateMachine m_stateMachine; 263 mutable FrameLoaderStateMachine m_stateMachine;
264 OwnPtr<IconController> m_icon; 264 OwnPtr<IconController> m_icon;
265 mutable MixedContentChecker m_mixedContentChecker; 265 mutable MixedContentChecker m_mixedContentChecker;
266 266
267 class FrameProgressTracker; 267 class FrameProgressTracker;
268 OwnPtr<FrameProgressTracker> m_progressTracker; 268 OwnPtr<FrameProgressTracker> m_progressTracker;
269 269
270 FrameState m_state; 270 FrameState m_state;
271 FrameLoadType m_loadType; 271 FrameLoadType m_loadType;
272 272
(...skipping 25 matching lines...) Expand all
298 Timer<FrameLoader> m_didAccessInitialDocumentTimer; 298 Timer<FrameLoader> m_didAccessInitialDocumentTimer;
299 bool m_suppressOpenerInNewFrame; 299 bool m_suppressOpenerInNewFrame;
300 bool m_startingClientRedirect; 300 bool m_startingClientRedirect;
301 301
302 SandboxFlags m_forcedSandboxFlags; 302 SandboxFlags m_forcedSandboxFlags;
303 }; 303 };
304 304
305 } // namespace WebCore 305 } // namespace WebCore
306 306
307 #endif // FrameLoader_h 307 #endif // FrameLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698