OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. | 2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 12 matching lines...) Expand all Loading... | |
23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
27 * OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * OF THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #include "config.h" | 30 #include "config.h" |
31 #include "V8TextTrackCue.h" | 31 #include "V8TextTrackCue.h" |
32 | 32 |
33 #include "V8DataCue.h" | |
33 #include "V8VTTCue.h" | 34 #include "V8VTTCue.h" |
34 | 35 |
35 namespace WebCore { | 36 namespace WebCore { |
36 | 37 |
37 v8::Handle<v8::Value> toV8(TextTrackCue* impl, v8::Handle<v8::Object> creationCo ntext, v8::Isolate* isolate) | 38 v8::Handle<v8::Value> toV8(TextTrackCue* impl, v8::Handle<v8::Object> creationCo ntext, v8::Isolate* isolate) |
38 { | 39 { |
39 return toV8(toVTTCue(impl), creationContext, isolate); | 40 switch (impl->cueType()) { |
41 case TextTrackCue::Data: | |
42 return toV8(toDataCue(impl), creationContext, isolate); | |
43 case TextTrackCue::WebVTT: | |
44 return toV8(toVTTCue(impl), creationContext, isolate); | |
45 default: | |
acolwell GONE FROM CHROMIUM
2014/04/04 23:25:27
nit: Please remove default: code so a compiler err
Brendan Long
2014/05/28 16:31:48
I get compile warnings if I remove it:
./../third
| |
46 ASSERT_NOT_REACHED(); | |
47 return v8::Handle<v8::Value>(); | |
48 } | |
40 } | 49 } |
41 | 50 |
42 } // namespace WebCore | 51 } // namespace WebCore |
OLD | NEW |