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

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

Issue 1245363002: Add WebUSB bindings and client interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: iface ctors, OWNERS, rebase 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/USBError.cpp ('k') | Source/modules/webusb/USBInTransferResult.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 USBInTransferResult_h
6 #define USBInTransferResult_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "platform/heap/Heap.h"
10
11 namespace blink {
12
13 class DOMArrayBuffer;
14
15 class USBInTransferResult
16 : public GarbageCollected<USBInTransferResult>
17 , public ScriptWrappable {
18 DEFINE_WRAPPERTYPEINFO();
19 public:
20 static USBInTransferResult* create(const String& status, PassRefPtr<DOMArray Buffer> data)
21 {
22 return new USBInTransferResult(status, data);
23 }
24
25 USBInTransferResult(const String& status, PassRefPtr<DOMArrayBuffer> data)
26 : m_status(status)
27 , m_data(data)
28 {
29 }
30
31 String status() const { return m_status; }
32 DOMArrayBuffer* data() const { return m_data.get(); }
33
34 DEFINE_INLINE_TRACE() { }
35
36 private:
37 String m_status;
38 RefPtr<DOMArrayBuffer> m_data;
39 };
40
41 } // namespace blink
42
43 #endif // USBInTransferResult_h
OLDNEW
« no previous file with comments | « Source/modules/webusb/USBError.cpp ('k') | Source/modules/webusb/USBInTransferResult.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698