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

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. Flip flag to experimental. 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)
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698