OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 request.setSkipServiceWorker(frameLoadType == FrameLoadTypeReloadBypassingCa
che ? WebURLRequest::SkipServiceWorker::All : WebURLRequest::SkipServiceWorker::
None); | 162 request.setSkipServiceWorker(frameLoadType == FrameLoadTypeReloadBypassingCa
che ? WebURLRequest::SkipServiceWorker::All : WebURLRequest::SkipServiceWorker::
None); |
163 return request; | 163 return request; |
164 } | 164 } |
165 | 165 |
166 FrameLoader::FrameLoader(LocalFrame* frame) | 166 FrameLoader::FrameLoader(LocalFrame* frame) |
167 : m_frame(frame) | 167 : m_frame(frame) |
168 , m_progressTracker(ProgressTracker::create(frame)) | 168 , m_progressTracker(ProgressTracker::create(frame)) |
169 , m_loadType(FrameLoadTypeStandard) | 169 , m_loadType(FrameLoadTypeStandard) |
170 , m_inStopAllLoaders(false) | 170 , m_inStopAllLoaders(false) |
171 , m_checkTimer(this, &FrameLoader::checkTimerFired) | 171 , m_checkTimer(this, &FrameLoader::checkTimerFired) |
172 , m_didAccessInitialDocument(false) | 172 , m_hasAccessedInitialDocument(false) |
173 , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocume
ntTimerFired) | 173 , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocume
ntTimerFired) |
174 , m_forcedSandboxFlags(SandboxNone) | 174 , m_forcedSandboxFlags(SandboxNone) |
175 , m_dispatchingDidClearWindowObjectInMainWorld(false) | 175 , m_dispatchingDidClearWindowObjectInMainWorld(false) |
176 , m_protectProvisionalLoader(false) | 176 , m_protectProvisionalLoader(false) |
177 { | 177 { |
178 TRACE_EVENT_OBJECT_CREATED_WITH_ID("loading", "FrameLoader", this); | 178 TRACE_EVENT_OBJECT_CREATED_WITH_ID("loading", "FrameLoader", this); |
179 takeObjectSnapshot(); | 179 takeObjectSnapshot(); |
180 } | 180 } |
181 | 181 |
182 FrameLoader::~FrameLoader() | 182 FrameLoader::~FrameLoader() |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 if (!m_provisionalDocumentLoader && m_documentLoader && m_frame->isLoading()
) | 1052 if (!m_provisionalDocumentLoader && m_documentLoader && m_frame->isLoading()
) |
1053 loadFailed(m_documentLoader.get(), ResourceError::cancelledError(m_docum
entLoader->url())); | 1053 loadFailed(m_documentLoader.get(), ResourceError::cancelledError(m_docum
entLoader->url())); |
1054 | 1054 |
1055 m_inStopAllLoaders = false; | 1055 m_inStopAllLoaders = false; |
1056 takeObjectSnapshot(); | 1056 takeObjectSnapshot(); |
1057 } | 1057 } |
1058 | 1058 |
1059 void FrameLoader::didAccessInitialDocument() | 1059 void FrameLoader::didAccessInitialDocument() |
1060 { | 1060 { |
1061 // We only need to notify the client once, and only for the main frame. | 1061 // We only need to notify the client once, and only for the main frame. |
1062 if (isLoadingMainFrame() && !m_didAccessInitialDocument) { | 1062 if (isLoadingMainFrame() && !m_hasAccessedInitialDocument) { |
1063 m_didAccessInitialDocument = true; | 1063 m_hasAccessedInitialDocument = true; |
1064 // Notify asynchronously, since this is called within a JavaScript secur
ity check. | 1064 // Notify asynchronously, since this is called within a JavaScript secur
ity check. |
1065 m_didAccessInitialDocumentTimer.startOneShot(0, BLINK_FROM_HERE); | 1065 m_didAccessInitialDocumentTimer.startOneShot(0, BLINK_FROM_HERE); |
1066 } | 1066 } |
1067 } | 1067 } |
1068 | 1068 |
1069 void FrameLoader::didAccessInitialDocumentTimerFired(Timer<FrameLoader>*) | 1069 void FrameLoader::didAccessInitialDocumentTimerFired(Timer<FrameLoader>*) |
1070 { | 1070 { |
1071 if (client()) | 1071 if (client()) |
1072 client()->didAccessInitialDocument(); | 1072 client()->didAccessInitialDocument(); |
1073 } | 1073 } |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1613 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1613 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
1614 return tracedValue; | 1614 return tracedValue; |
1615 } | 1615 } |
1616 | 1616 |
1617 inline void FrameLoader::takeObjectSnapshot() const | 1617 inline void FrameLoader::takeObjectSnapshot() const |
1618 { | 1618 { |
1619 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1619 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
1620 } | 1620 } |
1621 | 1621 |
1622 } // namespace blink | 1622 } // namespace blink |
OLD | NEW |