OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 m_lastNotifiedProgressValue = 0; | 97 m_lastNotifiedProgressValue = 0; |
98 m_lastNotifiedProgressTime = 0; | 98 m_lastNotifiedProgressTime = 0; |
99 m_finishedParsing = false; | 99 m_finishedParsing = false; |
100 } | 100 } |
101 | 101 |
102 LocalFrameClient* ProgressTracker::localFrameClient() const { | 102 LocalFrameClient* ProgressTracker::localFrameClient() const { |
103 return m_frame->client(); | 103 return m_frame->client(); |
104 } | 104 } |
105 | 105 |
106 void ProgressTracker::progressStarted(FrameLoadType type) { | 106 void ProgressTracker::progressStarted(FrameLoadType type) { |
107 if (!m_frame->isLoading()) | |
108 localFrameClient()->didStartLoading(NavigationToDifferentDocument); | |
109 reset(); | 107 reset(); |
110 m_progressValue = initialProgressValue; | 108 m_progressValue = initialProgressValue; |
111 m_frame->setIsLoading(true); | 109 if (!m_frame->isLoading()) { |
112 InspectorInstrumentation::frameStartedLoading(m_frame, type); | 110 localFrameClient()->didStartLoading(NavigationToDifferentDocument); |
| 111 m_frame->setIsLoading(true); |
| 112 InspectorInstrumentation::frameStartedLoading(m_frame, type); |
| 113 } |
113 } | 114 } |
114 | 115 |
115 void ProgressTracker::progressCompleted() { | 116 void ProgressTracker::progressCompleted() { |
116 DCHECK(m_frame->isLoading()); | 117 DCHECK(m_frame->isLoading()); |
117 m_frame->setIsLoading(false); | 118 m_frame->setIsLoading(false); |
118 sendFinalProgress(); | 119 sendFinalProgress(); |
119 reset(); | 120 reset(); |
120 localFrameClient()->didStopLoading(); | 121 localFrameClient()->didStopLoading(); |
121 InspectorInstrumentation::frameStoppedLoading(m_frame); | 122 InspectorInstrumentation::frameStoppedLoading(m_frame); |
122 } | 123 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 void ProgressTracker::completeProgress(unsigned long identifier) { | 234 void ProgressTracker::completeProgress(unsigned long identifier) { |
234 ProgressItem* item = m_progressItems.at(identifier); | 235 ProgressItem* item = m_progressItems.at(identifier); |
235 if (!item) | 236 if (!item) |
236 return; | 237 return; |
237 | 238 |
238 item->estimatedLength = item->bytesReceived; | 239 item->estimatedLength = item->bytesReceived; |
239 maybeSendProgress(); | 240 maybeSendProgress(); |
240 } | 241 } |
241 | 242 |
242 } // namespace blink | 243 } // namespace blink |
OLD | NEW |