OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 173 } |
174 } | 174 } |
175 return WorkerGlobalScope::addEventListenerInternal(eventType, listener, opti
ons); | 175 return WorkerGlobalScope::addEventListenerInternal(eventType, listener, opti
ons); |
176 } | 176 } |
177 | 177 |
178 const AtomicString& ServiceWorkerGlobalScope::interfaceName() const | 178 const AtomicString& ServiceWorkerGlobalScope::interfaceName() const |
179 { | 179 { |
180 return EventTargetNames::ServiceWorkerGlobalScope; | 180 return EventTargetNames::ServiceWorkerGlobalScope; |
181 } | 181 } |
182 | 182 |
183 bool ServiceWorkerGlobalScope::dispatchEventInternal(PassRefPtrWillBeRawPtr<Even
t> event) | 183 WebInputEventResult ServiceWorkerGlobalScope::dispatchEventInternal(PassRefPtrWi
llBeRawPtr<Event> event) |
184 { | 184 { |
185 m_eventNestingLevel++; | 185 m_eventNestingLevel++; |
186 bool result = WorkerGlobalScope::dispatchEventInternal(event.get()); | 186 WebInputEventResult result = WorkerGlobalScope::dispatchEventInternal(event.
get()); |
187 if (event->interfaceName() == EventNames::ErrorEvent && m_eventNestingLevel
== 2 && !event->defaultPrevented()) | 187 if (event->interfaceName() == EventNames::ErrorEvent && m_eventNestingLevel
== 2 && !event->defaultPrevented()) |
188 m_hadErrorInTopLevelEventHandler = true; | 188 m_hadErrorInTopLevelEventHandler = true; |
189 m_eventNestingLevel--; | 189 m_eventNestingLevel--; |
190 return result; | 190 return result; |
191 } | 191 } |
192 | 192 |
193 void ServiceWorkerGlobalScope::dispatchExtendableEvent(PassRefPtrWillBeRawPtr<Ev
ent> event, WaitUntilObserver* observer) | 193 void ServiceWorkerGlobalScope::dispatchExtendableEvent(PassRefPtrWillBeRawPtr<Ev
ent> event, WaitUntilObserver* observer) |
194 { | 194 { |
195 ASSERT(m_eventNestingLevel == 0); | 195 ASSERT(m_eventNestingLevel == 0); |
196 m_hadErrorInTopLevelEventHandler = false; | 196 m_hadErrorInTopLevelEventHandler = false; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } | 234 } |
235 | 235 |
236 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta
dataSize) | 236 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta
dataSize) |
237 { | 237 { |
238 ++m_scriptCount; | 238 ++m_scriptCount; |
239 m_scriptTotalSize += scriptSize; | 239 m_scriptTotalSize += scriptSize; |
240 m_scriptCachedMetadataTotalSize += cachedMetadataSize; | 240 m_scriptCachedMetadataTotalSize += cachedMetadataSize; |
241 } | 241 } |
242 | 242 |
243 } // namespace blink | 243 } // namespace blink |
OLD | NEW |