|
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
|
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 |
|
9 interface nsIDOMWindow; |
|
10 |
|
11 /** |
|
12 * nsIWebContentHandlerRegistrar |
|
13 * |
|
14 * Applications wishing to use web content handlers need to implement this |
|
15 * interface. Typically they will prompt the user to confirm adding an entry |
|
16 * to the local list. |
|
17 * |
|
18 * The component must have the contract id defined below so that nsNavigator |
|
19 * can invoke it. |
|
20 */ |
|
21 |
|
22 [scriptable, uuid(e6a75410-c93e-42bf-84ca-a5c3ec34a2f1)] |
|
23 interface nsIWebContentHandlerRegistrar : nsISupports |
|
24 { |
|
25 /** |
|
26 * See documentation in Navigator.webidl |
|
27 * The additional contentWindow param for both methods represents the dom |
|
28 * content window from which the method has been called. |
|
29 */ |
|
30 void registerContentHandler(in DOMString mimeType, |
|
31 in DOMString uri, |
|
32 in DOMString title, |
|
33 in nsIDOMWindow contentWindow); |
|
34 void registerProtocolHandler(in DOMString protocol, |
|
35 in DOMString uri, |
|
36 in DOMString title, |
|
37 in nsIDOMWindow contentWindow); |
|
38 }; |
|
39 |
|
40 %{ C++ |
|
41 |
|
42 #define NS_WEBCONTENTHANDLERREGISTRAR_CONTRACTID "@mozilla.org/embeddor.implemented/web-content-handler-registrar;1" |
|
43 %} |