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

Side by Side Diff: webkit/media/webinbandtexttrack_impl.h

Issue 13419002: Media Source dispatches inband text tracks (Closed) Base URL: http://git.chromium.org/chromium/src.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
(Empty)
1 // Copyright (c) 2013 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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player.
6 // It contains Pipeline which is the actual media player pipeline, it glues
7 // the media player pipeline, data source, audio renderer and renderer.
8 // Pipeline would creates multiple threads and access some public methods
fgalligan1 2013/04/02 19:38:32 s/would//
Matthew Heaney (Chromium) 2013/04/04 04:01:52 This comment was a copy-and-paste of another. Com
9 // of this class, so we need to be extra careful about concurrent access of
10 // methods and members.
11 //
12 // Other issues:
13 // During tear down of the whole browser or a tab, the DOM tree may not be
14 // destructed nicely, and there will be some dangling media threads trying to
fgalligan1 2013/04/02 19:38:32 s/to/to access/
Matthew Heaney (Chromium) 2013/04/04 04:01:52 ack
15 // the main thread, so we need this class to listen to destruction event of the
16 // main thread and cleanup the media threads when the even is received. Also
fgalligan1 2013/04/02 19:38:32 s/even/event/
Matthew Heaney (Chromium) 2013/04/04 04:01:52 ack
17 // at destruction of this class we will need to unhook it from destruction event
18 // list of the main thread.
19
20 #ifndef WEBKIT_MEDIA_WEBINANDTEXTTRACK_IMPL_H_
21 #define WEBKIT_MEDIA_WEBINANDTEXTTRACK_IMPL_H_
22
23 #include "base/memory/ref_counted.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInbandTextTrack.h"
25
26 namespace webkit_media {
27
28 class WebInbandTextTrackImpl
29 : public WebKit::WebInbandTextTrack,
30 public base::RefCountedThreadSafe<WebInbandTextTrackImpl> {
31 public:
32 WebInbandTextTrackImpl(Kind kind,
33 const WebKit::WebString& label,
34 const WebKit::WebString& language);
35 virtual ~WebInbandTextTrackImpl();
36
37 // TODO(matthewjheaney): Need help with this type
38 //virtual void setClient(WebCore::InbandTextTrackPrivateClient* client);
scherkus (not reviewing) 2013/04/04 01:03:46 you'll have to define a WebKit::WebInbandTextTrack
Matthew Heaney (Chromium) 2013/04/04 04:01:52 OK. Have WebKit::WebInbandTextTrackPrivateClient
39 //virtual WebCore::InbandTextTrackPrivateClient* client();
40
41 // TODO(matthewjheaney): For now try this:
42 virtual void setClient(WebKit::WebInbandTextTrackPrivateClient* client);
scherkus (not reviewing) 2013/04/04 01:03:46 ah! this looks just about right :) you can ditch
Matthew Heaney (Chromium) 2013/04/04 04:01:52 Done.
43 virtual WebKit::WebInbandTextTrackPrivateClient* client();
44
45 virtual void setMode(Mode mode);
46 virtual Mode mode() const;
47
48 virtual Kind kind() const;
49 virtual bool isClosedCaptions() const;
50
51 virtual WebKit::WebString label() const;
52 virtual WebKit::WebString language() const;
53 virtual bool isDefault() const;
54
55 virtual int textTrackIndex() const;
56
57 private:
58 // TODO(matthewjheaney): resolve ownership issues
59 WebKit::WebInbandTextTrackPrivateClient* client_;
60 Mode mode_;
61 Kind kind_;
62 WebKit::WebString label_;
63 WebKit::WebString language_;
64 DISALLOW_COPY_AND_ASSIGN(WebInbandTextTrackImpl);
65 };
66
67 } // namespace webkit_media
68
69 #endif // WEBKIT_MEDIA_WEBINANDTEXTTRACK_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698