Index

PermissionManager

new PermissionManager()

Handle Web API permissions such as geolocation, getUserMedia

Methods

cancelRequest()

Cancels a request with a specfied id. Request can either be
currently showing, or pending. If there are further pending requests,
the next is shown.

cleanDialog()

Reset current values

clickHandler()

Event listener function for the yes/no buttons.

discardPermissionRequest()

Clean current request queue and
send refuse permission request message to gecko

dispatchResponse()

Send permission choice to gecko

handleEvent(evt)

Event handler interface for mozChromeEvent.

Parameters:
Name Type Description
evt DOMEvent

The event.

handleFullscreenOriginChange(detail)

Show the request for the new domain

Parameters:
Name Type Description
detail Object

The event detail object.

handlePermissionPrompt(detail)

Prepare for permission prompt

Parameters:
Name Type Description
detail Object

The event detail object.

hidePermissionPrompt()

Hide prompt

listDeviceOptions()

Form the media source selection list

optionClickhandler(evt)

Handle getUserMedia device select options

Parameters:
Name Type Description
evt DOMEvent

The event.

requestPermission()

Queue or show the permission prompt

showNextPendingRequest()

Show the next request, if we have one.

showPermissionPrompt()

Put the message in the dialog.

start()

start the PermissionManager to init variables and listeners

stop()

stop the PermissionManager to reset variables and listeners