Bug 857730 - Part 2: Add permissions doorhanger. r=cpeterson
authorShane Tully <stully@mozilla.com>
Tue, 23 Jul 2013 11:09:00 -0700
changeset 152016 ebe9d352959d174677d2d02186c41ce95cfdea23
parent 152015 1d77c3062662ed7710c98962d534805cf7f5eb34
child 152017 29cb88492b9f48468f8d485fd595396ffb1c4312
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpeterson
bugs857730
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 857730 - Part 2: Add permissions doorhanger. r=cpeterson
dom/permission/tests/test_permissions.html
mobile/android/chrome/content/browser.js
mobile/android/components/ContentPermissionPrompt.js
mobile/android/installer/package-manifest.in
mobile/android/locales/en-US/chrome/browser.properties
--- a/dom/permission/tests/test_permissions.html
+++ b/dom/permission/tests/test_permissions.html
@@ -14,19 +14,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content" style="display: none"></div>
 <pre id="test">
 <script type="application/javascript;version=1.8" src="file_framework.js"></script>
 <script type="application/javascript;version=1.8">
 var gData = [
   {
     perm: ["permissions"],
-    // nsIDOMPermissionSettings isn't include in Android builds yet
-    // exception on accessing Ci.nsIDOMPermissionSettings
-    skip: ["Android"],
     obj: "mozPermissionSettings",
     idl: "nsIDOMPermissionSettings",
     settings: [["dom.mozPermissionSettings.enabled", true]],
   },
 ]
 </script>
 </pre>
 </body>
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -11,16 +11,17 @@ let Cu = Components.utils;
 let Cr = Components.results;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/AddonManager.jsm");
 Cu.import("resource://gre/modules/FileUtils.jsm");
 Cu.import("resource://gre/modules/JNI.jsm");
 Cu.import('resource://gre/modules/Payment.jsm');
+Cu.import("resource://gre/modules/PermissionPromptHelper.jsm");
 
 #ifdef ACCESSIBILITY
 Cu.import("resource://gre/modules/accessibility/AccessFu.jsm");
 #endif
 
 XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
                                   "resource://gre/modules/PluralForm.jsm");
 
--- a/mobile/android/components/ContentPermissionPrompt.js
+++ b/mobile/android/components/ContentPermissionPrompt.js
@@ -6,17 +6,18 @@ const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 const Cc = Components.classes;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
 const kEntities = { "geolocation": "geolocation",
-                    "desktop-notification": "desktopNotification" };
+                    "desktop-notification": "desktopNotification",
+                    "contacts": "contacts" };
 
 function ContentPermissionPrompt() {}
 
 ContentPermissionPrompt.prototype = {
   classID: Components.ID("{C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5}"),
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionPrompt]),
 
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -151,16 +151,17 @@
 @BINPATH@/components/dom_offline.xpt
 @BINPATH@/components/dom_json.xpt
 @BINPATH@/components/dom_browserelement.xpt
 @BINPATH@/components/dom_payment.xpt
 @BINPATH@/components/dom_power.xpt
 @BINPATH@/components/dom_quota.xpt
 @BINPATH@/components/dom_range.xpt
 @BINPATH@/components/dom_settings.xpt
+@BINPATH@/components/dom_permissionsettings.xpt
 @BINPATH@/components/dom_sidebar.xpt
 @BINPATH@/components/dom_mobilemessage.xpt
 @BINPATH@/components/dom_storage.xpt
 @BINPATH@/components/dom_stylesheets.xpt
 @BINPATH@/components/dom_system.xpt
 @BINPATH@/components/dom_threads.xpt
 @BINPATH@/components/dom_traversal.xpt
 @BINPATH@/components/dom_views.xpt
@@ -288,16 +289,20 @@
 @BINPATH@/components/SettingsService.manifest
 @BINPATH@/components/BrowserElementParent.manifest
 @BINPATH@/components/BrowserElementParent.js
 @BINPATH@/components/FeedProcessor.manifest
 @BINPATH@/components/FeedProcessor.js
 @BINPATH@/components/BrowserFeeds.manifest
 @BINPATH@/components/FeedConverter.js
 @BINPATH@/components/FeedWriter.js
+@BINPATH@/components/PermissionSettings.js
+@BINPATH@/components/PermissionSettings.manifest
+@BINPATH@/components/PermissionPromptService.js
+@BINPATH@/components/PermissionPromptService.manifest
 @BINPATH@/components/fuelApplication.manifest
 @BINPATH@/components/fuelApplication.js
 @BINPATH@/components/WebContentConverter.js
 @BINPATH@/components/BrowserComponents.manifest
 @BINPATH@/components/nsBrowserContentHandler.js
 @BINPATH@/components/nsBrowserGlue.js
 @BINPATH@/components/nsSetDefaultBrowser.manifest
 @BINPATH@/components/nsSetDefaultBrowser.js
--- a/mobile/android/locales/en-US/chrome/browser.properties
+++ b/mobile/android/locales/en-US/chrome/browser.properties
@@ -91,16 +91,24 @@ desktopNotification.dontAllow=Don't allo
 desktopNotification.ask=Allow %S to use notifications?
 # LOCALIZATION NOTE (desktopNotification.useNotifications): Label that will be
 # used in site settings dialog.
 desktopNotification.useNotifications=Use Notifications
 # LOCALIZATION NOTE (desktopNotification.dontAskAgain): This label appears next to a
 # checkbox to indicate whether or not the user wants to make a permanent decision.
 desktopNotification.dontAskAgain=Don't ask again for this site
 
+# Contacts API
+contacts.allow=Allow
+contacts.dontAllow=Don't allow
+contacts.ask=Allow %S to access your contacts?
+# LOCALIZATION NOTE (contacts.dontAskAgain): This label appears next to a
+# checkbox to indicate whether or not the user wants to make a permanent decision.
+contacts.dontAskAgain=Don't ask again for this site
+
 # New Tab Popup
 # LOCALIZATION NOTE (newtabpopup, newprivatetabpopup): Semicolon-separated list of plural forms.
 # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
 # #1 number of tabs
 newtabpopup.opened=New tab opened;#1 new tabs opened
 newprivatetabpopup.opened=New private tab opened;#1 new private tabs opened
 
 # Offline web applications