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

Side by Side Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Julien Chaffraix <jchaffraix@webkit.org> All right reserv ed. 2 * Copyright (C) 2010 Julien Chaffraix <jchaffraix@webkit.org> All right reserv ed.
3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // the event handler calls xhr.abort()). In such cases a 124 // the event handler calls xhr.abort()). In such cases a
125 // readystatechange should have been already dispatched if necessary. 125 // readystatechange should have been already dispatched if necessary.
126 InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionCont ext(), m_target, m_target->isAsync()); 126 InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionCont ext(), m_target, m_target->isAsync());
127 m_target->dispatchEvent(event); 127 m_target->dispatchEvent(event);
128 } 128 }
129 } 129 }
130 130
131 void XMLHttpRequestProgressEventThrottle::dispatchProgressProgressEvent(Event* p rogressEvent) 131 void XMLHttpRequestProgressEventThrottle::dispatchProgressProgressEvent(Event* p rogressEvent)
132 { 132 {
133 XMLHttpRequest::State state = m_target->readyState(); 133 XMLHttpRequest::State state = m_target->readyState();
134 if (m_target->readyState() == XMLHttpRequest::LOADING && m_hasDispatchedProg ressProgressEvent) { 134 if (m_target->readyState() == XMLHttpRequest::kLoading && m_hasDispatchedPro gressProgressEvent) {
135 TRACE_EVENT1("devtools.timeline", "XHRReadyStateChange", "data", Inspect orXhrReadyStateChangeEvent::data(m_target->getExecutionContext(), m_target)); 135 TRACE_EVENT1("devtools.timeline", "XHRReadyStateChange", "data", Inspect orXhrReadyStateChangeEvent::data(m_target->getExecutionContext(), m_target));
136 InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionCont ext(), m_target, m_target->isAsync()); 136 InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionCont ext(), m_target, m_target->isAsync());
137 m_target->dispatchEvent(Event::create(EventTypeNames::readystatechange)) ; 137 m_target->dispatchEvent(Event::create(EventTypeNames::readystatechange)) ;
138 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::d ata()); 138 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::d ata());
139 } 139 }
140 140
141 if (m_target->readyState() != state) 141 if (m_target->readyState() != state)
142 return; 142 return;
143 143
144 m_hasDispatchedProgressProgressEvent = true; 144 m_hasDispatchedProgressProgressEvent = true;
(...skipping 30 matching lines...) Expand all
175 // event-handler could insert new active DOM objects to the list. 175 // event-handler could insert new active DOM objects to the list.
176 startOneShot(0, BLINK_FROM_HERE); 176 startOneShot(0, BLINK_FROM_HERE);
177 } 177 }
178 178
179 DEFINE_TRACE(XMLHttpRequestProgressEventThrottle) 179 DEFINE_TRACE(XMLHttpRequestProgressEventThrottle)
180 { 180 {
181 visitor->trace(m_target); 181 visitor->trace(m_target);
182 } 182 }
183 183
184 } // namespace blink 184 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698