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

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

Issue 2734783002: Fix oninstall-script tests for service worker (Closed)
Patch Set: address comment Created 3 years, 9 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DEFINE_ATTRIBUTE_EVENT_LISTENER(install); 91 DEFINE_ATTRIBUTE_EVENT_LISTENER(install);
92 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); 92 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate);
93 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); 93 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch);
94 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 94 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
95 DEFINE_ATTRIBUTE_EVENT_LISTENER(foreignfetch); 95 DEFINE_ATTRIBUTE_EVENT_LISTENER(foreignfetch);
96 96
97 DECLARE_VIRTUAL_TRACE(); 97 DECLARE_VIRTUAL_TRACE();
98 98
99 protected: 99 protected:
100 // EventTarget 100 // EventTarget
101 DispatchEventResult dispatchEventInternal(Event*) override;
102 bool addEventListenerInternal( 101 bool addEventListenerInternal(
103 const AtomicString& eventType, 102 const AtomicString& eventType,
104 EventListener*, 103 EventListener*,
105 const AddEventListenerOptionsResolved&) override; 104 const AddEventListenerOptionsResolved&) override;
106 105
107 private: 106 private:
108 ServiceWorkerGlobalScope(const KURL&, 107 ServiceWorkerGlobalScope(const KURL&,
109 const String& userAgent, 108 const String& userAgent,
110 ServiceWorkerThread*, 109 ServiceWorkerThread*,
111 double timeOrigin, 110 double timeOrigin,
112 std::unique_ptr<SecurityOrigin::PrivilegeData>, 111 std::unique_ptr<SecurityOrigin::PrivilegeData>,
113 WorkerClients*); 112 WorkerClients*);
114 void importScripts(const Vector<String>& urls, ExceptionState&) override; 113 void importScripts(const Vector<String>& urls, ExceptionState&) override;
115 CachedMetadataHandler* createWorkerScriptCachedMetadataHandler( 114 CachedMetadataHandler* createWorkerScriptCachedMetadataHandler(
116 const KURL& scriptURL, 115 const KURL& scriptURL,
117 const Vector<char>* metaData) override; 116 const Vector<char>* metaData) override;
118 void exceptionThrown(ErrorEvent*) override; 117 void exceptionThrown(ErrorEvent*) override;
119 118
120 Member<ServiceWorkerClients> m_clients; 119 Member<ServiceWorkerClients> m_clients;
121 Member<ServiceWorkerRegistration> m_registration; 120 Member<ServiceWorkerRegistration> m_registration;
122 bool m_didEvaluateScript; 121 bool m_didEvaluateScript;
123 bool m_hadErrorInTopLevelEventHandler;
124 unsigned m_eventNestingLevel;
125 size_t m_scriptCount; 122 size_t m_scriptCount;
126 size_t m_scriptTotalSize; 123 size_t m_scriptTotalSize;
127 size_t m_scriptCachedMetadataTotalSize; 124 size_t m_scriptCachedMetadataTotalSize;
128 }; 125 };
129 126
130 DEFINE_TYPE_CASTS(ServiceWorkerGlobalScope, 127 DEFINE_TYPE_CASTS(ServiceWorkerGlobalScope,
131 ExecutionContext, 128 ExecutionContext,
132 context, 129 context,
133 context->isServiceWorkerGlobalScope(), 130 context->isServiceWorkerGlobalScope(),
134 context.isServiceWorkerGlobalScope()); 131 context.isServiceWorkerGlobalScope());
135 132
136 } // namespace blink 133 } // namespace blink
137 134
138 #endif // ServiceWorkerGlobalScope_h 135 #endif // ServiceWorkerGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698