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 16 matching lines...) Expand all Loading... |
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 DefinitelyProcessingNewUserGesture, | 36 DefinitelyProcessingNewUserGesture, |
| 37 DefinitelyProcessingUserGesture, |
37 PossiblyProcessingUserGesture, | 38 PossiblyProcessingUserGesture, |
38 DefinitelyNotProcessingUserGesture | 39 DefinitelyNotProcessingUserGesture |
39 }; | 40 }; |
40 | 41 |
41 class UserGestureIndicator { | 42 class UserGestureIndicator { |
42 WTF_MAKE_NONCOPYABLE(UserGestureIndicator); | 43 WTF_MAKE_NONCOPYABLE(UserGestureIndicator); |
43 public: | 44 public: |
44 class Token : public RefCounted<Token> { | 45 class Token : public RefCounted<Token> { |
45 public: | 46 public: |
46 virtual ~Token() { } | 47 virtual ~Token() { } |
(...skipping 11 matching lines...) Expand all Loading... |
58 private: | 59 private: |
59 static ProcessingUserGestureState s_state; | 60 static ProcessingUserGestureState s_state; |
60 static UserGestureIndicator* s_topmostIndicator; | 61 static UserGestureIndicator* s_topmostIndicator; |
61 ProcessingUserGestureState m_previousState; | 62 ProcessingUserGestureState m_previousState; |
62 RefPtr<Token> m_token; | 63 RefPtr<Token> m_token; |
63 }; | 64 }; |
64 | 65 |
65 } | 66 } |
66 | 67 |
67 #endif | 68 #endif |
OLD | NEW |