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

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

Issue 362123003: ServiceWorker: unregister's scope argument should be optional (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reformated test Created 6 years, 5 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void trace(Visitor*); 66 void trace(Visitor*);
67 67
68 PassRefPtrWillBeRawPtr<ServiceWorker> active() { return m_active.get(); } 68 PassRefPtrWillBeRawPtr<ServiceWorker> active() { return m_active.get(); }
69 PassRefPtrWillBeRawPtr<ServiceWorker> controller() { return m_controller.get (); } 69 PassRefPtrWillBeRawPtr<ServiceWorker> controller() { return m_controller.get (); }
70 PassRefPtrWillBeRawPtr<ServiceWorker> installing() { return m_installing.get (); } 70 PassRefPtrWillBeRawPtr<ServiceWorker> installing() { return m_installing.get (); }
71 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); } 71 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); }
72 ScriptPromise ready(ScriptState*); 72 ScriptPromise ready(ScriptState*);
73 blink::WebServiceWorkerProvider* provider() { return m_provider; } 73 blink::WebServiceWorkerProvider* provider() { return m_provider; }
74 74
75 ScriptPromise registerServiceWorker(ScriptState*, const String& pattern, con st Dictionary&); 75 ScriptPromise registerServiceWorker(ScriptState*, const String& pattern, con st Dictionary&);
76 ScriptPromise unregisterServiceWorker(ScriptState*, const String& scope = St ring()); 76 ScriptPromise unregisterServiceWorker(ScriptState*, const String& scope);
77 77
78 // WebServiceWorkerProviderClient overrides. 78 // WebServiceWorkerProviderClient overrides.
79 virtual void setActive(blink::WebServiceWorker*) OVERRIDE; 79 virtual void setActive(blink::WebServiceWorker*) OVERRIDE;
80 virtual void setController(blink::WebServiceWorker*) OVERRIDE; 80 virtual void setController(blink::WebServiceWorker*) OVERRIDE;
81 virtual void setInstalling(blink::WebServiceWorker*) OVERRIDE; 81 virtual void setInstalling(blink::WebServiceWorker*) OVERRIDE;
82 virtual void setWaiting(blink::WebServiceWorker*) OVERRIDE; 82 virtual void setWaiting(blink::WebServiceWorker*) OVERRIDE;
83 virtual void dispatchMessageEvent(const blink::WebString& message, const bli nk::WebMessagePortChannelArray&) OVERRIDE; 83 virtual void dispatchMessageEvent(const blink::WebString& message, const bli nk::WebMessagePortChannelArray&) OVERRIDE;
84 84
85 private: 85 private:
86 explicit ServiceWorkerContainer(ExecutionContext*); 86 explicit ServiceWorkerContainer(ExecutionContext*);
87 87
88 blink::WebServiceWorkerProvider* m_provider; 88 blink::WebServiceWorkerProvider* m_provider;
89 RefPtrWillBeMember<ServiceWorker> m_active; 89 RefPtrWillBeMember<ServiceWorker> m_active;
90 RefPtrWillBeMember<ServiceWorker> m_controller; 90 RefPtrWillBeMember<ServiceWorker> m_controller;
91 RefPtrWillBeMember<ServiceWorker> m_installing; 91 RefPtrWillBeMember<ServiceWorker> m_installing;
92 RefPtrWillBeMember<ServiceWorker> m_waiting; 92 RefPtrWillBeMember<ServiceWorker> m_waiting;
93 }; 93 };
94 94
95 } // namespace WebCore 95 } // namespace WebCore
96 96
97 #endif // ServiceWorkerContainer_h 97 #endif // ServiceWorkerContainer_h
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/unregister.html ('k') | Source/modules/serviceworkers/ServiceWorkerContainer.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698