2014-08-27 06:28:03 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2016-09-05 02:17:00 +03:00
|
|
|
interface nsIArray;
|
2016-08-31 15:56:17 +03:00
|
|
|
interface nsIDOMEventTarget;
|
2014-08-27 06:28:03 +04:00
|
|
|
interface nsIPresentationDevice;
|
2016-10-04 09:27:05 +03:00
|
|
|
interface nsIPrincipal;
|
2014-08-27 06:28:03 +04:00
|
|
|
|
|
|
|
%{C++
|
|
|
|
#define PRESENTATION_DEVICE_PROMPT_CONTRACTID "@mozilla.org/presentation-device/prompt;1"
|
|
|
|
%}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The information and callbacks for device selection
|
|
|
|
*/
|
|
|
|
[scriptable, uuid(b2aa7f6a-9448-446a-bba4-9c29638b0ed4)]
|
|
|
|
interface nsIPresentationDeviceRequest : nsISupports
|
|
|
|
{
|
|
|
|
// The origin which initiate the request.
|
|
|
|
readonly attribute DOMString origin;
|
|
|
|
|
2016-09-05 02:17:00 +03:00
|
|
|
// The array of candidate URLs.
|
|
|
|
readonly attribute nsIArray requestURLs;
|
2014-08-27 06:28:03 +04:00
|
|
|
|
2016-08-31 15:56:17 +03:00
|
|
|
// The XUL browser element that the request was originated in.
|
|
|
|
readonly attribute nsIDOMEventTarget chromeEventHandler;
|
|
|
|
|
2016-10-04 09:27:05 +03:00
|
|
|
// The principal of the request.
|
|
|
|
readonly attribute nsIPrincipal principal;
|
|
|
|
|
2014-08-27 06:28:03 +04:00
|
|
|
/*
|
|
|
|
* Callback after selecting a device
|
|
|
|
* @param device The selected device.
|
|
|
|
*/
|
|
|
|
void select(in nsIPresentationDevice device);
|
|
|
|
|
|
|
|
/*
|
2016-08-09 04:58:14 +03:00
|
|
|
* Callback after selection failed or canceled by user.
|
|
|
|
* @param reason The error cause for canceling this request.
|
2014-08-27 06:28:03 +04:00
|
|
|
*/
|
2016-08-09 04:58:14 +03:00
|
|
|
void cancel(in nsresult reason);
|
2014-08-27 06:28:03 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* UI prompt for device selection.
|
|
|
|
*/
|
|
|
|
[scriptable, uuid(ac1a7e44-de86-454f-a9f1-276de2539831)]
|
|
|
|
interface nsIPresentationDevicePrompt : nsISupports
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Request a device selection.
|
|
|
|
* @param request The information and callbacks of this selection request.
|
|
|
|
*/
|
|
|
|
void promptDeviceSelection(in nsIPresentationDeviceRequest request);
|
|
|
|
};
|