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

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

Issue 1315683002: WebUSB bindings part 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remote USBTransferStatus.idl Created 5 years, 3 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 2015 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 USBOutTransferResult_h
6 #define USBOutTransferResult_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/DOMArrayBuffer.h"
10 #include "platform/heap/Handle.h"
11 #include "public/platform/modules/webusb/WebUSBTransferInfo.h"
12 #include "wtf/text/WTFString.h"
13
14 namespace blink {
15
16 class USBOutTransferResult final
17 : public GarbageCollectedFinalized<USBOutTransferResult>
18 , public ScriptWrappable {
19 DEFINE_WRAPPERTYPEINFO();
20 public:
21 static USBOutTransferResult* create(const String& status, unsigned bytesWrit ten)
22 {
23 return new USBOutTransferResult(status, bytesWritten);
24 }
25
26 USBOutTransferResult(const String& status, unsigned bytesWritten)
27 : m_status(status)
28 , m_bytesWritten(bytesWritten)
29 {
30 }
31
32 virtual ~USBOutTransferResult() { }
33
34 String status() const { return m_status; }
35 unsigned bytesWritten() const { return m_bytesWritten; }
36
37 DEFINE_INLINE_TRACE() { }
38
39 private:
40 const String m_status;
41 const unsigned m_bytesWritten;
42 };
43
44 } // namespace blink
45
46 #endif // USBOutTransferResult_h
OLDNEW
« no previous file with comments | « Source/modules/webusb/USBInTransferResult.idl ('k') | Source/modules/webusb/USBOutTransferResult.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698