chromium/chromeos/crosapi/mojom/url_handler.mojom

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module crosapi.mojom;

import "url/mojom/url.mojom";

// An interface for exposing Ash's URL handling capabilities. Used to load
// system UI with a given chrome:// URL, for example.
[Stable, Uuid="d909224b-700b-4fe3-b24a-f804e4329ab0"]
interface UrlHandler {
  // Open the given URL. May be ignored if Ash does not know how to handle
  // the given URL.
  OpenUrl@0(url.mojom.Url url);

  // Return the name of a handler for the external URL. Added in M120.
  [MinVersion=1]
  GetExternalHandler@1(url.mojom.Url url) => (string? name);

  // Open the external URL using platform_util::OpenExternal(). Added in M120.
  [MinVersion=1]
  OpenExternal@2(url.mojom.Url url);
};