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

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

Issue 1446253002: PlzNavigate: inform the WebFrameClient that a form will be submitted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 m_progressItems.clear(); 109 m_progressItems.clear();
110 110
111 m_totalPageAndResourceBytesToLoad = 0; 111 m_totalPageAndResourceBytesToLoad = 0;
112 m_totalBytesReceived = 0; 112 m_totalBytesReceived = 0;
113 m_progressValue = 0; 113 m_progressValue = 0;
114 m_lastNotifiedProgressValue = 0; 114 m_lastNotifiedProgressValue = 0;
115 m_lastNotifiedProgressTime = 0; 115 m_lastNotifiedProgressTime = 0;
116 m_finalProgressChangedSent = false; 116 m_finalProgressChangedSent = false;
117 } 117 }
118 118
119 void ProgressTracker::progressStarted() 119 void ProgressTracker::progressStarted(bool informClient)
120 { 120 {
121 if (!m_frame->isLoading()) { 121 if (!m_frame->isLoading()) {
122 reset(); 122 reset();
123 m_progressValue = initialProgressValue; 123 m_progressValue = initialProgressValue;
124 m_frame->loader().client()->didStartLoading(NavigationToDifferentDocumen t); 124 if (informClient)
125 m_frame->loader().client()->didStartLoading(NavigationToDifferentDoc ument);
dcheng 2015/12/11 17:14:06 We absolutely can not special-case mandoline here.
clamy 2015/12/14 15:47:18 The issue here is the combination of what content
125 } 126 }
126 m_frame->setIsLoading(true); 127 m_frame->setIsLoading(true);
127 InspectorInstrumentation::frameStartedLoading(m_frame); 128 InspectorInstrumentation::frameStartedLoading(m_frame);
128 } 129 }
129 130
130 void ProgressTracker::progressCompleted() 131 void ProgressTracker::progressCompleted()
131 { 132 {
132 ASSERT(m_frame->isLoading()); 133 ASSERT(m_frame->isLoading());
133 m_frame->setIsLoading(false); 134 m_frame->setIsLoading(false);
134 sendFinalProgress(); 135 sendFinalProgress();
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return; 274 return;
274 275
275 // Adjust the total expected bytes to account for any overage/underage. 276 // Adjust the total expected bytes to account for any overage/underage.
276 long long delta = item->bytesReceived - item->estimatedLength; 277 long long delta = item->bytesReceived - item->estimatedLength;
277 m_totalPageAndResourceBytesToLoad += delta; 278 m_totalPageAndResourceBytesToLoad += delta;
278 279
279 m_progressItems.remove(identifier); 280 m_progressItems.remove(identifier);
280 } 281 }
281 282
282 } 283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698