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

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

Issue 313553002: Add the navigator.serviceWorker.waiting property. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring patch to head. Created 6 years, 6 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
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 public ScriptWrappable, 57 public ScriptWrappable,
58 public ContextLifecycleObserver, 58 public ContextLifecycleObserver,
59 public DOMWindowLifecycleObserver, 59 public DOMWindowLifecycleObserver,
60 public blink::WebServiceWorkerProviderClient { 60 public blink::WebServiceWorkerProviderClient {
61 public: 61 public:
62 static PassRefPtr<ServiceWorkerContainer> create(ExecutionContext*); 62 static PassRefPtr<ServiceWorkerContainer> create(ExecutionContext*);
63 ~ServiceWorkerContainer(); 63 ~ServiceWorkerContainer();
64 64
65 void detachClient(); 65 void detachClient();
66 66
67 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); }
67 PassRefPtrWillBeRawPtr<ServiceWorker> controller() { return m_controller.get (); } 68 PassRefPtrWillBeRawPtr<ServiceWorker> controller() { return m_controller.get (); }
68 ScriptPromise ready(ScriptState*); 69 ScriptPromise ready(ScriptState*);
69 70
70 ScriptPromise registerServiceWorker(ScriptState*, const String& pattern, con st Dictionary&); 71 ScriptPromise registerServiceWorker(ScriptState*, const String& pattern, con st Dictionary&);
71 ScriptPromise unregisterServiceWorker(ScriptState*, const String& scope = St ring()); 72 ScriptPromise unregisterServiceWorker(ScriptState*, const String& scope = St ring());
72 73
73 // WebServiceWorkerProviderClient overrides. 74 // WebServiceWorkerProviderClient overrides.
75 virtual void setWaiting(blink::WebServiceWorker*) OVERRIDE;
74 virtual void setController(blink::WebServiceWorker*) OVERRIDE; 76 virtual void setController(blink::WebServiceWorker*) OVERRIDE;
75 virtual void dispatchMessageEvent(const blink::WebString& message, const bli nk::WebMessagePortChannelArray&) OVERRIDE; 77 virtual void dispatchMessageEvent(const blink::WebString& message, const bli nk::WebMessagePortChannelArray&) OVERRIDE;
76 78
77 // FIXME: Delete this when the embedder switches to setController. 79 // FIXME: Delete this when the embedder switches to setController.
78 virtual void setCurrentServiceWorker(blink::WebServiceWorker*) OVERRIDE; 80 virtual void setCurrentServiceWorker(blink::WebServiceWorker*) OVERRIDE;
79 81
80 private: 82 private:
81 explicit ServiceWorkerContainer(ExecutionContext*); 83 explicit ServiceWorkerContainer(ExecutionContext*);
82 84
83 blink::WebServiceWorkerProvider* m_provider; 85 blink::WebServiceWorkerProvider* m_provider;
86 RefPtr<ServiceWorker> m_waiting;
84 RefPtr<ServiceWorker> m_controller; 87 RefPtr<ServiceWorker> m_controller;
85 }; 88 };
86 89
87 } // namespace WebCore 90 } // namespace WebCore
88 91
89 #endif // ServiceWorkerContainer_h 92 #endif // ServiceWorkerContainer_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorker.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698