OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 20 matching lines...) Expand all Loading... | |
31 #include "config.h" | 31 #include "config.h" |
32 #include "WebUserGestureIndicator.h" | 32 #include "WebUserGestureIndicator.h" |
33 | 33 |
34 #include "WebUserGestureToken.h" | 34 #include "WebUserGestureToken.h" |
35 #include "platform/UserGestureIndicator.h" | 35 #include "platform/UserGestureIndicator.h" |
36 | 36 |
37 using namespace WebCore; | 37 using namespace WebCore; |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class WebUserGestureHandlerWrapper : public UserGestureHandler { | |
42 public: | |
43 WebUserGestureHandlerWrapper(WebUserGestureHandler* handler) | |
44 : m_handler(handler) | |
45 { | |
46 }; | |
abarth-chromium
2013/11/23 02:22:30
stray ; here
jww
2013/11/25 21:38:37
Done.
| |
47 | |
48 virtual void onGesture() | |
49 { | |
50 m_handler->onGesture(); | |
51 } | |
52 | |
53 WebUserGestureHandler* m_handler; | |
54 }; | |
55 | |
41 bool WebUserGestureIndicator::isProcessingUserGesture() | 56 bool WebUserGestureIndicator::isProcessingUserGesture() |
42 { | 57 { |
43 return UserGestureIndicator::processingUserGesture(); | 58 return UserGestureIndicator::processingUserGesture(); |
44 } | 59 } |
45 | 60 |
46 bool WebUserGestureIndicator::consumeUserGesture() | 61 bool WebUserGestureIndicator::consumeUserGesture() |
47 { | 62 { |
48 return UserGestureIndicator::consumeUserGesture(); | 63 return UserGestureIndicator::consumeUserGesture(); |
49 } | 64 } |
50 | 65 |
51 WebUserGestureToken WebUserGestureIndicator::currentUserGestureToken() | 66 WebUserGestureToken WebUserGestureIndicator::currentUserGestureToken() |
52 { | 67 { |
53 return WebUserGestureToken(UserGestureIndicator::currentToken()); | 68 return WebUserGestureToken(UserGestureIndicator::currentToken()); |
54 } | 69 } |
55 | 70 |
71 void WebUserGestureIndicator::addHandler(WebUserGestureHandler* handler) | |
72 { | |
73 UserGestureIndicator::addHandler(adoptRef(new WebUserGestureHandlerWrapper(h andler))); | |
74 } | |
75 | |
56 } // namespace blink | 76 } // namespace blink |
OLD | NEW |