| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef ServiceWorker_h | 31 #ifndef ServiceWorker_h |
| 32 #define ServiceWorker_h | 32 #define ServiceWorker_h |
| 33 | 33 |
| 34 #include "public/platform/WebServiceWorker.h" | 34 #include "public/platform/WebServiceWorker.h" |
| 35 #include "wtf/OwnPtr.h" | 35 #include "wtf/OwnPtr.h" |
| 36 #include "wtf/PassOwnPtr.h" | 36 #include "wtf/PassOwnPtr.h" |
| 37 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
| 38 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
| 39 | 39 |
| 40 namespace WebKit { | 40 namespace blink { |
| 41 class WebServiceWorker; | 41 class WebServiceWorker; |
| 42 } | 42 } |
| 43 | 43 |
| 44 namespace WebCore { | 44 namespace WebCore { |
| 45 | 45 |
| 46 class ServiceWorker : public RefCounted<ServiceWorker> { | 46 class ServiceWorker : public RefCounted<ServiceWorker> { |
| 47 public: | 47 public: |
| 48 static PassRefPtr<ServiceWorker> create(PassOwnPtr<WebKit::WebServiceWorker>
worker) | 48 static PassRefPtr<ServiceWorker> create(PassOwnPtr<blink::WebServiceWorker>
worker) |
| 49 { | 49 { |
| 50 return adoptRef(new ServiceWorker(worker)); | 50 return adoptRef(new ServiceWorker(worker)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 // For CallbackPromiseAdapter | 53 // For CallbackPromiseAdapter |
| 54 typedef WebKit::WebServiceWorker WebType; | 54 typedef blink::WebServiceWorker WebType; |
| 55 static PassRefPtr<ServiceWorker> from(WebType* worker) | 55 static PassRefPtr<ServiceWorker> from(WebType* worker) |
| 56 { | 56 { |
| 57 return create(adoptPtr(worker)); | 57 return create(adoptPtr(worker)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 ~ServiceWorker() { } | 60 ~ServiceWorker() { } |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 explicit ServiceWorker(PassOwnPtr<WebKit::WebServiceWorker>); | 63 explicit ServiceWorker(PassOwnPtr<blink::WebServiceWorker>); |
| 64 | 64 |
| 65 OwnPtr<WebKit::WebServiceWorker> m_outerWorker; | 65 OwnPtr<blink::WebServiceWorker> m_outerWorker; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace WebCore | 68 } // namespace WebCore |
| 69 | 69 |
| 70 #endif // ServiceWorker_h | 70 #endif // ServiceWorker_h |
| OLD | NEW |