| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 , public WebServiceWorkerProviderClient { | 58 , public WebServiceWorkerProviderClient { |
| 59 DEFINE_WRAPPERTYPEINFO(); | 59 DEFINE_WRAPPERTYPEINFO(); |
| 60 public: | 60 public: |
| 61 static ServiceWorkerContainer* create(ExecutionContext*); | 61 static ServiceWorkerContainer* create(ExecutionContext*); |
| 62 ~ServiceWorkerContainer(); | 62 ~ServiceWorkerContainer(); |
| 63 | 63 |
| 64 void willBeDetachedFromFrame(); | 64 void willBeDetachedFromFrame(); |
| 65 | 65 |
| 66 void trace(Visitor*); | 66 void trace(Visitor*); |
| 67 | 67 |
| 68 PassRefPtrWillBeRawPtr<ServiceWorker> active() { return m_active.get(); } | |
| 69 PassRefPtrWillBeRawPtr<ServiceWorker> controller() { return m_controller.get
(); } | 68 PassRefPtrWillBeRawPtr<ServiceWorker> controller() { return m_controller.get
(); } |
| 70 PassRefPtrWillBeRawPtr<ServiceWorker> installing() { return m_installing.get
(); } | |
| 71 PassRefPtrWillBeRawPtr<ServiceWorker> waiting() { return m_waiting.get(); } | |
| 72 ScriptPromise ready(ScriptState*); | 69 ScriptPromise ready(ScriptState*); |
| 73 WebServiceWorkerProvider* provider() { return m_provider; } | 70 WebServiceWorkerProvider* provider() { return m_provider; } |
| 74 | 71 |
| 75 ScriptPromise registerServiceWorker(ScriptState*, const String& pattern, con
st Dictionary&); | 72 ScriptPromise registerServiceWorker(ScriptState*, const String& pattern, con
st Dictionary&); |
| 76 ScriptPromise unregisterServiceWorker(ScriptState*, const String& scope); | 73 ScriptPromise unregisterServiceWorker(ScriptState*, const String& scope); |
| 77 | 74 |
| 78 // WebServiceWorkerProviderClient overrides. | 75 // WebServiceWorkerProviderClient overrides. |
| 79 virtual void setActive(WebServiceWorker*) OVERRIDE; | |
| 80 virtual void setController(WebServiceWorker*) OVERRIDE; | 76 virtual void setController(WebServiceWorker*) OVERRIDE; |
| 81 virtual void setInstalling(WebServiceWorker*) OVERRIDE; | |
| 82 virtual void setWaiting(WebServiceWorker*) OVERRIDE; | |
| 83 virtual void setReadyRegistration(WebServiceWorkerRegistration*) OVERRIDE; | 77 virtual void setReadyRegistration(WebServiceWorkerRegistration*) OVERRIDE; |
| 84 virtual void dispatchMessageEvent(const WebString& message, const WebMessage
PortChannelArray&) OVERRIDE; | 78 virtual void dispatchMessageEvent(const WebString& message, const WebMessage
PortChannelArray&) OVERRIDE; |
| 85 | 79 |
| 86 private: | 80 private: |
| 87 explicit ServiceWorkerContainer(ExecutionContext*); | 81 explicit ServiceWorkerContainer(ExecutionContext*); |
| 88 | 82 |
| 89 typedef ScriptPromiseProperty<Member<ServiceWorkerContainer>, Member<Service
WorkerRegistration>, Member<ServiceWorkerRegistration> > ReadyProperty; | 83 typedef ScriptPromiseProperty<Member<ServiceWorkerContainer>, Member<Service
WorkerRegistration>, Member<ServiceWorkerRegistration> > ReadyProperty; |
| 90 ReadyProperty* createReadyProperty(); | 84 ReadyProperty* createReadyProperty(); |
| 91 | 85 |
| 92 WebServiceWorkerProvider* m_provider; | 86 WebServiceWorkerProvider* m_provider; |
| 93 RefPtrWillBeMember<ServiceWorker> m_active; | |
| 94 RefPtrWillBeMember<ServiceWorker> m_controller; | 87 RefPtrWillBeMember<ServiceWorker> m_controller; |
| 95 RefPtrWillBeMember<ServiceWorker> m_installing; | |
| 96 RefPtrWillBeMember<ServiceWorker> m_waiting; | |
| 97 Member<ServiceWorkerRegistration> m_readyRegistration; | 88 Member<ServiceWorkerRegistration> m_readyRegistration; |
| 98 Member<ReadyProperty> m_ready; | 89 Member<ReadyProperty> m_ready; |
| 99 }; | 90 }; |
| 100 | 91 |
| 101 } // namespace blink | 92 } // namespace blink |
| 102 | 93 |
| 103 #endif // ServiceWorkerContainer_h | 94 #endif // ServiceWorkerContainer_h |
| OLD | NEW |