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

Side by Side Diff: Source/WebKit/chromium/public/WebInbandTextTrack.h

Issue 13968007: Create WebInbandTextTrack and WebInbandTextTrackClient (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebMediaSourceClient_h 31 #ifndef WebInbandTextTrack_h
32 #define WebMediaSourceClient_h 32 #define WebInbandTextTrack_h
33
34 #include "../../../Platform/chromium/public/WebString.h"
35 #include "WebTimeRange.h"
36 33
37 namespace WebKit { 34 namespace WebKit {
38 35
39 class WebSourceBuffer; 36 class WebString;
37 class WebInbandTextTrackClient;
40 38
41 class WebMediaSourceClient { 39 class WebInbandTextTrack {
42 public: 40 public:
43 enum AddStatus { 41 virtual ~WebInbandTextTrack() {}
44 AddStatusOk,
45 AddStatusNotSupported,
46 AddStatusReachedIdLimit
47 };
48 42
49 enum EndOfStreamStatus { 43 virtual void setClient(WebInbandTextTrackClient* client) = 0;
50 EndOfStreamStatusNoError, 44 virtual WebInbandTextTrackClient* client() = 0;
51 EndOfStreamStatusNetworkError,
52 EndOfStreamStatusDecodeError,
53 };
54 45
55 virtual ~WebMediaSourceClient() { } 46 enum Mode { Disabled, Hidden, Showing };
acolwell GONE FROM CHROMIUM 2013/04/17 00:13:56 nit: Move this enum and the Kind one up above func
Matthew Heaney (Chromium) 2013/04/18 23:15:42 Done.
47 virtual void setMode(Mode mode) = 0;
acolwell GONE FROM CHROMIUM 2013/04/17 00:13:56 nit: s/mode// . Blink doesn't specify parameter na
Matthew Heaney (Chromium) 2013/04/18 23:15:42 Done.
48 virtual Mode mode() const = 0;
56 49
57 virtual AddStatus addSourceBuffer(const WebString& type, const WebVector<Web String>& codecs, WebSourceBuffer**) = 0; 50 // TODO(matthewjheaney): Is this enum type necessary?
58 virtual double duration() = 0; 51 // Can we use TextKind in pipeline_status.h?
acolwell GONE FROM CHROMIUM 2013/04/17 00:13:56 Yes this enum is necessary. Blink cannot have any
Matthew Heaney (Chromium) 2013/04/18 23:15:42 Done.
59 virtual void setDuration(double) = 0; 52 enum Kind { Subtitles, Captions, Descriptions, Chapters, Metadata, None };
60 virtual void endOfStream(EndOfStreamStatus) = 0; 53 virtual Kind kind() const = 0;
54 virtual bool isClosedCaptions() const = 0;
55
56 virtual WebString label() const = 0;
57 virtual WebString language() const = 0;
58 virtual bool isDefault() const = 0;
59
60 virtual int textTrackIndex() const = 0;
61 }; 61 };
62 62
63 } // namespace WebKit 63 } // namespace WebKit
64 64
65 #endif 65 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698