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

Unified Diff: Source/platform/PlatformThreadData.cpp

Issue 1162753003: Revert "Implement timers by posting delayed tasks" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/platform/PlatformThreadData.h ('k') | Source/platform/SharedTimer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/PlatformThreadData.cpp
diff --git a/Source/web/WebUserGestureIndicator.cpp b/Source/platform/PlatformThreadData.cpp
similarity index 75%
copy from Source/web/WebUserGestureIndicator.cpp
copy to Source/platform/PlatformThreadData.cpp
index 7a119b836f4f7092213049d195d433df080b4459..bdb142a882655f3ca56b1c74b81edb981e2f6122 100644
--- a/Source/web/WebUserGestureIndicator.cpp
+++ b/Source/platform/PlatformThreadData.cpp
@@ -29,26 +29,35 @@
*/
#include "config.h"
-#include "public/web/WebUserGestureIndicator.h"
+#include "platform/PlatformThreadData.h"
-#include "platform/UserGestureIndicator.h"
-#include "public/web/WebUserGestureToken.h"
+#include "platform/ThreadTimers.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/ThreadSpecific.h"
namespace blink {
-bool WebUserGestureIndicator::isProcessingUserGesture()
+static ThreadSpecific<PlatformThreadData>* s_data;
+
+PlatformThreadData::PlatformThreadData()
+ : m_threadTimers(adoptPtr(new ThreadTimers))
+{
+}
+
+PlatformThreadData::~PlatformThreadData()
{
- return UserGestureIndicator::processingUserGesture();
}
-bool WebUserGestureIndicator::consumeUserGesture()
+void PlatformThreadData::destroy()
{
- return UserGestureIndicator::consumeUserGesture();
+ m_threadTimers.clear();
}
-WebUserGestureToken WebUserGestureIndicator::currentUserGestureToken()
+PlatformThreadData& PlatformThreadData::current()
{
- return WebUserGestureToken(UserGestureIndicator::currentToken());
+ if (!s_data)
+ s_data = new ThreadSpecific<PlatformThreadData>;
+ return **s_data;
}
} // namespace blink
« no previous file with comments | « Source/platform/PlatformThreadData.h ('k') | Source/platform/SharedTimer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698