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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/core/xml/XMLHttpRequestUpload.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 void ref() { m_xmlHttpRequest->ref(); } 54 void ref() { m_xmlHttpRequest->ref(); }
55 void deref() { m_xmlHttpRequest->deref(); } 55 void deref() { m_xmlHttpRequest->deref(); }
56 XMLHttpRequest* xmlHttpRequest() const { return m_xmlHttpRequest; } 56 XMLHttpRequest* xmlHttpRequest() const { return m_xmlHttpRequest; }
57 57
58 virtual const AtomicString& interfaceName() const OVERRIDE; 58 virtual const AtomicString& interfaceName() const OVERRIDE;
59 virtual ExecutionContext* executionContext() const OVERRIDE; 59 virtual ExecutionContext* executionContext() const OVERRIDE;
60 60
61 void dispatchEventAndLoadEnd(PassRefPtr<Event>); 61 void dispatchEventAndLoadEnd(PassRefPtr<Event>);
62 void dispatchProgressEvent(unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
62 63
63 private: 64 private:
64 explicit XMLHttpRequestUpload(XMLHttpRequest*); 65 explicit XMLHttpRequestUpload(XMLHttpRequest*);
65 66
66 virtual void refEventTarget() OVERRIDE { ref(); } 67 virtual void refEventTarget() OVERRIDE { ref(); }
67 virtual void derefEventTarget() OVERRIDE { deref(); } 68 virtual void derefEventTarget() OVERRIDE { deref(); }
68 69
69 XMLHttpRequest* m_xmlHttpRequest; 70 XMLHttpRequest* m_xmlHttpRequest;
70 EventTargetData m_eventTargetData; 71 EventTargetData m_eventTargetData;
72
73 // Last progress event values; used when issuing the
74 // required 'progress' event on a request error or abort.
75 unsigned long long m_lastBytesSent;
76 unsigned long long m_lastTotalBytesToBeSent;
71 }; 77 };
72 78
73 } // namespace WebCore 79 } // namespace WebCore
74 80
75 #endif // XMLHttpRequestUpload_h 81 #endif // XMLHttpRequestUpload_h
OLDNEW
« 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