Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: third_party/WebKit/Source/core/loader/ProgressTracker.cpp

Issue 2694013005: Cleanup blink-side PlzNavigate logic (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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()) {
110 localFrameClient()->didStartLoading(NavigationToDifferentDocument);
111 m_frame->setIsLoading(true);
112 }
112 probe::frameStartedLoading(m_frame, type); 113 probe::frameStartedLoading(m_frame, type);
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 probe::frameStoppedLoading(m_frame); 122 probe::frameStoppedLoading(m_frame);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/NavigationScheduler.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698