Bug 1363169 - Add support for native windows share. r=gijs, r=aklotz
MozReview-Commit-ID: 7quON7Somvr
This commit is contained in:
@@ -1203,6 +1203,12 @@ BrowserPageActions.addSearchEngine = {
|
||||
|
||||
// share URL
|
||||
BrowserPageActions.shareURL = {
|
||||
onCommand(event, buttonNode) {
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
let currentURI = gURLBar.makeURIReadable(browser.currentURI).displaySpec;
|
||||
this._windowsUIUtils.shareUrl(currentURI, browser.contentTitle);
|
||||
},
|
||||
|
||||
onShowingInPanel(buttonNode) {
|
||||
this._cached = false;
|
||||
},
|
||||
@@ -1264,7 +1270,7 @@ BrowserPageActions.shareURL = {
|
||||
};
|
||||
|
||||
// Attach sharingService here so tests can override the implementation
|
||||
XPCOMUtils.defineLazyServiceGetter(BrowserPageActions.shareURL,
|
||||
"_sharingService",
|
||||
"@mozilla.org/widget/macsharingservice;1",
|
||||
"nsIMacSharingService");
|
||||
XPCOMUtils.defineLazyServiceGetters(BrowserPageActions.shareURL, {
|
||||
_sharingService: ["@mozilla.org/widget/macsharingservice;1", "nsIMacSharingService"],
|
||||
_windowsUIUtils: ["@mozilla.org/windows-ui-utils;1", "nsIWindowsUIUtils"],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user