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

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

Issue 85263006: Make IDL Callbacks non-refcounted by default (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 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/Geolocation.h
diff --git a/Source/modules/geolocation/Geolocation.h b/Source/modules/geolocation/Geolocation.h
index 926253086a72a5a3e1e6f84531bfda7a8ccd04c1..310ec764a46f05a2ef81fdf8655751c48ba26268 100644
--- a/Source/modules/geolocation/Geolocation.h
+++ b/Source/modules/geolocation/Geolocation.h
@@ -56,8 +56,8 @@ public:
Document* document() const;
Frame* frame() const;
- void getCurrentPosition(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
- int watchPosition(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
+ void getCurrentPosition(PassOwnPtr<PositionCallback>, PassOwnPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
+ int watchPosition(PassOwnPtr<PositionCallback>, PassOwnPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
void clearWatch(int watchID);
void setIsAllowed(bool);
@@ -77,7 +77,7 @@ private:
class GeoNotifier : public RefCounted<GeoNotifier> {
public:
- static PassRefPtr<GeoNotifier> create(Geolocation* geolocation, PassRefPtr<PositionCallback> positionCallback, PassRefPtr<PositionErrorCallback> positionErrorCallback, PassRefPtr<PositionOptions> options) { return adoptRef(new GeoNotifier(geolocation, positionCallback, positionErrorCallback, options)); }
+ static PassRefPtr<GeoNotifier> create(Geolocation* geolocation, PassOwnPtr<PositionCallback> positionCallback, PassOwnPtr<PositionErrorCallback> positionErrorCallback, PassRefPtr<PositionOptions> options) { return adoptRef(new GeoNotifier(geolocation, positionCallback, positionErrorCallback, options)); }
PositionOptions* options() const { return m_options.get(); };
void setFatalError(PassRefPtr<PositionError>);
@@ -94,11 +94,11 @@ private:
bool hasZeroTimeout() const;
private:
- GeoNotifier(Geolocation*, PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
+ GeoNotifier(Geolocation*, PassOwnPtr<PositionCallback>, PassOwnPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
RefPtr<Geolocation> m_geolocation;
- RefPtr<PositionCallback> m_successCallback;
- RefPtr<PositionErrorCallback> m_errorCallback;
+ OwnPtr<PositionCallback> m_successCallback;
+ OwnPtr<PositionErrorCallback> m_errorCallback;
RefPtr<PositionOptions> m_options;
Timer<GeoNotifier> m_timer;
RefPtr<PositionError> m_fatalError;
« no previous file with comments | « Source/core/platform/chromium/ChromiumDataObjectItem.cpp ('k') | Source/modules/geolocation/Geolocation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698