| OLD | NEW |
| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void willBeDetachedFromFrame(); | 64 void willBeDetachedFromFrame(); |
| 65 | 65 |
| 66 void trace(Visitor*); | 66 void trace(Visitor*); |
| 67 | 67 |
| 68 PassRefPtrWillBeRawPtr<ServiceWorker> controller() { return m_controller.get
(); } | 68 PassRefPtrWillBeRawPtr<ServiceWorker> controller() { return m_controller.get
(); } |
| 69 ScriptPromise ready(ScriptState*); | 69 ScriptPromise ready(ScriptState*); |
| 70 WebServiceWorkerProvider* provider() { return m_provider; } | 70 WebServiceWorkerProvider* provider() { return m_provider; } |
| 71 | 71 |
| 72 ScriptPromise registerServiceWorker(ScriptState*, const String& pattern, con
st Dictionary&); | 72 ScriptPromise registerServiceWorker(ScriptState*, const String& pattern, con
st Dictionary&); |
| 73 ScriptPromise unregisterServiceWorker(ScriptState*, const String& scope); | 73 ScriptPromise unregisterServiceWorker(ScriptState*, const String& scope); |
| 74 ScriptPromise getRegistration(ScriptState*, const String& documentURL); |
| 74 | 75 |
| 75 // WebServiceWorkerProviderClient overrides. | 76 // WebServiceWorkerProviderClient overrides. |
| 76 virtual void setController(WebServiceWorker*) OVERRIDE; | 77 virtual void setController(WebServiceWorker*) OVERRIDE; |
| 77 virtual void setReadyRegistration(WebServiceWorkerRegistration*) OVERRIDE; | 78 virtual void setReadyRegistration(WebServiceWorkerRegistration*) OVERRIDE; |
| 78 virtual void dispatchMessageEvent(const WebString& message, const WebMessage
PortChannelArray&) OVERRIDE; | 79 virtual void dispatchMessageEvent(const WebString& message, const WebMessage
PortChannelArray&) OVERRIDE; |
| 79 | 80 |
| 80 private: | 81 private: |
| 81 explicit ServiceWorkerContainer(ExecutionContext*); | 82 explicit ServiceWorkerContainer(ExecutionContext*); |
| 82 | 83 |
| 83 typedef ScriptPromiseProperty<Member<ServiceWorkerContainer>, Member<Service
WorkerRegistration>, Member<ServiceWorkerRegistration> > ReadyProperty; | 84 typedef ScriptPromiseProperty<Member<ServiceWorkerContainer>, Member<Service
WorkerRegistration>, Member<ServiceWorkerRegistration> > ReadyProperty; |
| 84 ReadyProperty* createReadyProperty(); | 85 ReadyProperty* createReadyProperty(); |
| 85 | 86 |
| 86 WebServiceWorkerProvider* m_provider; | 87 WebServiceWorkerProvider* m_provider; |
| 87 RefPtrWillBeMember<ServiceWorker> m_controller; | 88 RefPtrWillBeMember<ServiceWorker> m_controller; |
| 88 Member<ServiceWorkerRegistration> m_readyRegistration; | 89 Member<ServiceWorkerRegistration> m_readyRegistration; |
| 89 Member<ReadyProperty> m_ready; | 90 Member<ReadyProperty> m_ready; |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 } // namespace blink | 93 } // namespace blink |
| 93 | 94 |
| 94 #endif // ServiceWorkerContainer_h | 95 #endif // ServiceWorkerContainer_h |
| OLD | NEW |