| OLD | NEW |
| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 bool shouldClose(); | 165 bool shouldClose(); |
| 166 void dispatchUnloadEvent(); | 166 void dispatchUnloadEvent(); |
| 167 | 167 |
| 168 bool allowPlugins(ReasonForCallingAllowPlugins); | 168 bool allowPlugins(ReasonForCallingAllowPlugins); |
| 169 | 169 |
| 170 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour
ce, PassRefPtr<SerializedScriptValue>, HistoryScrollRestorationType, FrameLoadTy
pe); | 170 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour
ce, PassRefPtr<SerializedScriptValue>, HistoryScrollRestorationType, FrameLoadTy
pe); |
| 171 | 171 |
| 172 HistoryItem* currentItem() const { return m_currentItem.get(); } | 172 HistoryItem* currentItem() const { return m_currentItem.get(); } |
| 173 void saveScrollState(); | 173 void saveScrollState(); |
| 174 void clearScrollPositionAndViewState(); | |
| 175 | 174 |
| 176 void restoreScrollPositionAndViewState(); | 175 void restoreScrollPositionAndViewState(); |
| 177 | 176 |
| 178 DECLARE_TRACE(); | 177 DECLARE_TRACE(); |
| 179 | 178 |
| 180 private: | 179 private: |
| 181 void checkTimerFired(Timer<FrameLoader>*); | 180 void checkTimerFired(Timer<FrameLoader>*); |
| 182 void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*); | 181 void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*); |
| 183 | 182 |
| 184 bool prepareRequestForThisFrame(FrameLoadRequest&); | 183 bool prepareRequestForThisFrame(FrameLoadRequest&); |
| 185 static void setReferrerForFrameRequest(ResourceRequest&, ShouldSendReferrer,
Document*); | 184 static void setReferrerForFrameRequest(ResourceRequest&, ShouldSendReferrer,
Document*); |
| 186 FrameLoadType determineFrameLoadType(const FrameLoadRequest&); | 185 FrameLoadType determineFrameLoadType(const FrameLoadRequest&); |
| 187 | 186 |
| 188 SubstituteData defaultSubstituteDataForURL(const KURL&); | 187 SubstituteData defaultSubstituteDataForURL(const KURL&); |
| 189 | 188 |
| 190 bool shouldPerformFragmentNavigation(bool isFormSubmission, const String& ht
tpMethod, FrameLoadType, const KURL&); | 189 bool shouldPerformFragmentNavigation(bool isFormSubmission, const String& ht
tpMethod, FrameLoadType, const KURL&); |
| 191 void scrollToFragmentWithParentBoundary(const KURL&); | 190 void scrollToFragmentWithParentBoundary(const KURL&); |
| 192 | 191 |
| 193 void startLoad(FrameLoadRequest&, FrameLoadType, NavigationPolicy); | 192 void startLoad(FrameLoadRequest&, FrameLoadType, NavigationPolicy); |
| 194 | 193 |
| 195 | 194 enum class HistoryNavigationType { |
| 196 void setHistoryItemStateForCommit(HistoryCommitType, bool isPushOrReplaceSta
te = false, HistoryScrollRestorationType = ScrollRestorationAuto, PassRefPtr<Ser
ializedScriptValue> = nullptr); | 195 DifferentDocument, |
| 196 Fragment, |
| 197 HistoryApi |
| 198 }; |
| 199 void setHistoryItemStateForCommit(HistoryCommitType, HistoryNavigationType); |
| 197 | 200 |
| 198 void loadInSameDocument(const KURL&, PassRefPtr<SerializedScriptValue> state
Object, FrameLoadType, ClientRedirectPolicy); | 201 void loadInSameDocument(const KURL&, PassRefPtr<SerializedScriptValue> state
Object, FrameLoadType, ClientRedirectPolicy); |
| 199 | 202 |
| 200 void scheduleCheckCompleted(); | 203 void scheduleCheckCompleted(); |
| 201 | 204 |
| 202 RawPtrWillBeMember<LocalFrame> m_frame; | 205 RawPtrWillBeMember<LocalFrame> m_frame; |
| 203 | 206 |
| 204 // FIXME: These should be OwnPtr<T> to reduce build times and simplify | 207 // FIXME: These should be OwnPtr<T> to reduce build times and simplify |
| 205 // header dependencies unless performance testing proves otherwise. | 208 // header dependencies unless performance testing proves otherwise. |
| 206 // Some of these could be lazily created for memory savings on devices. | 209 // Some of these could be lazily created for memory savings on devices. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 Timer<FrameLoader> m_didAccessInitialDocumentTimer; | 258 Timer<FrameLoader> m_didAccessInitialDocumentTimer; |
| 256 | 259 |
| 257 SandboxFlags m_forcedSandboxFlags; | 260 SandboxFlags m_forcedSandboxFlags; |
| 258 | 261 |
| 259 bool m_dispatchingDidClearWindowObjectInMainWorld; | 262 bool m_dispatchingDidClearWindowObjectInMainWorld; |
| 260 }; | 263 }; |
| 261 | 264 |
| 262 } // namespace blink | 265 } // namespace blink |
| 263 | 266 |
| 264 #endif // FrameLoader_h | 267 #endif // FrameLoader_h |
| OLD | NEW |