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

Unified 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: incorporated Frank's comments Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: webkit/media/webinbandtexttrack_impl.h
diff --git a/webkit/media/webinbandtexttrack_impl.h b/webkit/media/webinbandtexttrack_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..39e22310bfc711099136f1c5e48d88d6db1cd50f
--- /dev/null
+++ b/webkit/media/webinbandtexttrack_impl.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_MEDIA_WEBINANDTEXTTRACK_IMPL_H_
+#define WEBKIT_MEDIA_WEBINANDTEXTTRACK_IMPL_H_
+
+#include "base/memory/ref_counted.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebInbandTextTrack.h"
+
+namespace webkit_media {
+
+class WebInbandTextTrackImpl
+ : public WebKit::WebInbandTextTrack,
+ public base::RefCountedThreadSafe<WebInbandTextTrackImpl> {
+ public:
+ WebInbandTextTrackImpl(Kind kind,
+ const WebKit::WebString& label,
+ const WebKit::WebString& language);
+ virtual ~WebInbandTextTrackImpl();
+
+ virtual void setClient(WebKit::WebInbandTextTrackClient* client);
+ virtual WebKit::WebInbandTextTrackClient* client();
+
+ virtual void setMode(Mode mode);
+ virtual Mode mode() const;
+
+ virtual Kind kind() const;
+ virtual bool isClosedCaptions() const;
+
+ virtual WebKit::WebString label() const;
+ virtual WebKit::WebString language() const;
+ virtual bool isDefault() const;
+
+ virtual int textTrackIndex() const;
+
+ private:
+ // TODO(matthewjheaney): resolve ownership and lifetime issues
+ WebKit::WebInbandTextTrackClient* client_;
+ Mode mode_;
+ Kind kind_;
+ WebKit::WebString label_;
+ WebKit::WebString language_;
+ DISALLOW_COPY_AND_ASSIGN(WebInbandTextTrackImpl);
+};
+
+} // namespace webkit_media
+
+#endif // WEBKIT_MEDIA_WEBINANDTEXTTRACK_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698