Bug 1383898 - Add tablet icon to Send Page to Device panel. r?markh
MozReview-Commit-ID: SqxuO1g2J0
--- a/browser/base/content/browser-sync.js
+++ b/browser/base/content/browser-sync.js
@@ -350,17 +350,19 @@ var gSync = {
targetDevice.setAttribute("clientId", clientId);
targetDevice.setAttribute("clientType", clientType);
targetDevice.setAttribute("label", name);
fragment.appendChild(targetDevice);
}
const clients = this.remoteClients;
for (let client of clients) {
- addTargetDevice(client.id, client.name, client.type);
+ const type = client.formfactor && client.formfactor.includes("tablet") ?
+ "tablet" : client.type;
+ addTargetDevice(client.id, client.name, type);
}
// "Send to All Devices" menu item
if (clients.length > 1) {
const separator = createDeviceNodeFn();
separator.classList.add("sync-menuitem");
fragment.appendChild(separator);
const allDevicesLabel = this.fxaStrings.GetStringFromName("sendToAllDevices.menuitem");
new file mode 100644
--- /dev/null
+++ b/browser/themes/shared/icons/device-tablet.svg
@@ -0,0 +1,6 @@
+<!-- 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/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
+ <path fill-opacity="context-fill-opacity" fill="context-fill" d="M14 1H2C.895 1 0 1.895 0 3v10c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V3c0-1.105-.895-2-2-2zm-1 11.5c0 .276-.224.5-.5.5h-10c-.276 0-.5-.224-.5-.5v-9c0-.276.224-.5.5-.5h10c.276 0 .5.224.5.5v9zM15 9h-1V7h1v2z"/>
+</svg>
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -132,16 +132,17 @@
skin/classic/browser/chevron.svg (../shared/icons/chevron.svg)
skin/classic/browser/chevron-animation.svg (../shared/icons/chevron-animation.svg)
skin/classic/browser/check.svg (../shared/icons/check.svg)
skin/classic/browser/check-animation.svg (../shared/icons/check-animation.svg)
skin/classic/browser/containers.svg (../shared/icons/containers.svg)
skin/classic/browser/customize.svg (../shared/icons/customize.svg)
skin/classic/browser/developer.svg (../shared/icons/developer.svg)
skin/classic/browser/device-mobile.svg (../shared/icons/device-mobile.svg)
+ skin/classic/browser/device-tablet.svg (../shared/icons/device-tablet.svg)
skin/classic/browser/device-desktop.svg (../shared/icons/device-desktop.svg)
skin/classic/browser/edit-copy.svg (../shared/icons/edit-copy.svg)
skin/classic/browser/edit-cut.svg (../shared/icons/edit-cut.svg)
skin/classic/browser/edit-paste.svg (../shared/icons/edit-paste.svg)
skin/classic/browser/email-link.svg (../shared/icons/email-link.svg)
skin/classic/browser/feed.svg (../shared/icons/feed.svg)
skin/classic/browser/find.svg (../shared/icons/find.svg)
skin/classic/browser/forget.svg (../shared/icons/forget.svg)
--- a/browser/themes/shared/urlbar-searchbar.inc.css
+++ b/browser/themes/shared/urlbar-searchbar.inc.css
@@ -95,16 +95,20 @@
#pageAction-urlbar-sendToDevice {
list-style-image: url("chrome://browser/skin/device-mobile.svg");
}
.pageAction-sendToDevice-device[clientType=mobile] {
list-style-image: url("chrome://browser/skin/device-mobile.svg");
}
+.pageAction-sendToDevice-device[clientType=tablet] {
+ list-style-image: url("chrome://browser/skin/device-tablet.svg");
+}
+
.pageAction-sendToDevice-device[clientType=desktop] {
list-style-image: url("chrome://browser/skin/device-desktop.svg");
}
.pageAction-sendToDevice-device.signintosync,
#pageAction-panel-sendToDevice-fxa,
#pageAction-urlbar-sendToDevice-fxa {
list-style-image: url("chrome://browser/skin/sync.svg");