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

Side by Side Diff: third_party/WebKit/Source/modules/geolocation/GeoNotifier.h

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes Created 4 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GeoNotifier_h 5 #ifndef GeoNotifier_h
6 #define GeoNotifier_h 6 #define GeoNotifier_h
7 7
8 #include "modules/geolocation/PositionCallback.h" 8 #include "modules/geolocation/PositionCallback.h"
9 #include "modules/geolocation/PositionErrorCallback.h" 9 #include "modules/geolocation/PositionErrorCallback.h"
10 #include "modules/geolocation/PositionOptions.h" 10 #include "modules/geolocation/PositionOptions.h"
(...skipping 28 matching lines...) Expand all
39 39
40 void runSuccessCallback(Geoposition*); 40 void runSuccessCallback(Geoposition*);
41 void runErrorCallback(PositionError*); 41 void runErrorCallback(PositionError*);
42 42
43 void startTimer(); 43 void startTimer();
44 void stopTimer(); 44 void stopTimer();
45 45
46 // Runs the error callback if there is a fatal error. Otherwise, if a 46 // Runs the error callback if there is a fatal error. Otherwise, if a
47 // cached position must be used, registers itself for receiving one. 47 // cached position must be used, registers itself for receiving one.
48 // Otherwise, the notifier has expired, and its error callback is run. 48 // Otherwise, the notifier has expired, and its error callback is run.
49 void timerFired(Timer<GeoNotifier>*); 49 void timerFired(TimerBase*);
50 50
51 private: 51 private:
52 GeoNotifier(Geolocation*, PositionCallback*, PositionErrorCallback*, const P ositionOptions&); 52 GeoNotifier(Geolocation*, PositionCallback*, PositionErrorCallback*, const P ositionOptions&);
53 53
54 Member<Geolocation> m_geolocation; 54 Member<Geolocation> m_geolocation;
55 Member<PositionCallback> m_successCallback; 55 Member<PositionCallback> m_successCallback;
56 Member<PositionErrorCallback> m_errorCallback; 56 Member<PositionErrorCallback> m_errorCallback;
57 const PositionOptions m_options; 57 const PositionOptions m_options;
58 Timer<GeoNotifier> m_timer; 58 Timer<GeoNotifier> m_timer;
59 Member<PositionError> m_fatalError; 59 Member<PositionError> m_fatalError;
60 bool m_useCachedPosition; 60 bool m_useCachedPosition;
61 }; 61 };
62 62
63 } // namespace blink 63 } // namespace blink
64 64
65 #endif // GeoNotifier_h 65 #endif // GeoNotifier_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698