| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Julien Chaffraix <jchaffraix@webkit.org>. All rights reser
ved. | 3 * Copyright (C) 2008 Julien Chaffraix <jchaffraix@webkit.org>. All rights reser
ved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "core/events/ProgressEvent.h" | 31 #include "core/events/ProgressEvent.h" |
| 32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
| 33 #include "wtf/Forward.h" | 33 #include "wtf/Forward.h" |
| 34 #include "wtf/PassRefPtr.h" | 34 #include "wtf/PassRefPtr.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class XMLHttpRequestProgressEvent final : public ProgressEvent { | 38 class XMLHttpRequestProgressEvent final : public ProgressEvent { |
| 39 DEFINE_WRAPPERTYPEINFO(); | 39 DEFINE_WRAPPERTYPEINFO(); |
| 40 public: | 40 public: |
| 41 static PassRefPtrWillBeRawPtr<XMLHttpRequestProgressEvent> create() | 41 static RawPtr<XMLHttpRequestProgressEvent> create() |
| 42 { | 42 { |
| 43 return adoptRefWillBeNoop(new XMLHttpRequestProgressEvent); | 43 return (new XMLHttpRequestProgressEvent); |
| 44 } | 44 } |
| 45 static PassRefPtrWillBeRawPtr<XMLHttpRequestProgressEvent> create(const Atom
icString& type, bool lengthComputable = false, unsigned long long loaded = 0, un
signed long long total = 0) | 45 static RawPtr<XMLHttpRequestProgressEvent> create(const AtomicString& type,
bool lengthComputable = false, unsigned long long loaded = 0, unsigned long long
total = 0) |
| 46 { | 46 { |
| 47 return adoptRefWillBeNoop(new XMLHttpRequestProgressEvent(type, lengthCo
mputable, loaded, total)); | 47 return (new XMLHttpRequestProgressEvent(type, lengthComputable, loaded,
total)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 // Those 2 synonyms are included for compatibility with Firefox. | 50 // Those 2 synonyms are included for compatibility with Firefox. |
| 51 unsigned long long position() const { return loaded(); } | 51 unsigned long long position() const { return loaded(); } |
| 52 unsigned long long totalSize() const { return total(); } | 52 unsigned long long totalSize() const { return total(); } |
| 53 | 53 |
| 54 const AtomicString& interfaceName() const override { return EventNames::XMLH
ttpRequestProgressEvent; } | 54 const AtomicString& interfaceName() const override { return EventNames::XMLH
ttpRequestProgressEvent; } |
| 55 | 55 |
| 56 DEFINE_INLINE_VIRTUAL_TRACE() { ProgressEvent::trace(visitor); } | 56 DEFINE_INLINE_VIRTUAL_TRACE() { ProgressEvent::trace(visitor); } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 XMLHttpRequestProgressEvent() { } | 59 XMLHttpRequestProgressEvent() { } |
| 60 | 60 |
| 61 XMLHttpRequestProgressEvent(const AtomicString& type, bool lengthComputable,
unsigned long long loaded, unsigned long long total) | 61 XMLHttpRequestProgressEvent(const AtomicString& type, bool lengthComputable,
unsigned long long loaded, unsigned long long total) |
| 62 : ProgressEvent(type, lengthComputable, loaded, total) { } | 62 : ProgressEvent(type, lengthComputable, loaded, total) { } |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| 66 | 66 |
| 67 #endif // XMLHttpRequestProgressEvent_h | 67 #endif // XMLHttpRequestProgressEvent_h |
| OLD | NEW |