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

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

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/html/track/DataCue.h ('k') | Source/core/html/track/DataCue.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 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 #include "config.h"
6 #include "core/html/track/DataCue.h"
7
8 namespace WebCore {
9
10 DataCue::DataCue(ExecutionContext* context, double startTime, double endTime, Ar rayBuffer* data)
11 : TextTrackCue(startTime, endTime)
12 , ContextLifecycleObserver(context)
13 {
14 ScriptWrappable::init(this);
15 setData(data);
16 }
17
18 DataCue::~DataCue()
19 {
20 }
21
22 #ifndef NDEBUG
23 String DataCue::toString() const
24 {
25 return String::format("%p id=%s interval=%f-->%f)", this, id().utf8().data() , startTime(), endTime());
26 }
27 #endif
28
29 PassRefPtr<ArrayBuffer> DataCue::data() const
30 {
31 ASSERT(m_data);
32 return ArrayBuffer::create(m_data.get());
33 }
34
35 void DataCue::setData(ArrayBuffer* data)
36 {
37 m_data = ArrayBuffer::create(data);
38 }
39
40 ExecutionContext* DataCue::executionContext() const
41 {
42 return ContextLifecycleObserver::executionContext();
43 }
44
45 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/track/DataCue.h ('k') | Source/core/html/track/DataCue.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698