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

Unified Diff: Source/platform/UserGestureIndicator.cpp

Issue 174893002: Remove handlers for user gesture callbacks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/UserGestureIndicator.h ('k') | Source/web/WebUserGestureIndicator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/UserGestureIndicator.cpp
diff --git a/Source/platform/UserGestureIndicator.cpp b/Source/platform/UserGestureIndicator.cpp
index 811a820ade68d9faa973133c7f82bc009bb0524a..03d219537a755790da17f7bf8602c9a560633c6b 100644
--- a/Source/platform/UserGestureIndicator.cpp
+++ b/Source/platform/UserGestureIndicator.cpp
@@ -29,7 +29,6 @@
#include "wtf/Assertions.h"
#include "wtf/CurrentTime.h"
#include "wtf/MainThread.h"
-#include "wtf/Vector.h"
namespace WebCore {
@@ -113,7 +112,6 @@ static bool isDefinite(ProcessingUserGestureState state)
ProcessingUserGestureState UserGestureIndicator::s_state = DefinitelyNotProcessingUserGesture;
UserGestureIndicator* UserGestureIndicator::s_topmostIndicator = 0;
-UserGestureHandler* UserGestureIndicator::s_handler = 0;
UserGestureIndicator::UserGestureIndicator(ProcessingUserGestureState state)
: m_previousState(s_state)
@@ -133,17 +131,10 @@ UserGestureIndicator::UserGestureIndicator(ProcessingUserGestureState state)
s_state = state;
}
- bool shouldNotifyHandler = false;
- if (state == DefinitelyProcessingNewUserGesture) {
+ if (state == DefinitelyProcessingNewUserGesture)
static_cast<GestureToken*>(m_token.get())->addGesture();
- shouldNotifyHandler = true;
- } else if (state == DefinitelyProcessingUserGesture && s_topmostIndicator == this) {
+ else if (state == DefinitelyProcessingUserGesture && s_topmostIndicator == this)
static_cast<GestureToken*>(m_token.get())->addGesture();
- shouldNotifyHandler = true;
- }
-
- if (shouldNotifyHandler && s_handler)
- s_handler->onGesture();
ASSERT(isDefinite(s_state));
}
@@ -167,9 +158,6 @@ UserGestureIndicator::UserGestureIndicator(PassRefPtr<UserGestureToken> token)
}
}
s_state = DefinitelyProcessingUserGesture;
-
- if (s_handler)
- s_handler->onGesture();
}
ASSERT(isDefinite(s_state));
@@ -206,11 +194,6 @@ UserGestureToken* UserGestureIndicator::currentToken()
return s_topmostIndicator->m_token.get();
}
-void UserGestureIndicator::setHandler(UserGestureHandler* handler)
-{
- s_handler = handler;
-}
-
UserGestureIndicatorDisabler::UserGestureIndicatorDisabler()
: m_savedState(UserGestureIndicator::s_state)
, m_savedIndicator(UserGestureIndicator::s_topmostIndicator)
« no previous file with comments | « Source/platform/UserGestureIndicator.h ('k') | Source/web/WebUserGestureIndicator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698