Index: Source/core/html/track/TrackBase.cpp |
diff --git a/Source/platform/PlatformThreadData.cpp b/Source/core/html/track/TrackBase.cpp |
similarity index 72% |
copy from Source/platform/PlatformThreadData.cpp |
copy to Source/core/html/track/TrackBase.cpp |
index b23dbed9d8e0a82d135e81fc75b4aef15f82d420..9b86af0bd850764105f99c9e895c1cb5393655b2 100644 |
--- a/Source/platform/PlatformThreadData.cpp |
+++ b/Source/core/html/track/TrackBase.cpp |
@@ -1,5 +1,6 @@ |
/* |
- * Copyright (C) 2013 Google Inc. All rights reserved. |
+ * Copyright (C) 2011 Google Inc. All rights reserved. |
acolwell GONE FROM CHROMIUM
2013/11/28 03:02:17
Since this is a new file to Blink, I believe this
|
+ * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -29,35 +30,34 @@ |
*/ |
#include "config.h" |
-#include "platform/PlatformThreadData.h" |
+#include "core/html/track/TrackBase.h" |
-#include "platform/ThreadTimers.h" |
-#include "wtf/PassOwnPtr.h" |
-#include "wtf/ThreadSpecific.h" |
+#include "core/html/HTMLMediaElement.h" |
namespace WebCore { |
-static ThreadSpecific<PlatformThreadData>* s_data; |
- |
-PlatformThreadData::PlatformThreadData() |
- : m_threadTimers(adoptPtr(new ThreadTimers)) |
+TrackBase::TrackBase(Type type, const AtomicString& label, const AtomicString& language, const AtomicString& id) |
+ : m_type(type) |
+ , m_mediaElement(0) |
+ , m_label(label) |
+ , m_language(language) |
+ , m_id(id) |
{ |
} |
-PlatformThreadData::~PlatformThreadData() |
+TrackBase::~TrackBase() |
{ |
} |
-void PlatformThreadData::destroy() |
+void TrackBase::setKind(const AtomicString& kind) |
{ |
- m_threadTimers.clear(); |
-} |
+ String oldKind = m_kind; |
-PlatformThreadData& PlatformThreadData::current() |
-{ |
- if (!s_data) |
- s_data = new ThreadSpecific<PlatformThreadData>; |
- return **s_data; |
+ if (isValidKind(kind)) |
+ m_kind = kind; |
+ else |
+ m_kind = defaultKind(); |
} |
} // namespace WebCore |
+ |