diff options
Diffstat (limited to 'chromium/chrome/services/util_win')
3 files changed, 34 insertions, 2 deletions
diff --git a/chromium/chrome/services/util_win/BUILD.gn b/chromium/chrome/services/util_win/BUILD.gn index 265c4609a0e..141967acdb5 100644 --- a/chromium/chrome/services/util_win/BUILD.gn +++ b/chromium/chrome/services/util_win/BUILD.gn @@ -10,6 +10,8 @@ source_set("lib") { "av_products.h", "processor_metrics.cc", "processor_metrics.h", + "util_read_icon.cc", + "util_read_icon.h", "util_win_impl.cc", "util_win_impl.h", ] diff --git a/chromium/chrome/services/util_win/public/mojom/BUILD.gn b/chromium/chrome/services/util_win/public/mojom/BUILD.gn index 9a6444c68b4..1f34f8be1d4 100644 --- a/chromium/chrome/services/util_win/public/mojom/BUILD.gn +++ b/chromium/chrome/services/util_win/public/mojom/BUILD.gn @@ -5,7 +5,13 @@ import("//mojo/public/tools/bindings/mojom.gni") mojom("mojom") { - sources = [ "util_win.mojom" ] + sources = [ + "util_read_icon.mojom", + "util_win.mojom", + ] - public_deps = [ "//mojo/public/mojom/base" ] + public_deps = [ + "//mojo/public/mojom/base", + "//ui/gfx/image/mojom", + ] } diff --git a/chromium/chrome/services/util_win/public/mojom/util_read_icon.mojom b/chromium/chrome/services/util_win/public/mojom/util_read_icon.mojom new file mode 100644 index 00000000000..22ca4790280 --- /dev/null +++ b/chromium/chrome/services/util_win/public/mojom/util_read_icon.mojom @@ -0,0 +1,24 @@ +// Copyright 2020 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 "mojo/public/mojom/base/file_path.mojom"; +import "mojo/public/mojom/base/string16.mojom"; +import "ui/gfx/image/mojom/image.mojom"; + +// Correspond to SHGFI_*ICON. +enum IconSize { + kSmall, + kNormal, + kLarge, +}; + +// Utility process interface exposed to the browser process on OS_WIN. Allows +// for sandboxing when reading icons from downloaded files. +interface UtilReadIcon { + // Reads the primary icon from |file| using |size| as a hint. + ReadIcon(mojo_base.mojom.FilePath filename, IconSize size) => + (gfx.mojom.ImageSkia? icon, mojo_base.mojom.String16 group); +}; |