| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 m_deferredEvents.clear(); | 235 m_deferredEvents.clear(); |
| 236 m_defersEvents = false; | 236 m_defersEvents = false; |
| 237 } | 237 } |
| 238 | 238 |
| 239 void ApplicationCacheHost::dispatchDOMEvent(EventID id, int progressTotal, int p
rogressDone, WebApplicationCacheHost::ErrorReason errorReason, const String& err
orURL, int errorStatus, const String& errorMessage) | 239 void ApplicationCacheHost::dispatchDOMEvent(EventID id, int progressTotal, int p
rogressDone, WebApplicationCacheHost::ErrorReason errorReason, const String& err
orURL, int errorStatus, const String& errorMessage) |
| 240 { | 240 { |
| 241 if (!m_domApplicationCache) | 241 if (!m_domApplicationCache) |
| 242 return; | 242 return; |
| 243 | 243 |
| 244 const AtomicString& eventType = ApplicationCache::toEventType(id); | 244 const AtomicString& eventType = ApplicationCache::toEventType(id); |
| 245 if (eventType.isEmpty() || !m_domApplicationCache->executionContext()) | 245 if (eventType.isEmpty() || !m_domApplicationCache->getExecutionContext()) |
| 246 return; | 246 return; |
| 247 RefPtrWillBeRawPtr<Event> event = nullptr; | 247 RefPtrWillBeRawPtr<Event> event = nullptr; |
| 248 if (id == PROGRESS_EVENT) | 248 if (id == PROGRESS_EVENT) |
| 249 event = ProgressEvent::create(eventType, true, progressDone, progressTot
al); | 249 event = ProgressEvent::create(eventType, true, progressDone, progressTot
al); |
| 250 else if (id == ERROR_EVENT) | 250 else if (id == ERROR_EVENT) |
| 251 event = ApplicationCacheErrorEvent::create(errorReason, errorURL, errorS
tatus, errorMessage); | 251 event = ApplicationCacheErrorEvent::create(errorReason, errorURL, errorS
tatus, errorMessage); |
| 252 else | 252 else |
| 253 event = Event::create(eventType); | 253 event = Event::create(eventType); |
| 254 m_domApplicationCache->dispatchEvent(event); | 254 m_domApplicationCache->dispatchEvent(event); |
| 255 } | 255 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 notifyApplicationCache(ERROR_EVENT, 0, 0, reason, url.string(), status, mess
age); | 304 notifyApplicationCache(ERROR_EVENT, 0, 0, reason, url.string(), status, mess
age); |
| 305 } | 305 } |
| 306 | 306 |
| 307 DEFINE_TRACE(ApplicationCacheHost) | 307 DEFINE_TRACE(ApplicationCacheHost) |
| 308 { | 308 { |
| 309 visitor->trace(m_domApplicationCache); | 309 visitor->trace(m_domApplicationCache); |
| 310 visitor->trace(m_documentLoader); | 310 visitor->trace(m_documentLoader); |
| 311 } | 311 } |
| 312 | 312 |
| 313 } // namespace blink | 313 } // namespace blink |
| OLD | NEW |