Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Unified Diff: content/common/image_downloader/image_downloader.mojom

Issue 1085783002: Replace image_messages.h with Mojo service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review comments on set7 Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+};

Powered by Google App Engine
This is Rietveld 408576698