naiveproxy/chrome/common/thumbnail_capturer.mojom

26 lines
975 B
Plaintext
Raw Normal View History

2018-01-28 19:30:36 +03:00
// Copyright 2017 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 chrome.mojom;
import "ui/gfx/geometry/mojo/geometry.mojom";
enum ImageFormat {
JPEG,
PNG,
};
interface ThumbnailCapturer {
// Requests an encoded thumbnail of the image selected by the most recently
// opened context menu. The encoding format is specified as a parameter. If
// no image is selected or there's an error capturing a thumbnail,
// |thumbnail_data| will be empty. If the image area is larger than
// |thumbnail_min_area_pixels| it will be downscaled to fit within
// |thumbnail_max_size_pixels|.
RequestThumbnailForContextNode(int32 thumbnail_min_area_pixels,
gfx.mojom.Size thumbnail_max_size_pixels,
ImageFormat image_format)
=> (array<uint8> thumbnail_data, gfx.mojom.Size original_size);
};