зеркало из https://github.com/mozilla/pjs.git
Bug 513658 - Deprecate isReady() in geolocation provider. r=dougt
--HG-- extra : rebase_source : a4ce9d11548b9f09521caf3ced073f6015c2542d
This commit is contained in:
Родитель
9b63c4b05c
Коммит
4dab39b32b
|
@ -90,9 +90,9 @@ interface nsIGeolocationUpdate : nsISupports {
|
|||
* Interface provides location information to the nsGeolocator
|
||||
* via the nsIDOMGeolocationCallback interface. After
|
||||
* startup is called, any geo location change should call
|
||||
* callback.onRequest().
|
||||
* callback.update().
|
||||
*/
|
||||
[scriptable, uuid(5C819505-8804-496E-9CB2-53089B3DD4EF)]
|
||||
[scriptable, uuid(701413ED-0F51-64F7-71C7-4369D8E07D6E)]
|
||||
interface nsIGeolocationProvider : nsISupports {
|
||||
|
||||
/**
|
||||
|
@ -101,12 +101,6 @@ interface nsIGeolocationProvider : nsISupports {
|
|||
*/
|
||||
void startup();
|
||||
|
||||
/**
|
||||
* Returns true when the devices is ready and has a
|
||||
* postion, otherwise false.
|
||||
*/
|
||||
boolean isReady();
|
||||
|
||||
/**
|
||||
* watch
|
||||
* When a location change is observed, notify the callback
|
||||
|
|
|
@ -180,17 +180,6 @@ GPSDProvider.prototype = {
|
|||
this.transport.close(Components.results.NS_OK);
|
||||
},
|
||||
|
||||
isReady: function() {
|
||||
LOG("isReady called\n");
|
||||
try {
|
||||
this.inputStream.available();
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
watch: function(c) {
|
||||
LOG("watch called\n");
|
||||
|
||||
|
|
|
@ -188,11 +188,6 @@ WifiGeoPositionProvider.prototype = {
|
|||
os.addObserver(this, "private-browsing", false);
|
||||
},
|
||||
|
||||
isReady: function() {
|
||||
LOG("isReady called");
|
||||
return true
|
||||
},
|
||||
|
||||
watch: function(c) {
|
||||
LOG("watch called");
|
||||
if (!this.wifi_service) {
|
||||
|
|
|
@ -278,12 +278,6 @@ NS_IMETHODIMP WinMobileLocationProvider::Startup()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP WinMobileLocationProvider::IsReady(PRBool *_retval NS_OUTPARAM)
|
||||
{
|
||||
*_retval = mHasSeenLocation;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP WinMobileLocationProvider::Watch(nsIGeolocationUpdate *callback)
|
||||
{
|
||||
if (mCallback)
|
||||
|
|
Загрузка…
Ссылка в новой задаче