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

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

Issue 896043004: Tests for WaitUntilObserver and focus/openining windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sw_client_focus_cleanup
Patch Set: review comments Created 5 years, 10 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 DEFINE_ATTRIBUTE_EVENT_LISTENER(install); 88 DEFINE_ATTRIBUTE_EVENT_LISTENER(install);
89 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); 89 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate);
90 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); 90 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch);
91 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 91 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
92 DEFINE_ATTRIBUTE_EVENT_LISTENER(sync); 92 DEFINE_ATTRIBUTE_EVENT_LISTENER(sync);
93 93
94 virtual void trace(Visitor*) override; 94 virtual void trace(Visitor*) override;
95 95
96 // Timeout before a service worker that was given window interaction 96 // Timeout before a service worker that was given window interaction
97 // permission loses them. The unit is seconds. 97 // permission loses them. The unit is seconds.
98 static const int kWindowInteractionTimeout = 10; 98 static const unsigned kWindowInteractionTimeout = 10;
dominicc (has gone to gerrit) 2015/02/09 07:03:09 These could move into the implementation file sinc
mlamouri (slow - plz ping) 2015/02/11 10:42:06 I wanted to have it there for future use but yeah,
99 static const unsigned kWindowInteractionTimeoutForTest = 1;
99 100
100 private: 101 private:
101 class SkipWaitingCallback; 102 class SkipWaitingCallback;
102 103
103 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker Thread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<Worker Clients>); 104 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker Thread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<Worker Clients>);
104 virtual void importScripts(const Vector<String>& urls, ExceptionState&) over ride; 105 virtual void importScripts(const Vector<String>& urls, ExceptionState&) over ride;
105 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) override; 106 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) override;
106 107
107 PersistentWillBeMember<ServiceWorkerClients> m_clients; 108 PersistentWillBeMember<ServiceWorkerClients> m_clients;
108 PersistentWillBeMember<ServiceWorkerRegistration> m_registration; 109 PersistentWillBeMember<ServiceWorkerRegistration> m_registration;
109 PersistentWillBeMember<CacheStorage> m_caches; 110 PersistentWillBeMember<CacheStorage> m_caches;
110 bool m_didEvaluateScript; 111 bool m_didEvaluateScript;
111 bool m_hadErrorInTopLevelEventHandler; 112 bool m_hadErrorInTopLevelEventHandler;
112 unsigned m_eventNestingLevel; 113 unsigned m_eventNestingLevel;
113 }; 114 };
114 115
115 } // namespace blink 116 } // namespace blink
116 117
117 #endif // ServiceWorkerGlobalScope_h 118 #endif // ServiceWorkerGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698