blob: 060b8c5097a99d97edb8ff765cf9e28a7643ea29 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef USBIsochronousOutTransferResult_h
#define USBIsochronousOutTransferResult_h
#include "core/typed_arrays/DOMDataView.h"
#include "modules/webusb/USBIsochronousOutTransferPacket.h"
#include "platform/bindings/ScriptWrappable.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/text/WTFString.h"
namespace blink {
class USBIsochronousOutTransferResult final : public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
static USBIsochronousOutTransferResult* Create(
const HeapVector<Member<USBIsochronousOutTransferPacket>>& packets) {
return new USBIsochronousOutTransferResult(packets);
}
USBIsochronousOutTransferResult(
const HeapVector<Member<USBIsochronousOutTransferPacket>>& packets)
: packets_(packets) {}
virtual ~USBIsochronousOutTransferResult() {}
const HeapVector<Member<USBIsochronousOutTransferPacket>>& packets() const {
return packets_;
}
void Trace(blink::Visitor* visitor) override {
visitor->Trace(packets_);
ScriptWrappable::Trace(visitor);
}
private:
const HeapVector<Member<USBIsochronousOutTransferPacket>> packets_;
};
} // namespace blink
#endif // USBIsochronousOutTransferResult_h