diogogmt

nsGeolocationRequest

Nov 23rd, 2011
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. 73 class nsGeolocationRequest
  2. 74 : public nsIContentPermissionRequest
  3. 75 , public nsITimerCallback
  4. 76 , public PCOMContentPermissionRequestChild
  5. 77 {
  6. 78 public:
  7. 79 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
  8. 80 NS_DECL_NSICONTENTPERMISSIONREQUEST
  9. 81 NS_DECL_NSITIMERCALLBACK
  10. 82
  11. 83 NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsGeolocationRequest, nsIContentPermissionRequest)
  12. 84
  13. 85 nsGeolocationRequest(nsGeolocation* locator,
  14. 86 nsIDOMGeoPositionCallback* callback,
  15. 87 nsIDOMGeoPositionErrorCallback* errorCallback,
  16. 88 nsIDOMGeoPositionOptions* options,
  17. 89 bool watchPositionRequest = false);
  18. 90 nsresult Init();
  19. 91 void Shutdown();
  20. 92
  21. 93 // Called by the geolocation device to notify that a location has changed.
  22. 94 bool Update(nsIDOMGeoPosition* aPosition);
  23. 95
  24. 96 void SendLocation(nsIDOMGeoPosition* location);
  25. 97 void MarkCleared();
  26. 98 bool IsActive() {return !mCleared;}
  27. 99 bool Allowed() {return mAllowed;}
  28. 100 void SetTimeoutTimer();
  29. 101
  30. 102 ~nsGeolocationRequest();
  31. 103
  32. 104 bool Recv__delete__(const bool& allow);
  33. 105 void IPDLRelease() { Release(); }
  34. 106
  35. 107 private:
  36. 108
  37. 109 void NotifyError(PRInt16 errorCode);
  38. 110 bool mAllowed;
  39. 111 bool mCleared;
  40. 112 bool mIsWatchPositionRequest;
  41. 113
  42. 114 nsCOMPtr<nsITimer> mTimeoutTimer;
  43. 115 nsCOMPtr<nsIDOMGeoPositionCallback> mCallback;
  44. 116 nsCOMPtr<nsIDOMGeoPositionErrorCallback> mErrorCallback;
  45. 117 nsCOMPtr<nsIDOMGeoPositionOptions> mOptions;
  46. 118
  47. 119 nsRefPtr<nsGeolocation> mLocator;
  48. 120 };
  49.  
Advertisement
Add Comment
Please, Sign In to add comment