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 15 matching lines...) Expand all Loading... |
26 #ifndef UserGestureIndicator_h | 26 #ifndef UserGestureIndicator_h |
27 #define UserGestureIndicator_h | 27 #define UserGestureIndicator_h |
28 | 28 |
29 #include <wtf/Noncopyable.h> | 29 #include <wtf/Noncopyable.h> |
30 #include <wtf/RefCounted.h> | 30 #include <wtf/RefCounted.h> |
31 #include <wtf/RefPtr.h> | 31 #include <wtf/RefPtr.h> |
32 | 32 |
33 namespace WebCore { | 33 namespace WebCore { |
34 | 34 |
35 enum ProcessingUserGestureState { | 35 enum ProcessingUserGestureState { |
36 DefinitelyProcessingUserGesture, | 36 DefinitelyProcessingNewUserGesture, |
37 PossiblyProcessingUserGesture, | 37 PossiblyProcessingUserGesture, |
38 DefinitelyNotProcessingUserGesture | 38 DefinitelyNotProcessingUserGesture |
39 }; | 39 }; |
40 | 40 |
41 class UserGestureIndicator { | 41 class UserGestureIndicator { |
42 WTF_MAKE_NONCOPYABLE(UserGestureIndicator); | 42 WTF_MAKE_NONCOPYABLE(UserGestureIndicator); |
43 public: | 43 public: |
44 class Token : public RefCounted<Token> { | 44 class Token : public RefCounted<Token> { |
45 public: | 45 public: |
46 virtual ~Token() { } | 46 virtual ~Token() { } |
(...skipping 11 matching lines...) Expand all Loading... |
58 private: | 58 private: |
59 static ProcessingUserGestureState s_state; | 59 static ProcessingUserGestureState s_state; |
60 static UserGestureIndicator* s_topmostIndicator; | 60 static UserGestureIndicator* s_topmostIndicator; |
61 ProcessingUserGestureState m_previousState; | 61 ProcessingUserGestureState m_previousState; |
62 RefPtr<Token> m_token; | 62 RefPtr<Token> m_token; |
63 }; | 63 }; |
64 | 64 |
65 } | 65 } |
66 | 66 |
67 #endif | 67 #endif |
OLD | NEW |