Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef PushMessagingError_h | |
| 6 #define PushMessagingError_h | |
| 7 | |
| 8 #include "core/dom/DOMError.h" | |
| 9 #include "public/platform/WebPushMessagingError.h" | |
| 10 #include "wtf/PassOwnPtr.h" | |
| 11 | |
| 12 namespace WebCore { | |
| 13 | |
| 14 class PushMessagingError { | |
| 15 public: | |
| 16 // For CallbackPromiseAdapter. | |
| 17 typedef blink::WebPushMessagingError WebType; | |
| 18 static PassRefPtr<DOMError> from(WebType* webErrorRaw) | |
|
Peter Beverloo
2014/03/10 13:59:28
RefPtrWillBeRawPtr<DOMError>
Michael van Ouwerkerk
2014/03/10 15:12:04
Punting.
| |
| 19 { | |
| 20 OwnPtr<WebType> webError = adoptPtr(webErrorRaw); | |
| 21 RefPtr<DOMError> error = DOMError::create(errorString(webError->errorTyp e), webError->message); | |
| 22 return error.release(); | |
| 23 } | |
| 24 | |
| 25 private: | |
| 26 static String errorString(blink::WebPushMessagingError::ErrorType); | |
| 27 WTF_MAKE_NONCOPYABLE(PushMessagingError); | |
|
Peter Beverloo
2014/03/10 13:59:28
micro nit: I would place a blank line above this,
Michael van Ouwerkerk
2014/03/10 15:12:04
Done.
| |
| 28 PushMessagingError() WTF_DELETED_FUNCTION; | |
| 29 }; | |
| 30 | |
| 31 } // namespace WebCore | |
| 32 | |
| 33 #endif // PushMessagingError_h | |
| OLD | NEW |