OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module image_downloader; |
| 6 |
| 7 import "skia/public/interfaces/bitmap.mojom"; |
| 8 import "ui/mojo/geometry/geometry.mojom"; |
| 9 |
| 10 struct DownloadRequest { |
| 11 string url; |
| 12 bool is_favicon; |
| 13 uint32 max_bitmap_size; |
| 14 bool bypass_cache; |
| 15 }; |
| 16 |
| 17 struct DownloadResult { |
| 18 int32 http_status_code; |
| 19 array<skia.Bitmap> images; |
| 20 array<mojo.Size> original_image_sizes; |
| 21 }; |
| 22 |
| 23 interface ImageDownloader { |
| 24 // Fetch and decode an image from a given URL. |
| 25 // Returns the decoded images, or http_status_code to indicate error. |
| 26 // Each call is independent, overlapping calls are possible. |
| 27 DownloadImage(DownloadRequest request) => (DownloadResult result); |
| 28 }; |
OLD | NEW |