| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ScriptPromise registerServiceWorker(ExecutionContext*, const String& pattern
, const Dictionary&); | 67 ScriptPromise registerServiceWorker(ExecutionContext*, const String& pattern
, const Dictionary&); |
| 68 ScriptPromise unregisterServiceWorker(ExecutionContext*, const String& scope
= String()); | 68 ScriptPromise unregisterServiceWorker(ExecutionContext*, const String& scope
= String()); |
| 69 | 69 |
| 70 PassRefPtr<ServiceWorker> current() { return m_current; } | 70 PassRefPtr<ServiceWorker> controller() { return m_controller; } |
| 71 | 71 |
| 72 // WebServiceWorkerProviderClient overrides. | 72 // WebServiceWorkerProviderClient overrides. |
| 73 virtual void setController(blink::WebServiceWorker*) OVERRIDE; |
| 74 virtual void dispatchMessageEvent(const blink::WebString& message, const bli
nk::WebMessagePortChannelArray&) OVERRIDE; |
| 75 |
| 76 // FIXME: Delete this when the embedder switches to setController. |
| 73 virtual void setCurrentServiceWorker(blink::WebServiceWorker*) OVERRIDE; | 77 virtual void setCurrentServiceWorker(blink::WebServiceWorker*) OVERRIDE; |
| 74 virtual void dispatchMessageEvent(const blink::WebString& message, const bli
nk::WebMessagePortChannelArray&) OVERRIDE; | |
| 75 | 78 |
| 76 private: | 79 private: |
| 77 explicit ServiceWorkerContainer(ExecutionContext*); | 80 explicit ServiceWorkerContainer(ExecutionContext*); |
| 78 | 81 |
| 79 blink::WebServiceWorkerProvider* m_provider; | 82 blink::WebServiceWorkerProvider* m_provider; |
| 80 RefPtr<ServiceWorker> m_current; | 83 RefPtr<ServiceWorker> m_controller; |
| 81 }; | 84 }; |
| 82 | 85 |
| 83 } // namespace WebCore | 86 } // namespace WebCore |
| 84 | 87 |
| 85 #endif // ServiceWorkerContainer_h | 88 #endif // ServiceWorkerContainer_h |
| OLD | NEW |