Index: content/common/image_downloader/image_downloader.mojom |
diff --git a/content/common/image_downloader/image_downloader.mojom b/content/common/image_downloader/image_downloader.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7f3d289949da156283a35d30f29c8cf170bfff51 |
--- /dev/null |
+++ b/content/common/image_downloader/image_downloader.mojom |
@@ -0,0 +1,28 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+module image_downloader; |
+ |
+import "skia/public/interfaces/bitmap.mojom"; |
+import "ui/mojo/geometry/geometry.mojom"; |
+ |
+struct DownloadRequest { |
+ string url; |
+ bool is_favicon; |
+ uint32 max_bitmap_size; |
+ bool bypass_cache; |
+}; |
+ |
+struct DownloadResult { |
+ int32 http_status_code; |
+ array<skia.Bitmap> images; |
+ array<mojo.Size> original_image_sizes; |
+}; |
+ |
+interface ImageDownloader { |
+ // Fetch and decode an image from a given URL. |
+ // Returns the decoded images, or http_status_code to indicate error. |
+ // Each call is independent, overlapping calls are possible. |
+ DownloadImage(DownloadRequest request) => (DownloadResult result); |
+}; |