Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: Source/modules/pushmessaging/PushMessagingError.h

Issue 152763002: DO NOT REVIEW Bindings and plumbing for push messaging API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Address some review comments. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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)
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
28 WTF_MAKE_NONCOPYABLE(PushMessagingError);
29 PushMessagingError() WTF_DELETED_FUNCTION;
30 };
31
32 } // namespace WebCore
33
34 #endif // PushMessagingError_h
OLDNEW
« no previous file with comments | « Source/modules/pushmessaging/PushManager.idl ('k') | Source/modules/pushmessaging/PushMessagingError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698