Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(914)

Side by Side Diff: Tools/DumpRenderTree/chromium/TestRunner/src/MockWebDeviceMotionHandler.h

Issue 14460010: Implement the Blink part of the Device Motion API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: made WebDeviceMotionData more "POD-ish" Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 MockWebDeviceMotionHandler_h
6 #define MockWebDeviceMotionHandler_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/WebDeviceMotionHand ler.h"
12
13 namespace WebKit {
14 class WebDeviceMotionData;
15 class WebDeviceMotionListener;
16 }
17
18 namespace WebTestRunner {
19
20 class DeviceMotionSharedMemoryReader;
21
22 class MockWebDeviceMotionHandler : public WebKit::WebDeviceMotionHandler {
23 public:
24 MockWebDeviceMotionHandler() { }
25 virtual ~MockWebDeviceMotionHandler() { }
26
27 // Sets the listener to receive updates for device motion data at
28 // regular intervals.
29 virtual void startListeningToDeviceMotion(WebKit::WebDeviceMotionListener*) OVERRIDE;
30
31 // Removes the current listener after which it will not receive any updates.
32 virtual void stopListeningToDeviceMotion() OVERRIDE;
33
34 void fireEvent(WebKit::WebDeviceMotionData&);
35
36 private:
37 WebKit::WebDeviceMotionListener* m_listener;
38
39 };
40
41 } // namespace WebTestRunner
42
43 #endif // MockWebDeviceMotionHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698