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

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

Issue 1167563002: Sync the XHR-related interfaces with the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: data->body Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/events/ProgressEvent.idl » ('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) 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 19 matching lines...) Expand all
30 30
31 ProgressEvent::ProgressEvent() 31 ProgressEvent::ProgressEvent()
32 : m_lengthComputable(false) 32 : m_lengthComputable(false)
33 , m_loaded(0) 33 , m_loaded(0)
34 , m_total(0) 34 , m_total(0)
35 { 35 {
36 } 36 }
37 37
38 ProgressEvent::ProgressEvent(const AtomicString& type, const ProgressEventInit& initializer) 38 ProgressEvent::ProgressEvent(const AtomicString& type, const ProgressEventInit& initializer)
39 : Event(type, initializer) 39 : Event(type, initializer)
40 , m_lengthComputable(false) 40 , m_lengthComputable(initializer.lengthComputable())
41 , m_loaded(0) 41 , m_loaded(initializer.loaded())
42 , m_total(0) 42 , m_total(initializer.total())
43 { 43 {
44 if (initializer.hasLengthComputable())
45 m_lengthComputable = initializer.lengthComputable();
46 if (initializer.hasLoaded())
47 m_loaded = initializer.loaded();
48 if (initializer.hasTotal())
49 m_total = initializer.total();
50 } 44 }
51 45
52 ProgressEvent::ProgressEvent(const AtomicString& type, bool lengthComputable, un signed long long loaded, unsigned long long total) 46 ProgressEvent::ProgressEvent(const AtomicString& type, bool lengthComputable, un signed long long loaded, unsigned long long total)
53 : Event(type, false, true) 47 : Event(type, false, true)
54 , m_lengthComputable(lengthComputable) 48 , m_lengthComputable(lengthComputable)
55 , m_loaded(loaded) 49 , m_loaded(loaded)
56 , m_total(total) 50 , m_total(total)
57 { 51 {
58 } 52 }
59 53
60 const AtomicString& ProgressEvent::interfaceName() const 54 const AtomicString& ProgressEvent::interfaceName() const
61 { 55 {
62 return EventNames::ProgressEvent; 56 return EventNames::ProgressEvent;
63 } 57 }
64 58
65 DEFINE_TRACE(ProgressEvent) 59 DEFINE_TRACE(ProgressEvent)
66 { 60 {
67 Event::trace(visitor); 61 Event::trace(visitor);
68 } 62 }
69 63
70 } 64 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/events/ProgressEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698