| Index: Source/core/html/track/DataCue.h
|
| diff --git a/Source/core/html/track/DataCue.h b/Source/core/html/track/DataCue.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2c0f4c4a1597cefc48494082841ff572ba77b96f
|
| --- /dev/null
|
| +++ b/Source/core/html/track/DataCue.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2014 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 DataCue_h
|
| +#define DataCue_h
|
| +
|
| +#include "bindings/v8/ScriptWrappable.h"
|
| +#include "core/html/track/TextTrackCue.h"
|
| +#include "wtf/ArrayBuffer.h"
|
| +
|
| +namespace WebCore {
|
| +
|
| +class ExecutionContext;
|
| +
|
| +class DataCue FINAL : public TextTrackCue, public ScriptWrappable, public ContextLifecycleObserver {
|
| +public:
|
| + static PassRefPtr<DataCue> create(ExecutionContext* context, double start, double end, ArrayBuffer* data)
|
| + {
|
| + return adoptRef(new DataCue(context, start, end, data));
|
| + }
|
| +
|
| + virtual ~DataCue();
|
| +
|
| + PassRefPtr<ArrayBuffer> data() const;
|
| + void setData(ArrayBuffer*);
|
| +
|
| + virtual CueType cueType() const OVERRIDE { return Data; }
|
| +
|
| + virtual ExecutionContext* executionContext() const OVERRIDE;
|
| +
|
| +#ifndef NDEBUG
|
| + virtual String toString() const OVERRIDE;
|
| +#endif
|
| +
|
| +protected:
|
| + DataCue(ExecutionContext*, double start, double end, ArrayBuffer*);
|
| +
|
| +private:
|
| + RefPtr<ArrayBuffer> m_data;
|
| +};
|
| +
|
| +DEFINE_TYPE_CASTS(DataCue, TextTrackCue, cue, cue->cueType() == TextTrackCue::Data, cue.cueType() == TextTrackCue::Data);
|
| +
|
| +} // namespace WebCore
|
| +
|
| +#endif
|
|
|