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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 dispatchDOMEvent(deferred.eventID, deferred.progressTotal, deferred.prog
ressDone); | 208 dispatchDOMEvent(deferred.eventID, deferred.progressTotal, deferred.prog
ressDone); |
209 } | 209 } |
210 m_deferredEvents.clear(); | 210 m_deferredEvents.clear(); |
211 m_defersEvents = false; | 211 m_defersEvents = false; |
212 } | 212 } |
213 | 213 |
214 void ApplicationCacheHost::dispatchDOMEvent(EventID id, int total, int done) | 214 void ApplicationCacheHost::dispatchDOMEvent(EventID id, int total, int done) |
215 { | 215 { |
216 if (m_domApplicationCache) { | 216 if (m_domApplicationCache) { |
217 const AtomicString& eventType = ApplicationCache::toEventType(id); | 217 const AtomicString& eventType = ApplicationCache::toEventType(id); |
218 RefPtr<Event> event; | 218 RefPtrWillBeRawPtr<Event> event; |
219 if (id == PROGRESS_EVENT) | 219 if (id == PROGRESS_EVENT) |
220 event = ProgressEvent::create(eventType, true, done, total); | 220 event = ProgressEvent::create(eventType, true, done, total); |
221 else | 221 else |
222 event = Event::create(eventType); | 222 event = Event::create(eventType); |
223 m_domApplicationCache->dispatchEvent(event, ASSERT_NO_EXCEPTION); | 223 m_domApplicationCache->dispatchEvent(event, ASSERT_NO_EXCEPTION); |
224 } | 224 } |
225 } | 225 } |
226 | 226 |
227 ApplicationCacheHost::Status ApplicationCacheHost::status() const | 227 ApplicationCacheHost::Status ApplicationCacheHost::status() const |
228 { | 228 { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 { | 263 { |
264 notifyApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID),
0, 0); | 264 notifyApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID),
0, 0); |
265 } | 265 } |
266 | 266 |
267 void ApplicationCacheHost::notifyProgressEventListener(const blink::WebURL&, int
progressTotal, int progressDone) | 267 void ApplicationCacheHost::notifyProgressEventListener(const blink::WebURL&, int
progressTotal, int progressDone) |
268 { | 268 { |
269 notifyApplicationCache(PROGRESS_EVENT, progressTotal, progressDone); | 269 notifyApplicationCache(PROGRESS_EVENT, progressTotal, progressDone); |
270 } | 270 } |
271 | 271 |
272 } // namespace WebCore | 272 } // namespace WebCore |
OLD | NEW |