1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7#include "nsISupports.idl"
8
9interface nsIURI;
10
11interface mozIDOMWindowProxy;
12
13[scriptable, uuid(1201d357-8417-4926-a694-e6408fbedcf8)]
14interface nsISharePicker : nsISupports
15{
16  /**
17   * Initialize the share picker widget.
18   * @param nsIDOMWindow openerWindow.
19   */
20  void init(in mozIDOMWindowProxy openerWindow);
21
22  /**
23   * Returns the parent window this was initialized with.
24   */
25  readonly attribute mozIDOMWindowProxy openerWindow;
26
27  /**
28   * XPCOM Analog of navigator.share() as per:
29   * https://w3c.github.io/web-share/#share-method
30   */
31  Promise share(in AUTF8String title, in AUTF8String text, in nsIURI url);
32};
33