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

Unified Diff: Source/modules/geolocation/GeoNotifier.h

Issue 745503002: Replace Dictionary with PositionOptions in geolocation/. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/modules/geolocation/GeoNotifier.h
diff --git a/Source/modules/geolocation/GeoNotifier.h b/Source/modules/geolocation/GeoNotifier.h
index d0c6178e829b6e672c38e0e4fe849d66b1ff45ff..5d88242bc7369611838a3747e48a74815333ed5a 100644
--- a/Source/modules/geolocation/GeoNotifier.h
+++ b/Source/modules/geolocation/GeoNotifier.h
@@ -7,6 +7,7 @@
#include "modules/geolocation/PositionCallback.h"
#include "modules/geolocation/PositionErrorCallback.h"
+#include "modules/geolocation/PositionOptions.h"
#include "platform/Timer.h"
#include "platform/heap/Handle.h"
@@ -15,17 +16,16 @@ namespace blink {
class Geolocation;
class Geoposition;
class PositionError;
-class PositionOptions;
class GeoNotifier : public GarbageCollectedFinalized<GeoNotifier> {
public:
- static GeoNotifier* create(Geolocation* geolocation, PositionCallback* positionCallback, PositionErrorCallback* positionErrorCallback, PositionOptions* options)
+ static GeoNotifier* create(Geolocation* geolocation, PositionCallback* positionCallback, PositionErrorCallback* positionErrorCallback, const PositionOptions& options)
{
return new GeoNotifier(geolocation, positionCallback, positionErrorCallback, options);
}
void trace(Visitor*);
- PositionOptions* options() const { return m_options.get(); };
+ const PositionOptions& options() const { return m_options; }
// Sets the given error as the fatal error if there isn't one yet.
// Starts the timer with an interval of 0.
@@ -49,12 +49,12 @@ public:
void timerFired(Timer<GeoNotifier>*);
private:
- GeoNotifier(Geolocation*, PositionCallback*, PositionErrorCallback*, PositionOptions*);
+ GeoNotifier(Geolocation*, PositionCallback*, PositionErrorCallback*, const PositionOptions&);
Member<Geolocation> m_geolocation;
Member<PositionCallback> m_successCallback;
Member<PositionErrorCallback> m_errorCallback;
- Member<PositionOptions> m_options;
+ const PositionOptions m_options;
haraken 2014/11/20 16:02:07 bashi-san: Just to confirm, is it safe to keep a d
bashi 2014/11/20 23:10:05 Yes, for now. But we might want to make dictionari
Timer<GeoNotifier> m_timer;
Member<PositionError> m_fatalError;
bool m_useCachedPosition;
« no previous file with comments | « no previous file | Source/modules/geolocation/GeoNotifier.cpp » ('j') | Source/modules/geolocation/PositionOptions.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698