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

Unified Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp

Issue 1681923002: Remove XMLHttpRequestProgressEvent (position and totalSize) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update tests Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp
index 92e00034492a860d36f1ce4e356df1314e035224..1d048777633394f1826a599760ba5676a25b3540 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp
@@ -26,7 +26,7 @@
#include "core/xmlhttprequest/XMLHttpRequestUpload.h"
#include "core/EventTypeNames.h"
-#include "core/xmlhttprequest/XMLHttpRequestProgressEvent.h"
+#include "core/events/ProgressEvent.h"
#include "wtf/Assertions.h"
#include "wtf/text/AtomicString.h"
@@ -53,20 +53,20 @@ void XMLHttpRequestUpload::dispatchProgressEvent(unsigned long long bytesSent, u
{
m_lastBytesSent = bytesSent;
m_lastTotalBytesToBeSent = totalBytesToBeSent;
- dispatchEvent(XMLHttpRequestProgressEvent::create(EventTypeNames::progress, true, bytesSent, totalBytesToBeSent));
+ dispatchEvent(ProgressEvent::create(EventTypeNames::progress, true, bytesSent, totalBytesToBeSent));
}
void XMLHttpRequestUpload::dispatchEventAndLoadEnd(const AtomicString& type, bool lengthComputable, unsigned long long bytesSent, unsigned long long total)
{
ASSERT(type == EventTypeNames::load || type == EventTypeNames::abort || type == EventTypeNames::error || type == EventTypeNames::timeout);
- dispatchEvent(XMLHttpRequestProgressEvent::create(type, lengthComputable, bytesSent, total));
- dispatchEvent(XMLHttpRequestProgressEvent::create(EventTypeNames::loadend, lengthComputable, bytesSent, total));
+ dispatchEvent(ProgressEvent::create(type, lengthComputable, bytesSent, total));
+ dispatchEvent(ProgressEvent::create(EventTypeNames::loadend, lengthComputable, bytesSent, total));
}
void XMLHttpRequestUpload::handleRequestError(const AtomicString& type)
{
bool lengthComputable = m_lastTotalBytesToBeSent > 0 && m_lastBytesSent <= m_lastTotalBytesToBeSent;
- dispatchEvent(XMLHttpRequestProgressEvent::create(EventTypeNames::progress, lengthComputable, m_lastBytesSent, m_lastTotalBytesToBeSent));
+ dispatchEvent(ProgressEvent::create(EventTypeNames::progress, lengthComputable, m_lastBytesSent, m_lastTotalBytesToBeSent));
dispatchEventAndLoadEnd(type, lengthComputable, m_lastBytesSent, m_lastTotalBytesToBeSent);
}
« no previous file with comments | « third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698