diff -r 6aeb7a756187 -r 3c88a81ff781 ginebra2/chrome/bedrockchrome/geolocation.snippet/geolocationDialog.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ginebra2/chrome/bedrockchrome/geolocation.snippet/geolocationDialog.js Fri Oct 15 17:30:59 2010 -0400 @@ -0,0 +1,97 @@ +/*! + \file geolocationDialog.js This module contains GeolocationDialog class which + prompts user for accepting/rejection geolocation request. +*/ +function GeolocationDialog() { + var _frame; + var _page; + + var onChromeComplete = function() + { + // Watch for geolocation permission request. ".bind(this)" is used to resolve amibiguous this pointer. + window.pageController.requestGeolocationPermission.connect( + function(frame, page, domain) { + + _frame = frame; + _page = page; + + this.showDialog(domain); + + }.bind(this) + ); + } + + //! Create the html/DOM elements for the Dialog. + this.setupPage = function() { + var html = + '
' + + '