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

Side by Side Diff: Source/modules/device_orientation/DeviceSensorEventController.h

Issue 21256002: Fire null Device Motion events only once. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixed comments Created 7 years, 4 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
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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 protected: 42 protected:
43 explicit DeviceSensorEventController(Document*); 43 explicit DeviceSensorEventController(Document*);
44 virtual ~DeviceSensorEventController(); 44 virtual ~DeviceSensorEventController();
45 45
46 void dispatchDeviceEvent(const PassRefPtr<Event>); 46 void dispatchDeviceEvent(const PassRefPtr<Event>);
47 47
48 virtual bool hasLastData() = 0; 48 virtual bool hasLastData() = 0;
49 virtual PassRefPtr<Event> getLastEvent() = 0; 49 virtual PassRefPtr<Event> getLastEvent() = 0;
50 virtual void registerWithDispatcher() = 0; 50 virtual void registerWithDispatcher() = 0;
51 virtual void unregisterWithDispatcher() = 0; 51 virtual void unregisterWithDispatcher() = 0;
52 virtual bool isNullEvent(Event*) = 0;
52 53
53 private: 54 private:
54 void fireDeviceEvent(Timer<DeviceSensorEventController>*); 55 void fireDeviceEvent(Timer<DeviceSensorEventController>*);
55 56
56 Document* m_document; 57 Document* m_document;
57 bool m_isActive; 58 bool m_isActive;
59 bool m_needsCheckingNullEvents;
58 Timer<DeviceSensorEventController> m_timer; 60 Timer<DeviceSensorEventController> m_timer;
59 }; 61 };
60 62
61 } // namespace WebCore 63 } // namespace WebCore
62 64
63 #endif // DeviceSensorEventController_h 65 #endif // DeviceSensorEventController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698