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

Unified Diff: Source/core/xml/XMLHttpRequestUpload.h

Issue 63033008: Move delivery of upload 'progress' events to XMLHttpRequestUpload. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/core/xml/XMLHttpRequestUpload.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequestUpload.h
diff --git a/Source/core/xml/XMLHttpRequestUpload.h b/Source/core/xml/XMLHttpRequestUpload.h
index f9a8d1476dce8d7942ed5c932babb40499b3c9f1..81855a72b5655bfa5dfc773c10c2128790965c18 100644
--- a/Source/core/xml/XMLHttpRequestUpload.h
+++ b/Source/core/xml/XMLHttpRequestUpload.h
@@ -59,6 +59,7 @@ public:
virtual ExecutionContext* executionContext() const OVERRIDE;
void dispatchEventAndLoadEnd(PassRefPtr<Event>);
+ void dispatchProgressEvent(unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
private:
explicit XMLHttpRequestUpload(XMLHttpRequest*);
@@ -68,6 +69,11 @@ private:
XMLHttpRequest* m_xmlHttpRequest;
EventTargetData m_eventTargetData;
+
+ // Last progress event values; used when issuing the
+ // required 'progress' event on a request error or abort.
+ unsigned long long m_lastBytesSent;
+ unsigned long long m_lastTotalBytesToBeSent;
};
} // namespace WebCore
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/core/xml/XMLHttpRequestUpload.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698