| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebServiceWorkerRegistrationProxy_h | 5 #ifndef WebServiceWorkerRegistrationProxy_h |
| 6 #define WebServiceWorkerRegistrationProxy_h | 6 #define WebServiceWorkerRegistrationProxy_h |
| 7 | 7 |
| 8 #include "public/platform/WebPassOwnPtr.h" | 8 #include <memory> |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class WebServiceWorker; | 12 class WebServiceWorker; |
| 13 | 13 |
| 14 // A proxy interface, passed via WebServiceWorkerRegistration.setProxy() from | 14 // A proxy interface, passed via WebServiceWorkerRegistration.setProxy() from |
| 15 // blink to the embedder, to talk to the ServiceWorkerRegistration object from | 15 // blink to the embedder, to talk to the ServiceWorkerRegistration object from |
| 16 // embedder. | 16 // embedder. |
| 17 class WebServiceWorkerRegistrationProxy { | 17 class WebServiceWorkerRegistrationProxy { |
| 18 public: | 18 public: |
| 19 // Notifies that the registration entered the installation process. | 19 // Notifies that the registration entered the installation process. |
| 20 // The installing worker should be accessible via | 20 // The installing worker should be accessible via |
| 21 // WebServiceWorkerRegistration.installing. | 21 // WebServiceWorkerRegistration.installing. |
| 22 virtual void dispatchUpdateFoundEvent() = 0; | 22 virtual void dispatchUpdateFoundEvent() = 0; |
| 23 | 23 |
| 24 virtual void setInstalling(WebPassOwnPtr<WebServiceWorker::Handle>) = 0; | 24 virtual void setInstalling(std::unique_ptr<WebServiceWorker::Handle>) = 0; |
| 25 virtual void setWaiting(WebPassOwnPtr<WebServiceWorker::Handle>) = 0; | 25 virtual void setWaiting(std::unique_ptr<WebServiceWorker::Handle>) = 0; |
| 26 virtual void setActive(WebPassOwnPtr<WebServiceWorker::Handle>) = 0; | 26 virtual void setActive(std::unique_ptr<WebServiceWorker::Handle>) = 0; |
| 27 | 27 |
| 28 protected: | 28 protected: |
| 29 virtual ~WebServiceWorkerRegistrationProxy() { } | 29 virtual ~WebServiceWorkerRegistrationProxy() { } |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace blink | 32 } // namespace blink |
| 33 | 33 |
| 34 #endif // WebServiceWorkerRegistrationProxy_h | 34 #endif // WebServiceWorkerRegistrationProxy_h |
| OLD | NEW |