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

Side by Side Diff: Source/core/html/track/DataCue.h

Issue 224833002: Implement DataCue interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove text attribute Created 6 years, 6 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/core/core.gypi ('k') | Source/core/html/track/DataCue.cpp » ('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 2014 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 DataCue_h
6 #define DataCue_h
7
8 #include "bindings/v8/ScriptWrappable.h"
9 #include "core/html/track/TextTrackCue.h"
10 #include "wtf/ArrayBuffer.h"
11
12 namespace WebCore {
13
14 class ExecutionContext;
15
16 class DataCue FINAL : public TextTrackCue, public ScriptWrappable, public Contex tLifecycleObserver {
17 public:
18 static PassRefPtr<DataCue> create(ExecutionContext* context, double start, d ouble end, ArrayBuffer* data)
19 {
20 return adoptRef(new DataCue(context, start, end, data));
21 }
22
23 virtual ~DataCue();
24
25 PassRefPtr<ArrayBuffer> data() const;
26 void setData(ArrayBuffer*);
27
28 virtual CueType cueType() const OVERRIDE { return Data; }
29
30 virtual ExecutionContext* executionContext() const OVERRIDE;
31
32 #ifndef NDEBUG
33 virtual String toString() const OVERRIDE;
34 #endif
35
36 protected:
37 DataCue(ExecutionContext*, double start, double end, ArrayBuffer*);
38
39 private:
40 RefPtr<ArrayBuffer> m_data;
41 };
42
43 DEFINE_TYPE_CASTS(DataCue, TextTrackCue, cue, cue->cueType() == TextTrackCue::Da ta, cue.cueType() == TextTrackCue::Data);
44
45 } // namespace WebCore
46
47 #endif
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/html/track/DataCue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698