Initial wire up of icons for "Computers" section of Google Drive.

We're still waiting on the correct artwork, so for now just re-use existing
icons so we get the feature working.

Still needs to support "USB and External Devices" after confirming with
drive folks that this name will not be localized.

Tested manually as there are no automated tests for style right now.

Bug: 884020
Change-Id: I209f6e1a76c75655475e4c62ee6e97f79c9215df
Reviewed-on: https://chromium-review.googlesource.com/c/1313988
Reviewed-by: Luciano Pacheco <lucmult@chromium.org>
Commit-Queue: Stuart Langley <slangley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604846}
diff --git a/ui/file_manager/file_manager/foreground/css/file_types.css b/ui/file_manager/file_manager/foreground/css/file_types.css
index 19662e4..f33ccc33 100644
--- a/ui/file_manager/file_manager/foreground/css/file_types.css
+++ b/ui/file_manager/file_manager/foreground/css/file_types.css
@@ -297,6 +297,33 @@
       url(../images/volumes/2x/hard_drive_active.png) 2x);
 }
 
+[volume-type-icon='computers_grand_root'] {
+  background-image: -webkit-image-set(
+      url(../images/volumes/my_files.png) 1x,
+      url(../images/volumes/2x/my_files.png) 2x);
+}
+
+.tree-row[selected] [volume-type-icon='computers_grand_root'] {
+  background-image: -webkit-image-set(
+      url(../images/volumes/my_files_active.png) 1x,
+      url(../images/volumes/2x/my_files_active.png) 2x);
+}
+
+[volume-type-icon='computer'],
+.computers-root[file-type-icon='folder'] {
+  background-image: -webkit-image-set(
+      url(../images/volumes/hard_drive.png) 1x,
+      url(../images/volumes/2x/hard_drive.png) 2x);
+}
+
+.tree-row[selected] [volume-type-icon='computer'],
+tree .tree-item[selected] > .tree-row >
+.computers-root[file-type-icon='folder'] {
+  background-image: -webkit-image-set(
+      url(../images/volumes/hard_drive_active.png) 1x,
+      url(../images/volumes/2x/hard_drive_active.png) 2x);
+}
+
 [volume-type-icon='drive_offline'] {
   background-image: -webkit-image-set(
       url(../images/volumes/offline.png) 1x,
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_table.js b/ui/file_manager/file_manager/foreground/js/ui/file_table.js
index 4e896ef..1a642ef 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_table.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_table.js
@@ -961,7 +961,7 @@
           listItem,
           this.metadataModel_.getCache(
               [entry], ['availableOffline', 'customIconUrl', 'shared'])[0],
-          util.isTeamDriveRoot(entry));
+          util.isTeamDriveRoot(entry), util.isComputersRoot(entry));
     });
   } else if (type === 'import-history') {
     forEachCell('.table-row-cell > .status', function(item, entry, unused) {
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_table_list.js b/ui/file_manager/file_manager/foreground/js/ui/file_table_list.js
index cd015c3..5bff9a4 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_table_list.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_table_list.js
@@ -135,7 +135,8 @@
   var externalProps = metadataModel.getCache(
       [entry], ['hosted', 'availableOffline', 'customIconUrl', 'shared'])[0];
   filelist.updateListItemExternalProps(
-      li, externalProps, util.isTeamDriveRoot(entry));
+      li, externalProps, util.isTeamDriveRoot(entry),
+      util.isComputersRoot(entry));
 
   // Overriding the default role 'list' to 'listbox' for better
   // accessibility on ChromeOS.
@@ -203,7 +204,7 @@
  * @param {boolean} isTeamDriveRoot Whether the item is a team drive root entry.
  */
 filelist.updateListItemExternalProps = function(
-    li, externalProps, isTeamDriveRoot) {
+    li, externalProps, isTeamDriveRoot, isComputersRoot) {
   if (li.classList.contains('file')) {
     if (externalProps.availableOffline === false)
       li.classList.add('dim-offline');
@@ -226,6 +227,7 @@
   if (li.classList.contains('directory')) {
     iconDiv.classList.toggle('shared', !!externalProps.shared);
     iconDiv.classList.toggle('team-drive-root', !!isTeamDriveRoot);
+    iconDiv.classList.toggle('computers-root', !!isComputersRoot);
   }
 };