blob: 74aa2c83cba99c39ca1719e89cdefd3c8ae42694 [file] [log] [blame]
// Copyright 2018 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 ash.mojom;
import "mojo/public/mojom/base/unguessable_token.mojom";
import "ui/gfx/image/mojo/image.mojom";
interface ClientImageRegistry {
// Tells Ash about an image which the client will later refer to by |token|.
// This allows clients such as Chrome to repeatedly use or reference the same
// image without serializing/deserializing every time. If the token already
// references another icon, this will replace it.
RegisterImage(mojo_base.mojom.UnguessableToken token,
gfx.mojom.ImageSkia icon);
// Tells Ash that the client which registered the given token and its
// associated image will no longer use the image. This should be called at
// most once for every unique registered token. In the future, if Ash handles
// client restart, this will need to be called automatically for crashed
// clients.
ForgetImage(mojo_base.mojom.UnguessableToken token);
};