OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MockWebDeviceMotionProvider_h |
| 6 #define MockWebDeviceMotionProvider_h |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/shared_memory.h" |
| 10 #include "base/time.h" |
| 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebDeviceMotionProv
ider.h" |
| 12 |
| 13 namespace WebKit { |
| 14 class WebDeviceMotionData; |
| 15 class WebDeviceMotionListener; |
| 16 } |
| 17 |
| 18 namespace WebTestRunner { |
| 19 |
| 20 class MockWebDeviceMotionProvider : public WebKit::WebDeviceMotionProvider { |
| 21 public: |
| 22 MockWebDeviceMotionProvider() { } |
| 23 virtual ~MockWebDeviceMotionProvider() { } |
| 24 |
| 25 // Sets the listener to receive updates for device motion data at |
| 26 // regular intervals. |
| 27 virtual void setListener(WebKit::WebDeviceMotionListener*) OVERRIDE; |
| 28 |
| 29 void fireEvent(WebKit::WebDeviceMotionData&); |
| 30 |
| 31 private: |
| 32 WebKit::WebDeviceMotionListener* m_listener; |
| 33 |
| 34 }; |
| 35 |
| 36 } // namespace WebTestRunner |
| 37 |
| 38 #endif // MockWebDeviceMotionProvider_h |
OLD | NEW |