| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 m_progressValue = 0; | 96 m_progressValue = 0; |
| 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 FrameLoaderClient* ProgressTracker::frameLoaderClient() const { | 102 FrameLoaderClient* ProgressTracker::frameLoaderClient() const { |
| 103 return m_frame->client(); | 103 return m_frame->client(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void ProgressTracker::progressStarted() { | 106 void ProgressTracker::progressStarted(FrameLoadType type) { |
| 107 if (!m_frame->isLoading()) | 107 if (!m_frame->isLoading()) |
| 108 frameLoaderClient()->didStartLoading(NavigationToDifferentDocument); | 108 frameLoaderClient()->didStartLoading(NavigationToDifferentDocument); |
| 109 reset(); | 109 reset(); |
| 110 m_progressValue = initialProgressValue; | 110 m_progressValue = initialProgressValue; |
| 111 m_frame->setIsLoading(true); | 111 m_frame->setIsLoading(true); |
| 112 InspectorInstrumentation::frameStartedLoading(m_frame); | 112 InspectorInstrumentation::frameStartedLoading(m_frame, type); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void ProgressTracker::progressCompleted() { | 115 void ProgressTracker::progressCompleted() { |
| 116 DCHECK(m_frame->isLoading()); | 116 DCHECK(m_frame->isLoading()); |
| 117 m_frame->setIsLoading(false); | 117 m_frame->setIsLoading(false); |
| 118 sendFinalProgress(); | 118 sendFinalProgress(); |
| 119 reset(); | 119 reset(); |
| 120 frameLoaderClient()->didStopLoading(); | 120 frameLoaderClient()->didStopLoading(); |
| 121 InspectorInstrumentation::frameStoppedLoading(m_frame); | 121 InspectorInstrumentation::frameStoppedLoading(m_frame); |
| 122 } | 122 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 void ProgressTracker::completeProgress(unsigned long identifier) { | 233 void ProgressTracker::completeProgress(unsigned long identifier) { |
| 234 ProgressItem* item = m_progressItems.get(identifier); | 234 ProgressItem* item = m_progressItems.get(identifier); |
| 235 if (!item) | 235 if (!item) |
| 236 return; | 236 return; |
| 237 | 237 |
| 238 item->estimatedLength = item->bytesReceived; | 238 item->estimatedLength = item->bytesReceived; |
| 239 maybeSendProgress(); | 239 maybeSendProgress(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace blink | 242 } // namespace blink |
| OLD | NEW |