| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 UserGestureIndicator* m_savedIndicator; | 61 UserGestureIndicator* m_savedIndicator; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 class PLATFORM_EXPORT UserGestureIndicator { | 64 class PLATFORM_EXPORT UserGestureIndicator { |
| 65 WTF_MAKE_NONCOPYABLE(UserGestureIndicator); | 65 WTF_MAKE_NONCOPYABLE(UserGestureIndicator); |
| 66 friend class UserGestureIndicatorDisabler; | 66 friend class UserGestureIndicatorDisabler; |
| 67 public: | 67 public: |
| 68 static bool processingUserGesture(); | 68 static bool processingUserGesture(); |
| 69 static bool consumeUserGesture(); | 69 static bool consumeUserGesture(); |
| 70 static UserGestureToken* currentToken(); | 70 static UserGestureToken* currentToken(); |
| 71 static void clearProcessedUserGestureInPast(); |
| 72 static bool processedUserGestureInPast(); |
| 71 | 73 |
| 72 explicit UserGestureIndicator(ProcessingUserGestureState); | 74 explicit UserGestureIndicator(ProcessingUserGestureState); |
| 73 explicit UserGestureIndicator(PassRefPtr<UserGestureToken>); | 75 explicit UserGestureIndicator(PassRefPtr<UserGestureToken>); |
| 74 ~UserGestureIndicator(); | 76 ~UserGestureIndicator(); |
| 75 | 77 |
| 76 | 78 |
| 77 private: | 79 private: |
| 78 static ProcessingUserGestureState s_state; | 80 static ProcessingUserGestureState s_state; |
| 79 static UserGestureIndicator* s_topmostIndicator; | 81 static UserGestureIndicator* s_topmostIndicator; |
| 82 static bool s_processedUserGestureInPast; |
| 80 ProcessingUserGestureState m_previousState; | 83 ProcessingUserGestureState m_previousState; |
| 81 RefPtr<UserGestureToken> m_token; | 84 RefPtr<UserGestureToken> m_token; |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 } | 87 } |
| 85 | 88 |
| 86 #endif | 89 #endif |
| OLD | NEW |