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

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

Issue 256723002: Remove the queued states mechanism from ServiceWorker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: finish removal of stuff Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // For CallbackPromiseAdapter 63 // For CallbackPromiseAdapter
64 typedef blink::WebServiceWorker WebType; 64 typedef blink::WebServiceWorker WebType;
65 static PassRefPtr<ServiceWorker> from(ScriptPromiseResolverWithContext*, Web Type* worker); 65 static PassRefPtr<ServiceWorker> from(ScriptPromiseResolverWithContext*, Web Type* worker);
66 66
67 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray*, ExceptionState&); 67 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray*, ExceptionState&);
68 68
69 const AtomicString& state() const; 69 const AtomicString& state() const;
70 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); 70 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
71 71
72 // WebServiceWorkerProxy overrides. 72 // WebServiceWorkerProxy overrides.
73 virtual void onStateChanged(blink::WebServiceWorkerState) OVERRIDE; 73 virtual bool isReady() OVERRIDE;
74 virtual void dispatchStateChangeEvent() OVERRIDE; 74 virtual void dispatchStateChangeEvent() OVERRIDE;
75 75
76 // AbstractWorker overrides. 76 // AbstractWorker overrides.
77 virtual const AtomicString& interfaceName() const OVERRIDE; 77 virtual const AtomicString& interfaceName() const OVERRIDE;
78 78
79 private: 79 private:
80 class ThenFunction; 80 class ThenFunction;
81 81
82 ServiceWorker(ExecutionContext*, PassOwnPtr<blink::WebServiceWorker>); 82 ServiceWorker(ExecutionContext*, PassOwnPtr<blink::WebServiceWorker>);
83 void onPromiseResolved(); 83 void onPromiseResolved();
84 void waitOnPromise(ScriptPromise); 84 void waitOnPromise(ScriptPromise);
85 void changeState(blink::WebServiceWorkerState);
86 85
87 OwnPtr<blink::WebServiceWorker> m_outerWorker; 86 OwnPtr<blink::WebServiceWorker> m_outerWorker;
88 bool m_isPromisePending; 87 bool m_isPromisePending;
89 Vector<blink::WebServiceWorkerState> m_queuedStates;
90 }; 88 };
91 89
92 } // namespace WebCore 90 } // namespace WebCore
93 91
94 #endif // ServiceWorker_h 92 #endif // ServiceWorker_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698