OLD | NEW |
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 USBInTransferResult_h | 5 #ifndef USBInTransferResult_h |
6 #define USBInTransferResult_h | 6 #define USBInTransferResult_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/dom/DOMArrayBuffer.h" | 9 #include "core/dom/DOMArrayBuffer.h" |
10 #include "core/dom/DOMDataView.h" | 10 #include "core/dom/DOMDataView.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 USBInTransferResult(const String& status, const WebVector<uint8_t> data) | 27 USBInTransferResult(const String& status, const WebVector<uint8_t> data) |
28 : m_status(status) | 28 : m_status(status) |
29 , m_data(DOMDataView::create(DOMArrayBuffer::create(data.data(), data.si
ze()), 0, data.size())) | 29 , m_data(DOMDataView::create(DOMArrayBuffer::create(data.data(), data.si
ze()), 0, data.size())) |
30 { | 30 { |
31 } | 31 } |
32 | 32 |
33 virtual ~USBInTransferResult() { } | 33 virtual ~USBInTransferResult() { } |
34 | 34 |
35 String status() const { return m_status; } | 35 String status() const { return m_status; } |
36 PassRefPtr<DOMDataView> data() const { return m_data; } | 36 DOMDataView* data() const { return m_data; } |
37 | 37 |
38 DEFINE_INLINE_TRACE() { } | 38 DEFINE_INLINE_TRACE() |
| 39 { |
| 40 visitor->trace(m_data); |
| 41 } |
39 | 42 |
40 private: | 43 private: |
41 const String m_status; | 44 const String m_status; |
42 const RefPtr<DOMDataView> m_data; | 45 const Member<DOMDataView> m_data; |
43 }; | 46 }; |
44 | 47 |
45 } // namespace blink | 48 } // namespace blink |
46 | 49 |
47 #endif // USBInTransferResult_h | 50 #endif // USBInTransferResult_h |
OLD | NEW |