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

Unified Diff: Source/Platform/chromium/public/WebDeviceMotionListener.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: fixed re-entrancy issue 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 side-by-side diff with in-line comments
Download patch
Index: Source/Platform/chromium/public/WebDeviceMotionListener.h
diff --git a/Source/WebKit/chromium/public/WebMediaSource.h b/Source/Platform/chromium/public/WebDeviceMotionListener.h
similarity index 81%
copy from Source/WebKit/chromium/public/WebMediaSource.h
copy to Source/Platform/chromium/public/WebDeviceMotionListener.h
index ae7864b3090d45d155dce3a55872d6f6a27830c4..ccc9318ad0328d237735df05ed07b9d34bc04b6e 100644
--- a/Source/WebKit/chromium/public/WebMediaSource.h
+++ b/Source/Platform/chromium/public/WebDeviceMotionListener.h
@@ -28,22 +28,20 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebMediaSource_h
-#define WebMediaSource_h
-
-#include "../../../Platform/chromium/public/WebURL.h"
-#include "WebTimeRange.h"
+#ifndef WebDeviceMotionListener_h
+#define WebDeviceMotionListener_h
namespace WebKit {
-class WebMediaSourceClient;
+class WebDeviceMotionData;
-class WebMediaSource {
+// Abstract interface for the Device Motion API listener.
Peter Beverloo 2013/05/08 13:15:01 This comment doesn't add anything, I'd remove it.
timvolodine 2013/05/09 10:08:28 Done.
+class WebDeviceMotionListener {
public:
- virtual ~WebMediaSource() { };
- virtual void open(WebMediaSourceClient*) = 0;
+ // This method is called every time new motion data is available.
Peter Beverloo 2013/05/08 13:15:01 You call it "device motion data" elsewhere, let's
timvolodine 2013/05/09 10:08:28 Done.
+ virtual void didChangeDeviceMotion(const WebDeviceMotionData&) = 0;
};
} // namespace WebKit
-#endif
+#endif // WebDeviceMotionListener_h

Powered by Google App Engine
This is Rietveld 408576698