| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()) | 107 if (!m_frame->isLoading()) |
| 108 localFrameClient()->didStartLoading(NavigationToDifferentDocument); | 108 localFrameClient()->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, type); | 112 probe::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 localFrameClient()->didStopLoading(); | 120 localFrameClient()->didStopLoading(); |
| 121 InspectorInstrumentation::frameStoppedLoading(m_frame); | 121 probe::frameStoppedLoading(m_frame); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void ProgressTracker::finishedParsing() { | 124 void ProgressTracker::finishedParsing() { |
| 125 m_finishedParsing = true; | 125 m_finishedParsing = true; |
| 126 maybeSendProgress(); | 126 maybeSendProgress(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void ProgressTracker::sendFinalProgress() { | 129 void ProgressTracker::sendFinalProgress() { |
| 130 if (m_progressValue == 1) | 130 if (m_progressValue == 1) |
| 131 return; | 131 return; |
| (...skipping 101 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.at(identifier); | 234 ProgressItem* item = m_progressItems.at(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 |