| 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
|
|
|