diff --git a/.hgtags b/.hgtags index b0608425cab7..3a937e47a5f6 100644 --- a/.hgtags +++ b/.hgtags @@ -101,3 +101,4 @@ ad0ae007aa9e03cd74e9005cd6652e544139b3b5 FIREFOX_AURORA_25_BASE ba2cc1eda988a1614d8986ae145d28e1268409b9 FIREFOX_AURORA_29_BASE 83c9853e136451474dfa6d1aaa60a7fca7d2d83a FIREFOX_AURORA_30_BASE cfde3603b0206e119abea76fdd6e134b634348f1 FIREFOX_AURORA_31_BASE +16f3cac5e8fe471e12f76d6a94a477b14e78df7c FIREFOX_AURORA_32_BASE diff --git a/b2g/confvars.sh b/b2g/confvars.sh index d6830bc5ccfb..928beacb4035 100644 --- a/b2g/confvars.sh +++ b/b2g/confvars.sh @@ -5,12 +5,12 @@ MOZ_APP_BASENAME=B2G MOZ_APP_VENDOR=Mozilla -MOZ_APP_VERSION=32.0a1 +MOZ_APP_VERSION=33.0a1 MOZ_APP_UA_NAME=Firefox MOZ_UA_OS_AGNOSTIC=1 -MOZ_B2G_VERSION=2.0.0.0-prerelease +MOZ_B2G_VERSION=2.1.0.0-prerelease MOZ_B2G_OS_NAME=Boot2Gecko MOZ_BRANDING_DIRECTORY=b2g/branding/unofficial diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 111930505df6..8ec2a4bf49f6 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1504,6 +1504,14 @@ pref("shumway.disabled", true); // (This is intentionally on the high side; see bug 746055.) pref("image.mem.max_decoded_image_kb", 256000); +#ifdef MOZ_LOOP +pref("loop.server", "https://loop.services.mozilla.com"); +pref("loop.do_not_disturb", false); +#endif + +// serverURL to be assigned by services team +pref("services.push.serverURL", "wss://push.services.mozilla.com/"); + // Default social providers pref("social.manifest.facebook", "{\"origin\":\"https://www.facebook.com\",\"name\":\"Facebook Share\",\"shareURL\":\"https://www.facebook.com/sharer/sharer.php?u=%{url}\",\"iconURL\":\"data:image/x-icon;base64,iVBORw0KGgoAAAANSU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badJqLW+o2LHobNX+PUB1WPkfnHwYyTmX6lI7Lehr3F576NM/+T3V3wH17f2w1xkg2ggXuSvga6p8p+bgmpVKWpXAmVh+2AsNEKogdYYAJa0GT03J4obyf60HTgKe6PTTqw0QOpcQ3wXs4LlDZyq2FXrrS4uBmjDxuCw3G5eIgA46yeC5ho11pWsWW35PWTibBC4Xf+9eBLRPg0q2+s5UvHG6bMNqJYPHw7nXutxZYvIIiMoCSgbrPVX/fv7syS+3AKfC5MOmF4iRpP6RjrId8O5vrNhS1NpUWQLUholUr6muXEoatP3emrWNR9e/avk9R8P+HuxNypPkrk93pGdnK0VtXemaN6UdOHo55vdE5b/0NKx+K4AxtAAAAABJRU5ErkJggg==\", \"description\":\"Easily share the web to your Facebook friends.\",\"author\":\"Facebook\",\"homepageURL\":\"https://www.facebook.com\",\"builtin\":\"true\",\"version\":1}"); diff --git a/browser/base/content/browser-loop.js b/browser/base/content/browser-loop.js new file mode 100644 index 000000000000..271547865bfc --- /dev/null +++ b/browser/base/content/browser-loop.js @@ -0,0 +1,68 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +// the "exported" symbols +let LoopUI; + +XPCOMUtils.defineLazyModuleGetter(this, "injectLoopAPI", "resource:///modules/loop/MozLoopAPI.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "MozLoopService", "resource:///modules/loop/MozLoopService.jsm"); + + +(function() { + + LoopUI = { + /** + * Opens the panel for Loop and sizes it appropriately. + * + * @param {event} event The event opening the panel, used to anchor + * the panel to the button which triggers it. + */ + openCallPanel: function(event) { + let panel = document.getElementById("loop-panel"); + let anchor = event.target; + let iframe = document.getElementById("loop-panel-frame"); + + if (!iframe) { + // XXX This should be using SharedFrame (bug 1011392 may do this). + iframe = document.createElement("iframe"); + iframe.setAttribute("id", "loop-panel-frame"); + iframe.setAttribute("type", "content"); + iframe.setAttribute("class", "loop-frame social-panel-frame"); + iframe.setAttribute("flex", "1"); + panel.appendChild(iframe); + } + + // We inject in DOMContentLoaded as that is before any scripts have tun. + iframe.addEventListener("DOMContentLoaded", function documentDOMLoaded() { + iframe.removeEventListener("DOMContentLoaded", documentDOMLoaded, true); + injectLoopAPI(iframe.contentWindow); + + // We use loopPanelInitialized so that we know we've finished localising before + // sizing the panel. + iframe.contentWindow.addEventListener("loopPanelInitialized", + function documentLoaded() { + iframe.contentWindow.removeEventListener("loopPanelInitialized", + documentLoaded, true); + // XXX We end up with the wrong size here, so this + // needs further investigation (bug 1011394). + sizeSocialPanelToContent(panel, iframe); + }, true); + + }, true); + + iframe.setAttribute("src", "about:looppanel"); + panel.hidden = false; + panel.openPopup(anchor, "bottomcenter topright", 0, 0, false, false); + }, + + /** + * Triggers the initialization of the loop service. Called by + * delayedStartup. + */ + initialize: function() { + MozLoopService.initialize(); + }, + + }; +})(); diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index d6eea6080df8..813ad6b85436 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -172,6 +172,9 @@ let gInitialPages = [ #include browser-feeds.js #include browser-fullScreen.js #include browser-fullZoom.js +#ifdef MOZ_LOOP +#include browser-loop.js +#endif #include browser-places.js #include browser-plugins.js #include browser-safebrowsing.js @@ -1182,6 +1185,10 @@ var gBrowserInit = { gDataNotificationInfoBar.init(); #endif +#ifdef MOZ_LOOP + LoopUI.initialize(); +#endif + gBrowserThumbnails.init(); // Add Devtools menuitems and listeners @@ -5311,8 +5318,8 @@ function setStyleDisabled(disabled) { var LanguageDetectionListener = { init: function() { - window.messageManager.addMessageListener("LanguageDetection:Result", msg => { - Translation.languageDetected(msg.target, msg.data); + window.messageManager.addMessageListener("Translation:DocumentState", msg => { + Translation.documentStateReceived(msg.target, msg.data); }); } }; diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 97320cdb206a..50c334a9819e 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -226,7 +226,7 @@ - +