| 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef ServiceWorkerError_h | 31 #ifndef ServiceWorkerError_h |
| 32 #define ServiceWorkerError_h | 32 #define ServiceWorkerError_h |
| 33 | 33 |
| 34 #include "platform/heap/Handle.h" | 34 #include "platform/heap/Handle.h" |
| 35 #include "public/platform/modules/serviceworker/WebServiceWorkerError.h" | 35 #include "public/platform/modules/serviceworker/WebServiceWorkerError.h" |
| 36 #include "wtf/OwnPtr.h" | 36 #include "wtf/OwnPtr.h" |
| 37 #include "wtf/PassOwnPtr.h" | 37 #include "wtf/PassOwnPtr.h" |
| 38 | 38 |
| 39 #include <v8.h> |
| 40 |
| 39 namespace blink { | 41 namespace blink { |
| 40 | 42 |
| 41 class DOMException; | 43 class DOMException; |
| 42 class ScriptPromiseResolver; | 44 class ScriptPromiseResolver; |
| 43 | 45 |
| 44 class ServiceWorkerError { | 46 class ServiceWorkerError { |
| 45 STATIC_ONLY(ServiceWorkerError); | 47 STATIC_ONLY(ServiceWorkerError); |
| 46 public: | 48 public: |
| 47 // For CallbackPromiseAdapter | 49 // For CallbackPromiseAdapter |
| 48 using WebType = const WebServiceWorkerError&; | 50 using WebType = const WebServiceWorkerError&; |
| 49 static DOMException* take(ScriptPromiseResolver*, const WebServiceWorkerErro
r& webError); | 51 static DOMException* take(ScriptPromiseResolver*, const WebServiceWorkerErro
r& webError); |
| 50 }; | 52 }; |
| 51 | 53 |
| 54 class ServiceWorkerErrorForUpdate : public ServiceWorkerError { |
| 55 STATIC_ONLY(ServiceWorkerErrorForUpdate); |
| 56 public: |
| 57 // For CallbackPromiseAdapter |
| 58 static v8::Local<v8::Value> take(ScriptPromiseResolver* resolver, const WebS
erviceWorkerError& webError); |
| 59 }; |
| 60 |
| 52 } // namespace blink | 61 } // namespace blink |
| 53 | 62 |
| 54 #endif // ServiceWorkerError_h | 63 #endif // ServiceWorkerError_h |
| OLD | NEW |