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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h

Issue 1922093003: Add AddEventListenerOptions addEventListenerOptions interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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) 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); 84 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate);
85 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); 85 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch);
86 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 86 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
87 DEFINE_ATTRIBUTE_EVENT_LISTENER(foreignfetch); 87 DEFINE_ATTRIBUTE_EVENT_LISTENER(foreignfetch);
88 88
89 DECLARE_VIRTUAL_TRACE(); 89 DECLARE_VIRTUAL_TRACE();
90 90
91 protected: 91 protected:
92 // EventTarget 92 // EventTarget
93 DispatchEventResult dispatchEventInternal(Event*) override; 93 DispatchEventResult dispatchEventInternal(Event*) override;
94 bool addEventListenerInternal(const AtomicString& eventType, EventListener*, const EventListenerOptions&) override; 94 bool addEventListenerInternal(const AtomicString& eventType, EventListener*, const AddEventListenerOptions&) override;
95 95
96 private: 96 private:
97 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker Thread*, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData>, WorkerCli ents*); 97 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker Thread*, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData>, WorkerCli ents*);
98 void importScripts(const Vector<String>& urls, ExceptionState&) override; 98 void importScripts(const Vector<String>& urls, ExceptionState&) override;
99 CachedMetadataHandler* createWorkerScriptCachedMetadataHandler(const KURL& s criptURL, const Vector<char>* metaData) override; 99 CachedMetadataHandler* createWorkerScriptCachedMetadataHandler(const KURL& s criptURL, const Vector<char>* metaData) override;
100 void logExceptionToConsole(const String& errorMessage, int scriptId, const S tring& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) override; 100 void logExceptionToConsole(const String& errorMessage, int scriptId, const S tring& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) override;
101 void scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) override; 101 void scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) override;
102 102
103 Member<ServiceWorkerClients> m_clients; 103 Member<ServiceWorkerClients> m_clients;
104 Member<ServiceWorkerRegistration> m_registration; 104 Member<ServiceWorkerRegistration> m_registration;
105 bool m_didEvaluateScript; 105 bool m_didEvaluateScript;
106 bool m_hadErrorInTopLevelEventHandler; 106 bool m_hadErrorInTopLevelEventHandler;
107 unsigned m_eventNestingLevel; 107 unsigned m_eventNestingLevel;
108 size_t m_scriptCount; 108 size_t m_scriptCount;
109 size_t m_scriptTotalSize; 109 size_t m_scriptTotalSize;
110 size_t m_scriptCachedMetadataTotalSize; 110 size_t m_scriptCachedMetadataTotalSize;
111 }; 111 };
112 112
113 DEFINE_TYPE_CASTS(ServiceWorkerGlobalScope, ExecutionContext, context, context-> isServiceWorkerGlobalScope(), context.isServiceWorkerGlobalScope()); 113 DEFINE_TYPE_CASTS(ServiceWorkerGlobalScope, ExecutionContext, context, context-> isServiceWorkerGlobalScope(), context.isServiceWorkerGlobalScope());
114 114
115 } // namespace blink 115 } // namespace blink
116 116
117 #endif // ServiceWorkerGlobalScope_h 117 #endif // ServiceWorkerGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698