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 #include "config.h" | 5 #include "config.h" |
6 #include "public/platform/WebServiceWorkerRegistrationProxy.h" | 6 #include "public/platform/WebServiceWorkerRegistrationProxy.h" |
7 | 7 |
| 8 #include "platform/serviceworkers/ServiceWorkerRegistrationProxy.h" |
| 9 |
8 namespace blink { | 10 namespace blink { |
9 | 11 |
10 WebServiceWorkerRegistrationProxy::WebServiceWorkerRegistrationProxy(ServiceWork
erRegistration* registration) | 12 WebServiceWorkerRegistrationProxy::WebServiceWorkerRegistrationProxy(ServiceWork
erRegistrationProxy* registration) |
11 : m_private(registration) | 13 : m_private(registration) |
12 { | 14 { |
13 } | 15 } |
14 | 16 |
15 WebServiceWorkerRegistrationProxy::operator ServiceWorkerRegistration*() const | 17 WebServiceWorkerRegistrationProxy& WebServiceWorkerRegistrationProxy::operator=(
ServiceWorkerRegistrationProxy* registration) |
16 { | 18 { |
17 return m_private; | 19 m_private = registration; |
| 20 return *this; |
| 21 } |
| 22 |
| 23 void WebServiceWorkerRegistrationProxy::assign(const WebServiceWorkerRegistratio
nProxy& other) |
| 24 { |
| 25 m_private = other.m_private; |
| 26 } |
| 27 |
| 28 void WebServiceWorkerRegistrationProxy::reset() |
| 29 { |
| 30 m_private.reset(); |
| 31 } |
| 32 |
| 33 WebServiceWorkerRegistrationProxy::operator ServiceWorkerRegistrationProxy*() co
nst |
| 34 { |
| 35 return m_private.get(); |
18 } | 36 } |
19 | 37 |
20 } // namespace blink | 38 } // namespace blink |
OLD | NEW |