OLD | NEW |
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class XMLHttpRequest; | 44 class XMLHttpRequest; |
45 | 45 |
46 class XMLHttpRequestUpload FINAL : public NoBaseWillBeRefCountedGarbageCollected
<XMLHttpRequestUpload>, public ScriptWrappable, public XMLHttpRequestEventTarget
{ | 46 class XMLHttpRequestUpload FINAL : public NoBaseWillBeRefCountedGarbageCollected
<XMLHttpRequestUpload>, public ScriptWrappable, public XMLHttpRequestEventTarget
{ |
47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequestUpload); | 47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequestUpload); |
48 public: | 48 public: |
49 static PassOwnPtrWillBeRawPtr<XMLHttpRequestUpload> create(XMLHttpRequest* x
mlHttpRequest) | 49 static PassOwnPtrWillBeRawPtr<XMLHttpRequestUpload> create(XMLHttpRequest* x
mlHttpRequest) |
50 { | 50 { |
51 return adoptPtrWillBeRefCountedGarbageCollected(new XMLHttpRequestUpload
(xmlHttpRequest)); | 51 return adoptPtrWillBeRefCountedGarbageCollected(new XMLHttpRequestUpload
(xmlHttpRequest)); |
52 } | 52 } |
53 | 53 |
54 #if ENABLE(OILPAN) | 54 #if !ENABLE(OILPAN) |
55 using RefCountedGarbageCollected::ref; | |
56 using RefCountedGarbageCollected::deref; | |
57 #else | |
58 void ref() { m_xmlHttpRequest->ref(); } | 55 void ref() { m_xmlHttpRequest->ref(); } |
59 void deref() { m_xmlHttpRequest->deref(); } | 56 void deref() { m_xmlHttpRequest->deref(); } |
60 #endif | 57 #endif |
61 | 58 |
62 XMLHttpRequest* xmlHttpRequest() const { return m_xmlHttpRequest; } | 59 XMLHttpRequest* xmlHttpRequest() const { return m_xmlHttpRequest; } |
63 | 60 |
64 virtual const AtomicString& interfaceName() const OVERRIDE; | 61 virtual const AtomicString& interfaceName() const OVERRIDE; |
65 virtual ExecutionContext* executionContext() const OVERRIDE; | 62 virtual ExecutionContext* executionContext() const OVERRIDE; |
66 | 63 |
67 void dispatchEventAndLoadEnd(const AtomicString&, bool, unsigned long long,
unsigned long long); | 64 void dispatchEventAndLoadEnd(const AtomicString&, bool, unsigned long long,
unsigned long long); |
68 void dispatchProgressEvent(unsigned long long, unsigned long long); | 65 void dispatchProgressEvent(unsigned long long, unsigned long long); |
69 | 66 |
70 void handleRequestError(const AtomicString&); | 67 void handleRequestError(const AtomicString&); |
71 | 68 |
72 virtual void trace(Visitor*) OVERRIDE; | 69 virtual void trace(Visitor*) OVERRIDE; |
73 | 70 |
74 private: | 71 private: |
75 explicit XMLHttpRequestUpload(XMLHttpRequest*); | 72 explicit XMLHttpRequestUpload(XMLHttpRequest*); |
76 | 73 |
| 74 #if !ENABLE(OILPAN) |
77 virtual void refEventTarget() OVERRIDE { ref(); } | 75 virtual void refEventTarget() OVERRIDE { ref(); } |
78 virtual void derefEventTarget() OVERRIDE { deref(); } | 76 virtual void derefEventTarget() OVERRIDE { deref(); } |
| 77 #endif |
79 | 78 |
80 RawPtrWillBeMember<XMLHttpRequest> m_xmlHttpRequest; | 79 RawPtrWillBeMember<XMLHttpRequest> m_xmlHttpRequest; |
81 EventTargetData m_eventTargetData; | 80 EventTargetData m_eventTargetData; |
82 | 81 |
83 // Last progress event values; used when issuing the | 82 // Last progress event values; used when issuing the |
84 // required 'progress' event on a request error or abort. | 83 // required 'progress' event on a request error or abort. |
85 unsigned long long m_lastBytesSent; | 84 unsigned long long m_lastBytesSent; |
86 unsigned long long m_lastTotalBytesToBeSent; | 85 unsigned long long m_lastTotalBytesToBeSent; |
87 }; | 86 }; |
88 | 87 |
89 } // namespace WebCore | 88 } // namespace WebCore |
90 | 89 |
91 #endif // XMLHttpRequestUpload_h | 90 #endif // XMLHttpRequestUpload_h |
OLD | NEW |