java.lang.Object | |
↳ | android.webkit.GeolocationPermissions |
This class is used to get Geolocation permissions from, and set them on the WebView. For example, it could be used to allow a user to manage Geolocation permissions from a browser's UI. Permissions are managed on a per-origin basis, as required by the Geolocation spec - http://dev.w3.org/geo/api/spec-source.html. An origin specifies the scheme, host and port of particular frame. An origin is represented here as a string, using the output of WebCore::SecurityOrigin::toString. This class is the Java counterpart of the WebKit C++ GeolocationPermissions class. It simply marshalls calls from the UI thread to the WebKit thread. Within WebKit, Geolocation permissions may be applied either temporarily (for the duration of the page) or permanently. This class deals only with permanent permissions.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GeolocationPermissions.Callback | Callback interface used by the browser to report a Geolocation permission state set by the user in response to a permissions prompt. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Allows the specified origin.
| |||||||||||
Clears the permission state for the specified origin.
| |||||||||||
Clears the permission state for all origins.
| |||||||||||
Gets the permission state for the specified origin.
| |||||||||||
Gets the singleton instance of the class.
| |||||||||||
Gets the set of origins for which Geolocation permissions are stored.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Allows the specified origin. This method may be called before the WebKit thread has intialized the message handler. Messages will be queued until this time.
Clears the permission state for the specified origin. This method may be called before the WebKit thread has intialized the message handler. Messages will be queued until this time.
Gets the permission state for the specified origin. Callback is a ValueCallback object whose onReceiveValue method will be called asynchronously with the permission state for the origin.
Gets the singleton instance of the class.
Gets the set of origins for which Geolocation permissions are stored. Note that we represent the origins as strings. These are created using WebCore::SecurityOrigin::toString(). As long as all 'HTML 5 modules' (Database, Geolocation etc) do so, it's safe to match up origins based on this string. Callback is a ValueCallback object whose onReceiveValue method will be called asynchronously with the set of origins.