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 CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ |
6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void unregister(blink::WebServiceWorkerProvider* provider, | 56 void unregister(blink::WebServiceWorkerProvider* provider, |
57 WebServiceWorkerUnregistrationCallbacks* callbacks) override; | 57 WebServiceWorkerUnregistrationCallbacks* callbacks) override; |
58 | 58 |
59 int64_t registration_id() const; | 59 int64_t registration_id() const; |
60 | 60 |
61 using WebServiceWorkerRegistrationHandle = | 61 using WebServiceWorkerRegistrationHandle = |
62 blink::WebServiceWorkerRegistration::Handle; | 62 blink::WebServiceWorkerRegistration::Handle; |
63 | 63 |
64 // Creates WebServiceWorkerRegistrationHandle object that owns a reference to | 64 // Creates WebServiceWorkerRegistrationHandle object that owns a reference to |
65 // the given WebServiceWorkerRegistrationImpl object. | 65 // the given WebServiceWorkerRegistrationImpl object. |
66 static blink::WebPassOwnPtr<WebServiceWorkerRegistrationHandle> CreateHandle( | 66 static std::unique_ptr<WebServiceWorkerRegistrationHandle> CreateHandle( |
67 const scoped_refptr<WebServiceWorkerRegistrationImpl>& registration); | 67 const scoped_refptr<WebServiceWorkerRegistrationImpl>& registration); |
68 | 68 |
69 // Same with CreateHandle(), but returns a raw pointer to the handle w/ its | 69 // Same with CreateHandle(), but returns a raw pointer to the handle w/ its |
70 // ownership instead. The caller must manage the ownership. This function must | 70 // ownership instead. The caller must manage the ownership. This function must |
71 // be used only for passing the handle to Blink API that does not support | 71 // be used only for passing the handle to Blink API that does not support |
72 // blink::WebPassOwnPtr. | 72 // blink::WebPassOwnPtr. |
73 static WebServiceWorkerRegistrationHandle* CreateLeakyHandle( | 73 static WebServiceWorkerRegistrationHandle* CreateLeakyHandle( |
74 const scoped_refptr<WebServiceWorkerRegistrationImpl>& registration); | 74 const scoped_refptr<WebServiceWorkerRegistrationImpl>& registration); |
75 | 75 |
76 private: | 76 private: |
(...skipping 22 matching lines...) Expand all Loading... |
99 blink::WebServiceWorkerRegistrationProxy* proxy_; | 99 blink::WebServiceWorkerRegistrationProxy* proxy_; |
100 | 100 |
101 std::vector<QueuedTask> queued_tasks_; | 101 std::vector<QueuedTask> queued_tasks_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl); | 103 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl); |
104 }; | 104 }; |
105 | 105 |
106 } // namespace content | 106 } // namespace content |
107 | 107 |
108 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ | 108 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ |
OLD | NEW |