OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 dispatchDOMEvent(deferred.eventID, deferred.progressTotal, deferred.prog
ressDone, deferred.errorReason, deferred.errorURL, deferred.errorStatus, deferre
d.errorMessage); | 209 dispatchDOMEvent(deferred.eventID, deferred.progressTotal, deferred.prog
ressDone, deferred.errorReason, deferred.errorURL, deferred.errorStatus, deferre
d.errorMessage); |
210 } | 210 } |
211 m_deferredEvents.clear(); | 211 m_deferredEvents.clear(); |
212 m_defersEvents = false; | 212 m_defersEvents = false; |
213 } | 213 } |
214 | 214 |
215 void ApplicationCacheHost::dispatchDOMEvent(EventID id, int progressTotal, int p
rogressDone, blink::WebApplicationCacheHost::ErrorReason errorReason, const Stri
ng& errorURL, int errorStatus, const String& errorMessage) | 215 void ApplicationCacheHost::dispatchDOMEvent(EventID id, int progressTotal, int p
rogressDone, blink::WebApplicationCacheHost::ErrorReason errorReason, const Stri
ng& errorURL, int errorStatus, const String& errorMessage) |
216 { | 216 { |
217 if (m_domApplicationCache) { | 217 if (m_domApplicationCache) { |
218 const AtomicString& eventType = ApplicationCache::toEventType(id); | 218 const AtomicString& eventType = ApplicationCache::toEventType(id); |
219 RefPtr<Event> event; | 219 RefPtrWillBeRawPtr<Event> event = nullptr; |
220 if (id == PROGRESS_EVENT) | 220 if (id == PROGRESS_EVENT) |
221 event = ProgressEvent::create(eventType, true, progressDone, progres
sTotal); | 221 event = ProgressEvent::create(eventType, true, progressDone, progres
sTotal); |
222 else if (id == ERROR_EVENT) | 222 else if (id == ERROR_EVENT) |
223 event = ApplicationCacheErrorEvent::create(errorReason, errorURL, er
rorStatus, errorMessage); | 223 event = ApplicationCacheErrorEvent::create(errorReason, errorURL, er
rorStatus, errorMessage); |
224 else | 224 else |
225 event = Event::create(eventType); | 225 event = Event::create(eventType); |
226 m_domApplicationCache->dispatchEvent(event, ASSERT_NO_EXCEPTION); | 226 m_domApplicationCache->dispatchEvent(event, ASSERT_NO_EXCEPTION); |
227 } | 227 } |
228 } | 228 } |
229 | 229 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 { | 271 { |
272 notifyApplicationCache(PROGRESS_EVENT, progressTotal, progressDone, blink::W
ebApplicationCacheHost::UnknownError, String(), 0, String()); | 272 notifyApplicationCache(PROGRESS_EVENT, progressTotal, progressDone, blink::W
ebApplicationCacheHost::UnknownError, String(), 0, String()); |
273 } | 273 } |
274 | 274 |
275 void ApplicationCacheHost::notifyErrorEventListener(blink::WebApplicationCacheHo
st::ErrorReason reason, const blink::WebURL& url, int status, const blink::WebSt
ring& message) | 275 void ApplicationCacheHost::notifyErrorEventListener(blink::WebApplicationCacheHo
st::ErrorReason reason, const blink::WebURL& url, int status, const blink::WebSt
ring& message) |
276 { | 276 { |
277 notifyApplicationCache(ERROR_EVENT, 0, 0, reason, url.string(), status, mess
age); | 277 notifyApplicationCache(ERROR_EVENT, 0, 0, reason, url.string(), status, mess
age); |
278 } | 278 } |
279 | 279 |
280 } // namespace WebCore | 280 } // namespace WebCore |
OLD | NEW |