Bug 1170535 - Anchor the social share panel to the Hello button whilst sharing a room URL and enable the Social Provider Activation panel in release. r=mixedpuppy, r=Standard8, a=sledru
authorMike de Boer <mdeboer@mozilla.com>
Thu, 04 Jun 2015 18:24:45 +0200
changeset 274992 afe619271392062bfe8f6ad4d331810770021e29
parent 274991 69dd71505f74d8738d870e50986ffb92524d168a
child 274993 794f06f3226894e1e493d4a389c209dc9a8c60e6
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy, Standard8, sledru
bugs1170535
milestone40.0a2
Bug 1170535 - Anchor the social share panel to the Hello button whilst sharing a room URL and enable the Social Provider Activation panel in release. r=mixedpuppy, r=Standard8, a=sledru
browser/app/profile/firefox.js
browser/base/content/browser-social.js
browser/components/loop/content/js/roomStore.js
browser/components/loop/content/js/roomViews.js
browser/components/loop/content/js/roomViews.jsx
browser/components/loop/content/shared/css/conversation.css
browser/components/loop/content/shared/js/actions.js
browser/components/loop/content/shared/js/activeRoomStore.js
browser/components/loop/modules/MozLoopAPI.jsm
browser/components/loop/test/desktop-local/roomStore_test.js
browser/components/loop/test/desktop-local/roomViews_test.js
browser/components/loop/test/mochitest/browser_mozLoop_socialShare.js
browser/components/loop/test/shared/activeRoomStore_test.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1732,23 +1732,19 @@ pref("loop.fxa_oauth.profile", "");
 pref("loop.support_url", "https://support.mozilla.org/kb/group-conversations-firefox-hello-webrtc");
 pref("loop.contacts.gravatars.show", false);
 pref("loop.contacts.gravatars.promo", true);
 pref("loop.browserSharing.showInfoBar", true);
 pref("loop.contextInConversations.enabled", true);
 
 pref("social.sidebar.unload_timeout_ms", 10000);
 
-// activation from inside of share panel is possible if activationPanelEnabled
+// Activation from inside of share panel is possible if activationPanelEnabled
 // is true. Pref'd off for release while usage testing is done through beta.
-#ifdef EARLY_BETA_OR_EARLIER
 pref("social.share.activationPanelEnabled", true);
