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

Side by Side Diff: Source/core/events/ProgressEvent.h

Issue 185393006: Revert "Add [WillBeGarbageCollected] to Event.idl" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 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 22 matching lines...) Expand all
33 struct ProgressEventInit : public EventInit { 33 struct ProgressEventInit : public EventInit {
34 ProgressEventInit(); 34 ProgressEventInit();
35 35
36 bool lengthComputable; 36 bool lengthComputable;
37 unsigned long long loaded; 37 unsigned long long loaded;
38 unsigned long long total; 38 unsigned long long total;
39 }; 39 };
40 40
41 class ProgressEvent : public Event { 41 class ProgressEvent : public Event {
42 public: 42 public:
43 static PassRefPtrWillBeRawPtr<ProgressEvent> create() 43 static PassRefPtr<ProgressEvent> create()
44 { 44 {
45 return adoptRefWillBeRefCountedGarbageCollected(new ProgressEvent); 45 return adoptRef(new ProgressEvent);
46 } 46 }
47 static PassRefPtrWillBeRawPtr<ProgressEvent> create(const AtomicString& type , bool lengthComputable, unsigned long long loaded, unsigned long long total) 47 static PassRefPtr<ProgressEvent> create(const AtomicString& type, bool lengt hComputable, unsigned long long loaded, unsigned long long total)
48 { 48 {
49 return adoptRefWillBeRefCountedGarbageCollected(new ProgressEvent(type, lengthComputable, loaded, total)); 49 return adoptRef(new ProgressEvent(type, lengthComputable, loaded, total) );
50 } 50 }
51 static PassRefPtrWillBeRawPtr<ProgressEvent> create(const AtomicString& type , const ProgressEventInit& initializer) 51 static PassRefPtr<ProgressEvent> create(const AtomicString& type, const Prog ressEventInit& initializer)
52 { 52 {
53 return adoptRefWillBeRefCountedGarbageCollected(new ProgressEvent(type, initializer)); 53 return adoptRef(new ProgressEvent(type, initializer));
54 } 54 }
55 55
56 bool lengthComputable() const { return m_lengthComputable; } 56 bool lengthComputable() const { return m_lengthComputable; }
57 unsigned long long loaded() const { return m_loaded; } 57 unsigned long long loaded() const { return m_loaded; }
58 unsigned long long total() const { return m_total; } 58 unsigned long long total() const { return m_total; }
59 59
60 virtual const AtomicString& interfaceName() const OVERRIDE; 60 virtual const AtomicString& interfaceName() const OVERRIDE;
61 61
62 virtual void trace(Visitor*) OVERRIDE; 62 virtual void trace(Visitor*) OVERRIDE;
63 63
64 protected: 64 protected:
65 ProgressEvent(); 65 ProgressEvent();
66 ProgressEvent(const AtomicString& type, bool lengthComputable, unsigned long long loaded, unsigned long long total); 66 ProgressEvent(const AtomicString& type, bool lengthComputable, unsigned long long loaded, unsigned long long total);
67 ProgressEvent(const AtomicString&, const ProgressEventInit&); 67 ProgressEvent(const AtomicString&, const ProgressEventInit&);
68 68
69 private: 69 private:
70 bool m_lengthComputable; 70 bool m_lengthComputable;
71 unsigned long long m_loaded; 71 unsigned long long m_loaded;
72 unsigned long long m_total; 72 unsigned long long m_total;
73 }; 73 };
74 } 74 }
75 75
76 #endif // ProgressEvent_h 76 #endif // ProgressEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698