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

Unified Diff: Source/core/html/track/TrackBase.cpp

Issue 92783002: Move code that applies to audio and video tracks into TrackBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@tmp
Patch Set: Rebased again Created 6 years, 11 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
« no previous file with comments | « Source/core/html/track/TrackBase.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TrackBase.cpp
diff --git a/Source/core/html/parser/HTMLParserThread.h b/Source/core/html/track/TrackBase.cpp
similarity index 78%
copy from Source/core/html/parser/HTMLParserThread.h
copy to Source/core/html/track/TrackBase.cpp
index e0b85f9399c3856f6881e3fed668477b8a4257c2..a11c065f41080f3d1d9d5b8d9e5b8b5c4a43105d 100644
--- a/Source/core/html/parser/HTMLParserThread.h
+++ b/Source/core/html/track/TrackBase.cpp
@@ -28,27 +28,30 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HTMLParserThread_h
-#define HTMLParserThread_h
-
-#include "wtf/Functional.h"
-#include "wtf/OwnPtr.h"
-#include "public/platform/WebThread.h"
+#include "config.h"
+#include "core/html/track/TrackBase.h"
namespace WebCore {
-class HTMLParserThread {
-public:
- static HTMLParserThread* shared();
- void postTask(const Closure&);
-
-private:
- HTMLParserThread();
- ~HTMLParserThread();
-
- OwnPtr<blink::WebThread> m_thread;
-};
+TrackBase::TrackBase(Type type, const AtomicString& label, const AtomicString& language, const AtomicString& id)
+ : m_type(type)
+ , m_label(label)
+ , m_language(language)
+ , m_id(id)
+{
+}
+
+TrackBase::~TrackBase()
+{
+}
+
+void TrackBase::setKind(const AtomicString& kind)
+{
+ if (isValidKind(kind))
+ m_kind = kind;
+ else
+ m_kind = defaultKind();
+}
} // namespace WebCore
-#endif // HTMLParserThread_h
« no previous file with comments | « Source/core/html/track/TrackBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698