-#else
-pref("social.share.activationPanelEnabled", false);
-#endif
 pref("social.shareDirectory", "https://activations.cdn.mozilla.net/sharePanel.html");
 
 pref("dom.identity.enabled", false);
 
 // Block insecure active content on https pages
 pref("security.mixed_content.block_active_content", true);
 
 // 1 = allow MITM for certificate pinning checks.
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -296,19 +296,22 @@ SocialActivationListener = {
           SocialSidebar.show(provider.origin);
         }
         if (provider.shareURL) {
           // Ensure that the share button is somewhere usable.
           // SocialShare.shareButton may return null if it is in the menu-panel
           // and has never been visible, so we check the widget directly. If
           // there is no area for the widget we move it into the toolbar.
           let widget = CustomizableUI.getWidget("social-share-button");
-          if (!widget.areaType) {
+          // If the panel is already open, we can be sure that the provider can
+          // already be accessed, possibly anchored to another toolbar button.
+          // In that case we don't move the widget.
+          if (!widget.areaType && SocialShare.panel.state != "open") {
             CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
-            // ensure correct state
+            // Ensure correct state.
             SocialUI.onCustomizeEnd(window);
           }
 
           // make this new provider the selected provider. If the panel hasn't
           // been opened, we need to make the frame first.
           SocialShare._createFrame();
           SocialShare.iframe.setAttribute('src', 'data:text/plain;charset=utf8,');
           SocialShare.iframe.setAttribute('origin', provider.origin);
@@ -469,16 +472,19 @@ SocialShare = {
   },
 
   // Share panel may be attached to the overflow or menu button depending on
   // customization, we need to manage open state of the anchor.
   get anchor() {
     let widget = CustomizableUI.getWidget("social-share-button");
     return widget.forWindow(window).anchor;
   },
+  // Holds the anchor node in use whilst the panel is open, because it may vary.
+  _currentAnchor: null,
+
   get panel() {
     return document.getElementById("social-share-panel");
   },
 
   get iframe() {
     // panel.firstChild is our toolbar hbox, panel.lastChild is the iframe
     // container hbox used for an interstitial "loading" graphic
     return this.panel.lastChild.firstChild;
@@ -572,22 +578,23 @@ SocialShare = {
     return widget.forWindow(window).node;
   },
 
   _onclick: function() {
     Services.telemetry.getHistogramById("SOCIAL_PANEL_CLICKS").add(0);
   },
 
   onShowing: function() {
-    this.anchor.setAttribute("open", "true");
+    (this._currentAnchor || this.anchor).setAttribute("open", "true");
     this.iframe.addEventListener("click", this._onclick, true);
   },
 
   onHidden: function() {
-    this.anchor.removeAttribute("open");
+    (this._currentAnchor || this.anchor).removeAttribute("open");
+    this._currentAnchor = null;
     this.iframe.removeEventListener("click", this._onclick, true);
     this.iframe.setAttribute("src", "data:text/plain;charset=utf8,");
     // make sure that the frame is unloaded after it is hidden
     this.iframe.docShell.createAboutBlankContentViewer(null);
     this.currentShare = null;
     // share panel use is over, purge any history
     if (this.iframe.sessionHistory) {
       let purge = this.iframe.sessionHistory.count;
@@ -608,17 +615,17 @@ SocialShare = {
       url = "about:socialerror?mode=tryAgainOnly&directory=1&url=" + encodeURIComponent(iframe.getAttribute("src"));
     } else {
       url = "about:socialerror?mode=compactInfo&origin=" + encodeURIComponent(origin);
     }
     iframe.webNavigation.loadURI(url, null, null, null, null);
     sizeSocialPanelToContent(this.panel, iframe);
   },
 
-  sharePage: function(providerOrigin, graphData, target) {
+  sharePage: function(providerOrigin, graphData, target, anchor) {
     // if providerOrigin is undefined, we use the last-used provider, or the
     // current/default provider.  The provider selection in the share panel
     // will call sharePage with an origin for us to switch to.
     this._createFrame();
     let iframe = this.iframe;
 
     // graphData is an optional param that either defines the full set of data
     // to be shared, or partial data about the current page. It is set by a call
@@ -641,40 +648,40 @@ SocialShare = {
         messageManager.removeMessageListener("PageMetadata:PageDataResult", _dataFn);
         let pageData = msg.json;
         if (graphData) {
           // overwrite data retreived from page with data given to us as a param
           for (let p in graphData) {
             pageData[p] = graphData[p];
           }
         }
-        this.sharePage(providerOrigin, pageData, target);
+        this.sharePage(providerOrigin, pageData, target, anchor);
       });
       gBrowser.selectedBrowser.messageManager.sendAsyncMessage("PageMetadata:GetPageData");
       return;
     }
     // if this is a share of a selected item, get any microdata
     if (!pageData.microdata && target) {
       messageManager.addMessageListener("PageMetadata:MicrodataResult", _dataFn = (msg) => {
         messageManager.removeMessageListener("PageMetadata:MicrodataResult", _dataFn);
         pageData.microdata = msg.data;
-        this.sharePage(providerOrigin, pageData, target);
+        this.sharePage(providerOrigin, pageData, target, anchor);
       });
       gBrowser.selectedBrowser.messageManager.sendAsyncMessage("PageMetadata:GetMicrodata", null, { target });
       return;
     }
     this.currentShare = pageData;
 
     let provider;
     if (providerOrigin)
       provider = Social._getProviderFromOrigin(providerOrigin);
     else
       provider = this.getSelectedProvider();
     if (!provider || !provider.shareURL) {
-      this.showDirectory();
+      this.showDirectory(anchor);
       return;
     }
     // check the menu button
     let hbox = document.getElementById("social-share-provider-buttons");
     let btn = hbox.querySelector("[origin='" + provider.origin + "']");
     if (btn)
       btn.checked = true;
 
@@ -726,20 +733,20 @@ SocialShare = {
       if (purge > 0)
         iframe.sessionHistory.PurgeHistory(purge);
     }
 
     // always ensure that origin belongs to the endpoint
     let uri = Services.io.newURI(shareEndpoint, null, null);
     iframe.setAttribute("origin", provider.origin);
     iframe.setAttribute("src", shareEndpoint);
-    this._openPanel();
+    this._openPanel(anchor);
   },
 
-  showDirectory: function() {
+  showDirectory: function(anchor) {
     this._createFrame();
     let iframe = this.iframe;
     if (iframe.getAttribute("src") == "about:providerdirectory")
       return;
     iframe.removeAttribute("origin");
     iframe.parentNode.setAttribute("loading", "true");
     iframe.addEventListener("DOMContentLoaded", function _dcl(e) {
       iframe.removeEventListener("DOMContentLoaded", _dcl, true);
@@ -753,21 +760,22 @@ SocialShare = {
       SocialShare._dynamicResizer.start(iframe.parentNode, iframe);
 
       iframe.addEventListener("unload", function panelBrowserOnload(e) {
         iframe.removeEventListener("unload", panelBrowserOnload, true);
         SocialShare._dynamicResizer.stop();
       }, true);
     }, true);
     iframe.setAttribute("src", "about:providerdirectory");
-    this._openPanel();
+    this._openPanel(anchor);
   },
 
-  _openPanel: function() {
-    let anchor = document.getAnonymousElementByAttribute(this.anchor, "class", "toolbarbutton-icon");
+  _openPanel: function(anchor) {
+    this._currentAnchor = anchor || this.anchor;
+    anchor = document.getAnonymousElementByAttribute(this._currentAnchor, "class", "toolbarbutton-icon");
     this.panel.openPopup(anchor, "bottomcenter topright", 0, 0, false, false);
     Social.setErrorListener(this.iframe, this.setErrorMessage.bind(this));
     Services.telemetry.getHistogramById("SOCIAL_TOOLBAR_BUTTONS").add(0);
   }
 };
 
 SocialSidebar = {
   _openStartTime: 0,
--- a/browser/components/loop/content/js/roomStore.js
+++ b/browser/components/loop/content/js/roomStore.js
@@ -74,17 +74,16 @@ loop.store = loop.store || {};
      */
     maxRoomCreationSize: MAX_ROOM_CREATION_SIZE,
 
     /**
      * Registered actions.
      * @type {Array}
      */
     actions: [
-      "addSocialShareButton",
       "addSocialShareProvider",
       "createRoom",
       "createdRoom",
       "createRoomError",
       "copyRoomUrl",
       "deleteRoom",
       "deleteRoomError",
       "emailRoomUrl",
@@ -373,25 +372,16 @@ loop.store = loop.store || {};
       }
 
       this._mozLoop.socialShareRoom(actionData.provider.origin, actionData.roomUrl,
         shareTitle, shareBody);
       this._mozLoop.notifyUITour("Loop:RoomURLShared");
     },
 
     /**
-     * Add the Social Share button to the browser toolbar.
-     *
-     * @param {sharedActions.AddSocialShareButton} actionData The action data.
-     */
-    addSocialShareButton: function(actionData) {
-      this._mozLoop.addSocialShareButton();
-    },
-
-    /**
      * Open the share panel to add a Social share provider.
      *
      * @param {sharedActions.AddSocialShareProvider} actionData The action data.
      */
     addSocialShareProvider: function(actionData) {
       this._mozLoop.addSocialShareProvider();
     },
 
--- a/browser/components/loop/content/js/roomViews.js
+++ b/browser/components/loop/content/js/roomViews.js
@@ -79,26 +79,19 @@ loop.roomViews = (function(mozL10n) {
     }
   };
 
   var SocialShareDropdown = React.createClass({displayName: "SocialShareDropdown",
     propTypes: {
       dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
       roomUrl: React.PropTypes.string,
       show: React.PropTypes.bool.isRequired,
-      socialShareButtonAvailable: React.PropTypes.bool,
       socialShareProviders: React.PropTypes.array
     },
 
-    handleToolbarAddButtonClick: function(event) {
-      event.preventDefault();
-
-      this.props.dispatcher.dispatch(new sharedActions.AddSocialShareButton());
-    },
-
     handleAddServiceClick: function(event) {
       event.preventDefault();
 
       this.props.dispatcher.dispatch(new sharedActions.AddSocialShareProvider());
     },
 
     handleProviderClick: function(event) {
       event.preventDefault();
@@ -121,44 +114,19 @@ loop.roomViews = (function(mozL10n) {
         return null;
       }
 
       var cx = React.addons.classSet;
       var shareDropdown = cx({
         "share-service-dropdown": true,
         "dropdown-menu": true,
         "visually-hidden": true,
-        "share-button-unavailable": !this.props.socialShareButtonAvailable,
         "hide": !this.props.show
       });
 
-      // When the button is not yet available, we offer to put it in the navbar
-      // for the user.
-      if (!this.props.socialShareButtonAvailable) {
-        return (
-          React.createElement("div", {className: shareDropdown}, 
-            React.createElement("div", {className: "share-panel-header"}, 
-              mozL10n.get("share_panel_header")
-            ), 
-            React.createElement("div", {className: "share-panel-body"}, 
-              
-                mozL10n.get("share_panel_body", {
-                  brandShortname: mozL10n.get("brandShortname"),
-                  clientSuperShortname: mozL10n.get("clientSuperShortname")
-                })
-              
-            ), 
-            React.createElement("button", {className: "btn btn-info btn-toolbar-add", 
-                    onClick: this.handleToolbarAddButtonClick}, 
-              mozL10n.get("add_to_toolbar_button")
-            )
-          )
-        );
-      }
-
       return (
         React.createElement("ul", {className: shareDropdown}, 
           React.createElement("li", {className: "dropdown-menu-item", onClick: this.handleAddServiceClick}, 
             React.createElement("i", {className: "icon icon-add-share-service"}), 
             React.createElement("span", null, mozL10n.get("share_add_service_button"))
           ), 
           this.props.socialShareProviders.length ? React.createElement("li", {className: "dropdown-menu-separator"}) : null, 
           
@@ -188,17 +156,18 @@ loop.roomViews = (function(mozL10n) {
     propTypes: {
       dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
       error: React.PropTypes.object,
       mozLoop: React.PropTypes.object.isRequired,
       // This data is supplied by the activeRoomStore.
       roomData: React.PropTypes.object.isRequired,
       savingContext: React.PropTypes.bool,
       show: React.PropTypes.bool.isRequired,
-      showContext: React.PropTypes.bool.isRequired
+      showContext: React.PropTypes.bool.isRequired,
+      socialShareProviders: React.PropTypes.array
     },
 
     getInitialState: function() {
       return {
         copiedUrl: false,
         editMode: false,
         newRoomName: ""
       };
@@ -223,16 +192,24 @@ loop.roomViews = (function(mozL10n) {
         new sharedActions.CopyRoomUrl({roomUrl: this.props.roomData.roomUrl}));
 
       this.setState({copiedUrl: true});
     },
 
     handleShareButtonClick: function(event) {
       event.preventDefault();
 
+      var providers = this.props.socialShareProviders;
+      // If there are no providers available currently, save a click by dispatching
+      // the 'AddSocialShareProvider' right away.
+      if (!providers || !providers.length) {
+        this.props.dispatcher.dispatch(new sharedActions.AddSocialShareProvider());
+        return;
+      }
+
       this.toggleDropdownMenu();
     },
 
     handleAddContextClick: function(event) {
       event.preventDefault();
 
       this.handleEditModeChange(true);
     },
@@ -280,17 +257,16 @@ loop.roomViews = (function(mozL10n) {
                     onClick: this.handleShareButtonClick}, 
               mozL10n.get("share_button3")
             )
           ), 
           React.createElement(SocialShareDropdown, {
             dispatcher: this.props.dispatcher, 
             roomUrl: this.props.roomData.roomUrl, 
             show: this.state.showMenu, 
-            socialShareButtonAvailable: this.props.socialShareButtonAvailable, 
             socialShareProviders: this.props.socialShareProviders, 
             ref: "menu"}), 
           React.createElement(DesktopRoomContextView, {
             dispatcher: this.props.dispatcher, 
             editMode: this.state.editMode, 
             error: this.props.error, 
             savingContext: this.props.savingContext, 
             mozLoop: this.props.mozLoop, 
@@ -707,17 +683,16 @@ loop.roomViews = (function(mozL10n) {
               React.createElement(DesktopRoomInvitationView, {
                 dispatcher: this.props.dispatcher, 
                 error: this.state.error, 
                 mozLoop: this.props.mozLoop, 
                 roomData: roomData, 
                 savingContext: this.state.savingContext, 
                 show: shouldRenderInvitationOverlay, 
                 showContext: shouldRenderContextView, 
-                socialShareButtonAvailable: this.state.socialShareButtonAvailable, 
                 socialShareProviders: this.state.socialShareProviders}), 
               React.createElement("div", {className: "video-layout-wrapper"}, 
                 React.createElement("div", {className: "conversation room-conversation"}, 
                   React.createElement("div", {className: "media nested"}, 
                     React.createElement("div", {className: "video_wrapper remote_wrapper"}, 
                       React.createElement("div", {className: "video_inner remote focus-stream"})
                     ), 
                     React.createElement("div", {className: localStreamClasses}), 
--- a/browser/components/loop/content/js/roomViews.jsx
+++ b/browser/components/loop/content/js/roomViews.jsx
@@ -79,26 +79,19 @@ loop.roomViews = (function(mozL10n) {
     }
   };
 
   var SocialShareDropdown = React.createClass({
     propTypes: {
       dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
       roomUrl: React.PropTypes.string,
       show: React.PropTypes.bool.isRequired,
-      socialShareButtonAvailable: React.PropTypes.bool,
       socialShareProviders: React.PropTypes.array
     },
 
-    handleToolbarAddButtonClick: function(event) {
-      event.preventDefault();
-
-      this.props.dispatcher.dispatch(new sharedActions.AddSocialShareButton());
-    },
-
     handleAddServiceClick: function(event) {
       event.preventDefault();
 
       this.props.dispatcher.dispatch(new sharedActions.AddSocialShareProvider());
     },
 
     handleProviderClick: function(event) {
       event.preventDefault();
@@ -121,44 +114,19 @@ loop.roomViews = (function(mozL10n) {
         return null;
       }
 
       var cx = React.addons.classSet;
       var shareDropdown = cx({
         "share-service-dropdown": true,
         "dropdown-menu": true,
         "visually-hidden": true,
-        "share-button-unavailable": !this.props.socialShareButtonAvailable,
         "hide": !this.props.show
       });
 
-      // When the button is not yet available, we offer to put it in the navbar
-      // for the user.
-      if (!this.props.socialShareButtonAvailable) {
-        return (
-          <div className={shareDropdown}>
-            <div className="share-panel-header">
-              {mozL10n.get("share_panel_header")}
-            </div>
-            <div className="share-panel-body">
-              {
-                mozL10n.get("share_panel_body", {
-                  brandShortname: mozL10n.get("brandShortname"),
-                  clientSuperShortname: mozL10n.get("clientSuperShortname")
-                })
-              }
-            </div>
-            <button className="btn btn-info btn-toolbar-add"
-                    onClick={this.handleToolbarAddButtonClick}>
-              {mozL10n.get("add_to_toolbar_button")}
-            </button>
-          </div>
-        );
-      }
-
       return (
         <ul className={shareDropdown}>
           <li className="dropdown-menu-item" onClick={this.handleAddServiceClick}>
             <i className="icon icon-add-share-service"></i>
             <span>{mozL10n.get("share_add_service_button")}</span>
           </li>
           {this.props.socialShareProviders.length ? <li className="dropdown-menu-separator"/> : null}
           {
@@ -188,17 +156,18 @@ loop.roomViews = (function(mozL10n) {
     propTypes: {
       dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
       error: React.PropTypes.object,
       mozLoop: React.PropTypes.object.isRequired,
       // This data is supplied by the activeRoomStore.
       roomData: React.PropTypes.object.isRequired,
       savingContext: React.PropTypes.bool,
       show: React.PropTypes.bool.isRequired,
-      showContext: React.PropTypes.bool.isRequired
+      showContext: React.PropTypes.bool.isRequired,
+      socialShareProviders: React.PropTypes.array
     },
 
     getInitialState: function() {
       return {
         copiedUrl: false,
         editMode: false,
         newRoomName: ""
       };
@@ -223,16 +192,24 @@ loop.roomViews = (function(mozL10n) {
         new sharedActions.CopyRoomUrl({roomUrl: this.props.roomData.roomUrl}));
 
       this.setState({copiedUrl: true});
     },
 
     handleShareButtonClick: function(event) {
       event.preventDefault();
 
+      var providers = this.props.socialShareProviders;
+      // If there are no providers available currently, save a click by dispatching
+      // the 'AddSocialShareProvider' right away.
+      if (!providers || !providers.length) {
+        this.props.dispatcher.dispatch(new sharedActions.AddSocialShareProvider());
+        return;
+      }
+
       this.toggleDropdownMenu();
     },
 
     handleAddContextClick: function(event) {
       event.preventDefault();
 
       this.handleEditModeChange(true);
     },
@@ -280,17 +257,16 @@ loop.roomViews = (function(mozL10n) {
                     onClick={this.handleShareButtonClick}>
               {mozL10n.get("share_button3")}
             </button>
           </div>
           <SocialShareDropdown
             dispatcher={this.props.dispatcher}
             roomUrl={this.props.roomData.roomUrl}
             show={this.state.showMenu}
-            socialShareButtonAvailable={this.props.socialShareButtonAvailable}
             socialShareProviders={this.props.socialShareProviders}
             ref="menu" />
           <DesktopRoomContextView
             dispatcher={this.props.dispatcher}
             editMode={this.state.editMode}
             error={this.props.error}
             savingContext={this.props.savingContext}
             mozLoop={this.props.mozLoop}
@@ -707,17 +683,16 @@ loop.roomViews = (function(mozL10n) {
               <DesktopRoomInvitationView
                 dispatcher={this.props.dispatcher}
                 error={this.state.error}
                 mozLoop={this.props.mozLoop}
                 roomData={roomData}
                 savingContext={this.state.savingContext}
                 show={shouldRenderInvitationOverlay}
                 showContext={shouldRenderContextView}
-                socialShareButtonAvailable={this.state.socialShareButtonAvailable}
                 socialShareProviders={this.state.socialShareProviders} />
               <div className="video-layout-wrapper">
                 <div className="conversation room-conversation">
                   <div className="media nested">
                     <div className="video_wrapper remote_wrapper">
                       <div className="video_inner remote focus-stream"></div>
                     </div>
                     <div className={localStreamClasses}></div>
--- a/browser/components/loop/content/shared/css/conversation.css
+++ b/browser/components/loop/content/shared/css/conversation.css
@@ -918,50 +918,22 @@ body[dir="rtl"] .room-invitation-addcont
 }
 
 /* When the dropdown is showing a vertical scrollbar, compensate for its width. */
 body[platform="other"] .share-service-dropdown.overflow > .dropdown-menu-item,
 body[platform="win"] .share-service-dropdown.overflow > .dropdown-menu-item {
   -moz-padding-end: 20px;
 }
 
-.share-service-dropdown.share-button-unavailable {
-  width: 230px;
-  padding: 8px;
-}
-
 .share-service-dropdown > .dropdown-menu-item > .icon {
   width: 14px;
   height: 14px;
   margin-right: 4px;
 }
 
-.share-service-dropdown .share-panel-header {
-  background-image: url("../img/icons-16x16.svg#share-darkgrey");
-  background-size: 3em 3em;
-  background-repeat: no-repeat;
-  min-height: 3em;
-  font-weight: bold;
-  margin-bottom: 1em;
-  padding-left: 4.5em;
-}
-
-body[dir=rtl] .share-service-dropdown .share-panel-header {
-  background-position: top right;
-  padding-left: 0;
-  padding-right: 4.5em;
-}
-
-.share-service-dropdown .btn-toolbar-add {
-  padding: 4px 2px;
-  border-radius: 2px;
-  margin-top: 1em;
-  width: 100%;
-}
-
 .dropdown-menu-item > .icon-add-share-service {
   background-image: url("../img/icons-16x16.svg#add");
   background-repeat: no-repeat;
   background-size: 12px 12px;
   width: 12px;
   height: 12px;
 }
 
--- a/browser/components/loop/content/shared/js/actions.js
+++ b/browser/components/loop/content/shared/js/actions.js
@@ -376,23 +376,16 @@ loop.shared.actions = (function() {
      * XXX: should move to some roomActions module - refs bug 1079284
      */
     ShareRoomUrl: Action.define("shareRoomUrl", {
       provider: Object,
       roomUrl: String
     }),
 
     /**
-     * Add the Social Share button to the browser toolbar.
-     * XXX: should move to some roomActions module - refs bug 1079284
-     */
-    AddSocialShareButton: Action.define("addSocialShareButton", {
-    }),
-
-    /**
      * Open the share panel to add a Social share provider.
      * XXX: should move to some roomActions module - refs bug 1079284
      */
     AddSocialShareProvider: Action.define("addSocialShareProvider", {
     }),
 
     /**
      * XXX: should move to some roomActions module - refs bug 1079284
@@ -411,17 +404,16 @@ loop.shared.actions = (function() {
      */
     SetupRoomInfo: Action.define("setupRoomInfo", {
       // roomContextUrls: Array - Optional.
       // roomDescription: String - Optional.
       // roomName: String - Optional.
       roomOwner: String,
       roomToken: String,
       roomUrl: String,
-      socialShareButtonAvailable: Boolean,
       socialShareProviders: Array
     }),
 
     /**
      * Updates the room information when it is received.
      * XXX: should move to some roomActions module - refs bug 1079284
      *
      * @see https://wiki.mozilla.org/Loop/Architecture/Rooms#GET_.2Frooms.2F.7Btoken.7D
@@ -435,17 +427,16 @@ loop.shared.actions = (function() {
       // See https://wiki.mozilla.org/Loop/Architecture/Context#Format_of_context.value
     }),
 
     /**
      * Updates the Social API information when it is received.
      * XXX: should move to some roomActions module - refs bug 1079284
      */
     UpdateSocialShareInfo: Action.define("updateSocialShareInfo", {
-      socialShareButtonAvailable: Boolean,
       socialShareProviders: Array
     }),
 
     /**
      * Starts the process for the user to join the room.
      * XXX: should move to some roomActions module - refs bug 1079284
      */
     JoinRoom: Action.define("joinRoom", {
--- a/browser/components/loop/content/shared/js/activeRoomStore.js
+++ b/browser/components/loop/content/shared/js/activeRoomStore.js
@@ -92,18 +92,16 @@ loop.store.ActiveRoomStore = (function()
         // The roomCryptoKey to decode the context data if necessary.
         roomCryptoKey: null,
         // The description for a room as stored in the context data.
         roomDescription: null,
         // Room information failed to be obtained for a reason. See ROOM_INFO_FAILURES.
         roomInfoFailure: null,
         // The name of the room.
         roomName: null,
-        // Social API state.
-        socialShareButtonAvailable: false,
         socialShareProviders: null
       };
     },
 
     /**
      * Handles a room failure.
      *
      * @param {sharedActions.RoomFailure} actionData
@@ -195,17 +193,16 @@ loop.store.ActiveRoomStore = (function()
 
           this.dispatchAction(new sharedActions.SetupRoomInfo({
             roomToken: actionData.roomToken,
             roomContextUrls: roomData.decryptedContext.urls,
             roomDescription: roomData.decryptedContext.description,
             roomName: roomData.decryptedContext.roomName,
             roomOwner: roomData.roomOwner,
             roomUrl: roomData.roomUrl,
-            socialShareButtonAvailable: this._mozLoop.isSocialShareButtonAvailable(),
             socialShareProviders: this._mozLoop.getSocialShareProviders()
           }));
 
           // For the conversation window, we need to automatically
           // join the room.
           this.dispatchAction(new sharedActions.JoinRoom());
         }.bind(this));
     },
@@ -314,17 +311,16 @@ loop.store.ActiveRoomStore = (function()
       this.setStoreState({
         roomContextUrls: actionData.roomContextUrls,
         roomDescription: actionData.roomDescription,
         roomName: actionData.roomName,
         roomOwner: actionData.roomOwner,
         roomState: ROOM_STATES.READY,
         roomToken: actionData.roomToken,
         roomUrl: actionData.roomUrl,
-        socialShareButtonAvailable: actionData.socialShareButtonAvailable,
         socialShareProviders: actionData.socialShareProviders
       });
 
       this._onUpdateListener = this._handleRoomUpdate.bind(this);
       this._onDeleteListener = this._handleRoomDelete.bind(this);
       this._onSocialShareUpdate = this._handleSocialShareUpdate.bind(this);
 
       this._mozLoop.rooms.on("update:" + actionData.roomToken, this._onUpdateListener);
@@ -356,17 +352,16 @@ loop.store.ActiveRoomStore = (function()
     /**
      * Handles the updateSocialShareInfo action. Updates the room data with new
      * Social API info.
      *
      * @param  {sharedActions.UpdateSocialShareInfo} actionData
      */
     updateSocialShareInfo: function(actionData) {
       this.setStoreState({
-        socialShareButtonAvailable: actionData.socialShareButtonAvailable,
         socialShareProviders: actionData.socialShareProviders
       });
     },
 
     /**
      * Handles room updates notified by the mozLoop rooms API.
      *
      * @param {String} eventName The name of the event
@@ -395,17 +390,16 @@ loop.store.ActiveRoomStore = (function()
     },
 
     /**
      * Handles an update of the position of the Share widget and changes to list
      * of Social API providers, notified by the mozLoop API.
      */
     _handleSocialShareUpdate: function() {
       this.dispatchAction(new sharedActions.UpdateSocialShareInfo({
-        socialShareButtonAvailable: this._mozLoop.isSocialShareButtonAvailable(),
         socialShareProviders: this._mozLoop.getSocialShareProviders()
       }));
     },
 
     /**
      * Handles the action to join to a room.
      */
     joinRoom: function() {
--- a/browser/components/loop/modules/MozLoopAPI.jsm
+++ b/browser/components/loop/modules/MozLoopAPI.jsm
@@ -965,92 +965,35 @@ function injectLoopAPI(targetWindow) {
       enumerable: true,
       writable: true,
       value: function(windowId, active) {
         MozLoopService.setScreenShareState(windowId, active);
       }
     },
 
     /**
-     * Checks if the Social Share widget is available in any of the registered
-     * widget areas (navbar, MenuPanel, etc).
-     *
-     * @return {Boolean} `true` if the widget is available and `false` when it's
-     *                   still in the Customization palette.
-     */
-    isSocialShareButtonAvailable: {
-      enumerable: true,
-      writable: true,
-      value: function() {
-        let win = Services.wm.getMostRecentWindow("navigator:browser");
-        if (!win || !win.CustomizableUI) {
-          return false;
-        }
-
-        let widget = win.CustomizableUI.getWidget(kShareWidgetId);
-        if (widget) {
-          if (!socialShareButtonListenersAdded) {
-            let eventName = "social:" + kShareWidgetId;
-            Services.obs.addObserver(onShareWidgetChanged, eventName + "-added", false);
-            Services.obs.addObserver(onShareWidgetChanged, eventName + "-removed", false);
-            socialShareButtonListenersAdded = true;
-          }
-          return !!widget.areaType;
-        }
-
-        return false;
-      }
-    },
-
-    /**
-     * Add the Social Share widget to the navbar area, but only when it's not
-     * located anywhere else than the Customization palette.
-     */
-    addSocialShareButton: {
-      enumerable: true,
-      writable: true,
-      value: function() {
-        // Don't do anything if the button is already available.
-        if (api.isSocialShareButtonAvailable.value()) {
-          return;
-        }
-
-        let win = Services.wm.getMostRecentWindow("navigator:browser");
-        if (!win || !win.CustomizableUI) {
-          return;
-        }
-        win.CustomizableUI.addWidgetToArea(kShareWidgetId, win.CustomizableUI.AREA_NAVBAR);
-      }
-    },
-
-    /**
      * Activates the Social Share panel with the Social Provider panel opened
      * when the popup open.
      */
     addSocialShareProvider: {
       enumerable: true,
       writable: true,
       value: function() {
-        // Don't do anything if the button is _not_ available.
-        if (!api.isSocialShareButtonAvailable.value()) {
-          return;
-        }
-
         let win = Services.wm.getMostRecentWindow("navigator:browser");
         if (!win || !win.SocialShare) {
           return;
         }
-        win.SocialShare.showDirectory();
+        win.SocialShare.showDirectory(win.LoopUI.toolbarButton.anchor);
       }
     },
 
     /**
      * Returns a sorted list of Social Providers that can share URLs. See
      * `updateSocialProvidersCache()` for more information.
-     * 
+     *
      * @return {Array} Sorted list of share-capable Social Providers.
      */
     getSocialShareProviders: {
       enumerable: true,
       writable: true,
       value: function() {
         if (socialProviders) {
           return socialProviders;
@@ -1082,17 +1025,18 @@ function injectLoopAPI(targetWindow) {
 
         let graphData = {
           url: roomURL,
           title: title
         };
         if (body) {
           graphData.body = body;
         }
-        win.SocialShare.sharePage(providerOrigin, graphData);
+        win.SocialShare.sharePage(providerOrigin, graphData, null,
+          win.LoopUI.toolbarButton.anchor);
       }
     }
   };
 
   /**
    * Send an event to the content window to indicate that the state on the chrome
    * side was updated.
    *
--- a/browser/components/loop/test/desktop-local/roomStore_test.js
+++ b/browser/components/loop/test/desktop-local/roomStore_test.js
@@ -442,26 +442,16 @@ describe("loop.store.RoomStore", functio
         }));
 
         sinon.assert.calledOnce(fakeMozLoop.socialShareRoom);
         sinon.assert.calledWithExactly(fakeMozLoop.socialShareRoom, origin,
           roomUrl, "share_tweet", null);
       });
     });
 
-    describe("#addSocialShareButton", function() {
-      it("should invoke to the correct mozLoop function", function() {
-        fakeMozLoop.addSocialShareButton = sinon.stub();
-
-        store.addSocialShareButton(new sharedActions.AddSocialShareButton());
-
-        sinon.assert.calledOnce(fakeMozLoop.addSocialShareButton);
-      });
-    });
-
     describe("#addSocialShareProvider", function() {
       it("should invoke to the correct mozLoop function", function() {
         fakeMozLoop.addSocialShareProvider = sinon.stub();
 
         store.addSocialShareProvider(new sharedActions.AddSocialShareProvider());
 
         sinon.assert.calledOnce(fakeMozLoop.addSocialShareProvider);
       });
--- a/browser/components/loop/test/desktop-local/roomViews_test.js
+++ b/browser/components/loop/test/desktop-local/roomViews_test.js
@@ -20,17 +20,16 @@ describe("loop.roomViews", function () {
     fakeMozLoop = {
       getAudioBlob: sinon.stub(),
       getLoopPref: sinon.stub(),
       getSelectedTabMetadata: sinon.stub().callsArgWith(0, {
         favicon: favicon,
         previews: [],
         title: ""
       }),
-      isSocialShareButtonAvailable: sinon.stub(),
       rooms: {
         get: sinon.stub().callsArgWith(1, null, {
           roomToken: "fakeToken",
           roomName: "fakeName",
           decryptedContext: {
             roomName: "fakeName",
             urls: []
           }
@@ -203,21 +202,37 @@ describe("loop.roomViews", function () {
           React.addons.TestUtils.Simulate.click(copyBtn);
 
           // copied_url_button is the l10n string.
           expect(copyBtn.textContent).eql("copied_url_button");
       });
     });
 
     describe("Share button", function() {
-      beforeEach(function() {
+      it("should dispatch a AddSocialShareProvider action when the share button is clicked", function() {
         view = mountTestComponent();
+
+        var shareBtn = view.getDOMNode().querySelector(".btn-share");
+
+        React.addons.TestUtils.Simulate.click(shareBtn);
+
+        sinon.assert.calledOnce(dispatcher.dispatch);
+        sinon.assert.calledWith(dispatcher.dispatch,
+          new sharedActions.AddSocialShareProvider());
       });
 
       it("should toggle the share dropdown when the share button is clicked", function() {
+        view = mountTestComponent({
+          socialShareProviders: [{
+            name: "foo",
+            origin: "https://foo",
+            iconURL: "http://example.com/foo.png"
+          }]
+        });
+
         var shareBtn = view.getDOMNode().querySelector(".btn-share");
 
         React.addons.TestUtils.Simulate.click(shareBtn);
 
         expect(view.state.showMenu).to.eql(true);
         expect(view.refs.menu.props.show).to.eql(true);
       });
     });
@@ -544,90 +559,62 @@ describe("loop.roomViews", function () {
 
     describe("#render", function() {
       it("should show no contents when the Social Providers have not been fetched yet", function() {
         view = mountTestComponent();
 
         expect(view.getDOMNode()).to.eql(null);
       });
 
-      it("should show different contents when the Share XUL button is not available", function() {
-        view = mountTestComponent({
-          socialShareProviders: []
-        });
-
-        var node = view.getDOMNode();
-        expect(node.querySelector(".share-panel-header")).to.not.eql(null);
-      });
-
       it("should show an empty list when no Social Providers are available", function() {
         view = mountTestComponent({
-          socialShareButtonAvailable: true,
           socialShareProviders: []
         });
 
         var node = view.getDOMNode();
         expect(node.querySelector(".icon-add-share-service")).to.not.eql(null);
         expect(node.querySelectorAll(".dropdown-menu-item").length).to.eql(1);
       });
 
       it("should show a list of available Social Providers", function() {
         view = mountTestComponent({
-          socialShareButtonAvailable: true,
           socialShareProviders: [fakeProvider]
         });
 
         var node = view.getDOMNode();
         expect(node.querySelector(".icon-add-share-service")).to.not.eql(null);
         expect(node.querySelector(".dropdown-menu-separator")).to.not.eql(null);
 
         var dropdownNodes = node.querySelectorAll(".dropdown-menu-item");
         expect(dropdownNodes.length).to.eql(2);
         expect(dropdownNodes[1].querySelector("img").src).to.eql(fakeProvider.iconURL);
         expect(dropdownNodes[1].querySelector("span").textContent)
           .to.eql(fakeProvider.name);
       });
     });
 
-    describe("#handleToolbarAddButtonClick", function() {
-      it("should dispatch an action when the 'add to toolbar' button is clicked", function() {
-        view = mountTestComponent({
-          socialShareProviders: []
-        });
-
-        var addButton = view.getDOMNode().querySelector(".btn-toolbar-add");
-        React.addons.TestUtils.Simulate.click(addButton);
-
-        sinon.assert.calledOnce(dispatcher.dispatch);
-        sinon.assert.calledWithExactly(dispatcher.dispatch,
-          new sharedActions.AddSocialShareButton());
-      });
-    });
-
     describe("#handleAddServiceClick", function() {
       it("should dispatch an action when the 'add provider' item is clicked", function() {
         view = mountTestComponent({
-          socialShareProviders: [],
-          socialShareButtonAvailable: true
+          socialShareProviders: []
         });
 
         var addItem = view.getDOMNode().querySelector(".dropdown-menu-item:first-child");
         React.addons.TestUtils.Simulate.click(addItem);
 
         sinon.assert.calledOnce(dispatcher.dispatch);
         sinon.assert.calledWithExactly(dispatcher.dispatch,
           new sharedActions.AddSocialShareProvider());
       });
     });
 
     describe("#handleProviderClick", function() {
       it("should dispatch an action when a provider item is clicked", function() {
         view = mountTestComponent({
           roomUrl: "http://example.com",
-          socialShareButtonAvailable: true,
           socialShareProviders: [fakeProvider]
         });
 
         var providerItem = view.getDOMNode().querySelector(".dropdown-menu-item:last-child");
         React.addons.TestUtils.Simulate.click(providerItem);
 
         sinon.assert.calledOnce(dispatcher.dispatch);
         sinon.assert.calledWithExactly(dispatcher.dispatch,
--- a/browser/components/loop/test/mochitest/browser_mozLoop_socialShare.js
+++ b/browser/components/loop/test/mochitest/browser_mozLoop_socialShare.js
@@ -8,17 +8,16 @@
 
 "use strict";
 
 Cu.import("resource://gre/modules/Promise.jsm");
 const {SocialService} = Cu.import("resource://gre/modules/SocialService.jsm", {});
 
 add_task(loadLoopPanel);
 
-const kShareWidgetId = "social-share-button";
 const kShareProvider = {
   name: "provider 1",
   origin: "https://example.com",
   iconURL: "https://example.com/browser/browser/base/content/test/general/moz.png",
   shareURL: "https://example.com/browser/browser/base/content/test/social/social_sidebar_empty.html"
 };
 const kShareProviderInvalid = {
   name: "provider 1",
@@ -27,70 +26,25 @@ const kShareProviderInvalid = {
 
 registerCleanupFunction(function* () {
   yield new Promise(resolve => SocialService.disableProvider(kShareProvider.origin, resolve));
   yield new Promise(resolve => SocialService.disableProvider(kShareProviderInvalid.origin, resolve));
   Assert.strictEqual(Social.providers.length, 0, "all providers should be removed");
   SocialShare.uninit();
 });
 
-add_task(function* test_mozLoop_isSocialShareButtonAvailable() {
-  Assert.ok(gMozLoopAPI, "mozLoop should exist");
-
-  // First make sure the Social Share button is not available. This is probably
-  // already the case, but make it explicit here.
-  CustomizableUI.removeWidgetFromArea(kShareWidgetId);
-
-  Assert.ok(!gMozLoopAPI.isSocialShareButtonAvailable(),
-    "Social Share button should not be available");
-
-  // Add the widget to the navbar.
-  CustomizableUI.addWidgetToArea(kShareWidgetId, CustomizableUI.AREA_NAVBAR);
-
-  Assert.ok(gMozLoopAPI.isSocialShareButtonAvailable(),
-    "Social Share button should be available");
-
-  // Add the widget to the MenuPanel.
-  CustomizableUI.addWidgetToArea(kShareWidgetId, CustomizableUI.AREA_PANEL);
-
-  Assert.ok(gMozLoopAPI.isSocialShareButtonAvailable(),
-    "Social Share button should still be available");
-
-  // Test button removal during the same session.
-  CustomizableUI.removeWidgetFromArea(kShareWidgetId);
-
-  Assert.ok(!gMozLoopAPI.isSocialShareButtonAvailable(),
-    "Social Share button should not be available");
-});
-
-add_task(function* test_mozLoop_addSocialShareButton() {
-  gMozLoopAPI.addSocialShareButton();
-
-  Assert.ok(gMozLoopAPI.isSocialShareButtonAvailable(),
-    "Social Share button should be available");
-
-  let widget = CustomizableUI.getWidget(kShareWidgetId);
-  Assert.strictEqual(widget.areaType, CustomizableUI.TYPE_TOOLBAR,
-    "Social Share button should be placed in the navbar");
-
-  CustomizableUI.removeWidgetFromArea(kShareWidgetId);
-});
-
 add_task(function* test_mozLoop_addSocialShareProvider() {
-  gMozLoopAPI.addSocialShareButton();
-
   gMozLoopAPI.addSocialShareProvider();
 
   yield promiseWaitForCondition(() => SocialShare.panel.state == "open");
 
   Assert.equal(SocialShare.iframe.getAttribute("src"), "about:providerdirectory",
     "Provider directory page should be visible");
 
   SocialShare.panel.hidePopup();
-  CustomizableUI.removeWidgetFromArea(kShareWidgetId);
 });
 
 add_task(function* test_mozLoop_getSocialShareProviders() {
   Assert.strictEqual(gMozLoopAPI.getSocialShareProviders().length, 0,
     "Provider list should be empty initially");
 
   // Add a provider.
   yield new Promise(resolve => SocialService.addProvider(kShareProvider, resolve));
@@ -126,22 +80,19 @@ add_task(function* test_mozLoop_getSocia
   yield new Promise(resolve => SocialService.disableProvider(provider2.origin, resolve));
   providers = gMozLoopAPI.getSocialShareProviders();
   Assert.strictEqual(providers.length, 1,
     "The uninstalled provider should not be part of the list");
   Assert.strictEqual(providers[0].name, kShareProvider.name, "Names should match");
 });
 
 add_task(function* test_mozLoop_socialShareRoom() {
-  gMozLoopAPI.addSocialShareButton();
-
   gMozLoopAPI.socialShareRoom(kShareProvider.origin, "https://someroom.com", "Some Title");
 
   yield promiseWaitForCondition(() => SocialShare.panel.state == "open");
 
   Assert.equal(SocialShare.iframe.getAttribute("origin"), kShareProvider.origin,
     "Origins should match");
   Assert.equal(SocialShare.iframe.getAttribute("src"), kShareProvider.shareURL,
     "Provider's share page should be displayed");
 
   SocialShare.panel.hidePopup();
-  CustomizableUI.removeWidgetFromArea(kShareWidgetId);
 });
--- a/browser/components/loop/test/shared/activeRoomStore_test.js
+++ b/browser/components/loop/test/shared/activeRoomStore_test.js
@@ -32,17 +32,16 @@ describe("loop.store.ActiveRoomStore", f
         refreshMembership: sinon.stub(),
         leave: sinon.stub(),
         on: sinon.stub(),
         off: sinon.stub(),
         sendConnectionStatus: sinon.stub()
       },
       setScreenShareState: sinon.stub(),
       getActiveTabWindowId: sandbox.stub().callsArgWith(0, null, 42),
-      isSocialShareButtonAvailable: sinon.stub().returns(false),
       getSocialShareProviders: sinon.stub().returns([])
     };
 
     fakeSdkDriver = {
       connectSession: sinon.stub(),
       disconnectSession: sinon.stub(),
       forceDisconnectAll: sinon.stub().callsArg(0),
       retryPublishWithoutVideo: sinon.stub(),
@@ -284,17 +283,16 @@ describe("loop.store.ActiveRoomStore", f
         sinon.assert.calledWithExactly(dispatcher.dispatch,
           new sharedActions.SetupRoomInfo({
             roomContextUrls: undefined,
             roomDescription: undefined,
             roomToken: fakeToken,
             roomName: fakeRoomData.decryptedContext.roomName,
             roomOwner: fakeRoomData.roomOwner,
             roomUrl: fakeRoomData.roomUrl,
-            socialShareButtonAvailable: false,
             socialShareProviders: []
           }));
       });
 
     it("should dispatch a JoinRoom action if the get is successful",
       function() {
         store.setupWindowData(new sharedActions.SetupWindowData({
           windowId: "42",
@@ -537,17 +535,16 @@ describe("loop.store.ActiveRoomStore", f
     var fakeRoomInfo;
 
     beforeEach(function() {
       fakeRoomInfo = {
         roomName: "Its a room",
         roomOwner: "Me",
         roomToken: "fakeToken",
         roomUrl: "http://invalid",
-        socialShareButtonAvailable: false,
         socialShareProviders: []
       };
     });
 
     it("should set the state to READY", function() {
       store.setupRoomInfo(new sharedActions.SetupRoomInfo(fakeRoomInfo));
 
       expect(store._storeState.roomState).eql(ROOM_STATES.READY);
@@ -556,17 +553,16 @@ describe("loop.store.ActiveRoomStore", f
     it("should save the room information", function() {
       store.setupRoomInfo(new sharedActions.SetupRoomInfo(fakeRoomInfo));
 
       var state = store.getStoreState();
       expect(state.roomName).eql(fakeRoomInfo.roomName);
       expect(state.roomOwner).eql(fakeRoomInfo.roomOwner);
       expect(state.roomToken).eql(fakeRoomInfo.roomToken);
       expect(state.roomUrl).eql(fakeRoomInfo.roomUrl);
-      expect(state.socialShareButtonAvailable).eql(false);
       expect(state.socialShareProviders).eql([]);
     });
   });
 
   describe("#updateRoomInfo", function() {
     var fakeRoomInfo;
 
     beforeEach(function() {
@@ -593,31 +589,28 @@ describe("loop.store.ActiveRoomStore", f
     });
   });
 
   describe("#updateSocialShareInfo", function() {
     var fakeSocialShareInfo;
 
     beforeEach(function() {
       fakeSocialShareInfo = {
-        socialShareButtonAvailable: true,
         socialShareProviders: [{
           name: "foo",
           origin: "https://example.com",
           iconURL: "icon.png"
         }]
       };
     });
 
     it("should save the Social API information", function() {
       store.updateSocialShareInfo(new sharedActions.UpdateSocialShareInfo(fakeSocialShareInfo));
 
       var state = store.getStoreState();
-      expect(state.socialShareButtonAvailable)
-        .eql(fakeSocialShareInfo.socialShareButtonAvailable);
       expect(state.socialShareProviders)
         .eql(fakeSocialShareInfo.socialShareProviders);
     });
   });
 
   describe("#joinRoom", function() {
     it("should reset failureReason", function() {
       store.setStoreState({failureReason: "Test"});
@@ -1282,38 +1275,35 @@ describe("loop.store.ActiveRoomStore", f
 
   describe("#_handleSocialShareUpdate", function() {
     it("should dispatch an UpdateRoomInfo action", function() {
       store._handleSocialShareUpdate();
 
       sinon.assert.calledOnce(dispatcher.dispatch);
       sinon.assert.calledWithExactly(dispatcher.dispatch,
         new sharedActions.UpdateSocialShareInfo({
-          socialShareButtonAvailable: false,
           socialShareProviders: []
         }));
     });
 
     it("should call respective mozLoop methods", function() {
       store._handleSocialShareUpdate();
 
-      sinon.assert.calledOnce(fakeMozLoop.isSocialShareButtonAvailable);
       sinon.assert.calledOnce(fakeMozLoop.getSocialShareProviders);
     });
   });
 
   describe("Events", function() {
     describe("update:{roomToken}", function() {
       beforeEach(function() {
         store.setupRoomInfo(new sharedActions.SetupRoomInfo({
           roomName: "Its a room",
           roomOwner: "Me",
           roomToken: "fakeToken",
           roomUrl: "http://invalid",
-          socialShareButtonAvailable: false,
           socialShareProviders: []
         }));
       });
 
       it("should dispatch an UpdateRoomInfo action", function() {
         sinon.assert.calledTwice(fakeMozLoop.rooms.on);
 
         var fakeRoomData = {
@@ -1352,17 +1342,16 @@ describe("loop.store.ActiveRoomStore", f
         roomOwner: "Me",
         roomToken: "fakeToken",
         roomUrl: "http://invalid"
       };
 
       beforeEach(function() {
         store.setupRoomInfo(new sharedActions.SetupRoomInfo(
           _.extend(fakeRoomData, {
-            socialShareButtonAvailable: false,
             socialShareProviders: []
           })
         ));
       });
 
       it("should disconnect all room connections", function() {
         fakeMozLoop.rooms.on.callArgWith(1, "delete:" + fakeRoomData.roomToken, fakeRoomData);