Add D-Bus call to concierge for getting icons.

BUG=chromium:822467
TEST=Log message from the container when concierge_client is called.

Change-Id: I3e5894a29a01487236f8734bfe5c34ac0c6b252b
Reviewed-on: https://chromium-review.googlesource.com/1000819
Commit-Ready: Tim Zheng <timzheng@chromium.org>
Tested-by: Tim Zheng <timzheng@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
diff --git a/dbus/vm_concierge/dbus-constants.h b/dbus/vm_concierge/dbus-constants.h
index 4caeabd..86b4288 100644
--- a/dbus/vm_concierge/dbus-constants.h
+++ b/dbus/vm_concierge/dbus-constants.h
@@ -21,6 +21,7 @@
 const char kListVmDisksMethod[] = "ListVmDisks";
 const char kStartContainerMethod[] = "StartContainer";
 const char kLaunchContainerApplicationMethod[] = "LaunchContainerApplication";
+const char kGetContainerAppIconMethod[] = "GetContainerAppIcon";
 
 const char kContainerStartedSignal[] = "ContainerStarted";
 
diff --git a/dbus/vm_concierge/service.proto b/dbus/vm_concierge/service.proto
index cdd3bcb..99f6dba 100644
--- a/dbus/vm_concierge/service.proto
+++ b/dbus/vm_concierge/service.proto
@@ -322,3 +322,38 @@
   // The failure_reason if the requested application could not be started.
   string failure_reason = 2;
 }
+
+// Request to get application icons in the specified VM/container. Used with the
+// GetContainerAppIcon D-Bus message into vm_concierge.
+message ContainerAppIconRequest {
+  // Name of the VM to target.
+  string vm_name = 1;
+
+  // Name of the container within the VM to target, if empty the default
+  // container name will be used.
+  string container_name = 2;
+
+  // IDs of the application to get icons for, should map to the desktop_file_id
+  // that is in the application list sent back from the container.
+  repeated string desktop_file_ids = 3;
+
+  // The icon size with both its height and width equals to this number.
+  int32 size = 4;
+
+  // The target scale of this icon. This is the scale at which this icon is
+  // designed to be used.
+  int32 scale = 5;
+}
+
+// One desktop file ID with its icon.
+message DesktopIcon {
+  string desktop_file_id = 1;
+  bytes icon = 2;
+}
+
+// Response sent back by vm_concierge when it receives a
+// GetContainerAppIcon D-Bus message.
+// Some desktop_file_id may not have an icon.
+message ContainerAppIconResponse {
+  repeated DesktopIcon icons = 1;
+}