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

Side by Side Diff: Source/modules/webusb/USBError.h

Issue 1284033002: WebUSB bindings part 5 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/modules/webusb/USB.cpp ('k') | Source/modules/webusb/USBError.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef USBError_h 5 #ifndef USBError_h
6 #define USBError_h 6 #define USBError_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "public/platform/modules/webusb/WebUSBError.h" 9 #include "public/platform/modules/webusb/WebUSBError.h"
10 #include "wtf/PassOwnPtr.h" 10 #include "wtf/PassOwnPtr.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class DOMException; 14 class DOMException;
15 class ScriptPromiseResolver; 15 class ScriptPromiseResolver;
16 16
17 // USBError is used with CallbackPromiseAdapter to receive WebUSBError 17 // USBError is used with CallbackPromiseAdapter to receive WebUSBError
18 // responses. See CallbackPromiseAdapter class comments. 18 // responses. See CallbackPromiseAdapter class comments.
19 class USBError { 19 class USBError {
20 WTF_MAKE_NONCOPYABLE(USBError); 20 WTF_MAKE_NONCOPYABLE(USBError);
21 public: 21 public:
22 // Interface required by CallbackPromiseAdapter: 22 // Interface required by CallbackPromiseAdapter:
23 using WebType = WebUSBError; 23 using WebType = const WebUSBError&;
24 static DOMException* take(ScriptPromiseResolver*, PassOwnPtr<WebUSBError>); 24 static DOMException* take(ScriptPromiseResolver*, const WebUSBError&);
25 25
26 private: 26 private:
27 USBError() = delete; 27 USBError() = delete;
28 }; 28 };
29 29
30 } // namespace blink 30 } // namespace blink
31 31
32 #endif // USBError_h 32 #endif // USBError_h
OLDNEW
« no previous file with comments | « Source/modules/webusb/USB.cpp ('k') | Source/modules/webusb/USBError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698