1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 : *
3 : * ***** BEGIN LICENSE BLOCK *****
4 : * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 : *
6 : * The contents of this file are subject to the Mozilla Public License Version
7 : * 1.1 (the "License"); you may not use this file except in compliance with
8 : * the License. You may obtain a copy of the License at
9 : * http://www.mozilla.org/MPL/
10 : *
11 : * Software distributed under the License is distributed on an "AS IS" basis,
12 : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 : * for the specific language governing rights and limitations under the
14 : * License.
15 : *
16 : * The Original Code is the Mozilla browser.
17 : *
18 : * The Initial Developer of the Original Code is
19 : * Netscape Communications, Inc.
20 : * Portions created by the Initial Developer are Copyright (C) 1999
21 : * the Initial Developer. All Rights Reserved.
22 : *
23 : * Contributor(s):
24 : * Travis Bogard <travis@netscape.com>
25 : *
26 : * Alternatively, the contents of this file may be used under the terms of
27 : * either the GNU General Public License Version 2 or later (the "GPL"), or
28 : * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 : * in which case the provisions of the GPL or the LGPL are applicable instead
30 : * of those above. If you wish to allow use of your version of this file only
31 : * under the terms of either the GPL or the LGPL, and not to allow others to
32 : * use your version of this file under the terms of the MPL, indicate your
33 : * decision by deleting the provisions above and replace them with the notice
34 : * and other provisions required by the GPL or the LGPL. If you do not delete
35 : * the provisions above, a recipient may use your version of this file under
36 : * the terms of any one of the MPL, the GPL or the LGPL.
37 : *
38 : * ***** END LICENSE BLOCK ***** */
39 :
40 : #include "mozilla/ModuleUtils.h"
41 : #include "nsIServiceManager.h"
42 : #include "nsXPIDLString.h"
43 :
44 : #include "nsEmbedCID.h"
45 :
46 : #include "nsWebBrowser.h"
47 : #include "nsCommandHandler.h"
48 : #include "nsWebBrowserContentPolicy.h"
49 :
50 : // Factory Constructors
51 :
52 0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowser)
53 6 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserContentPolicy)
54 0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandHandler)
55 :
56 : NS_DEFINE_NAMED_CID(NS_WEBBROWSER_CID);
57 : NS_DEFINE_NAMED_CID(NS_COMMANDHANDLER_CID);
58 : NS_DEFINE_NAMED_CID(NS_WEBBROWSERCONTENTPOLICY_CID);
59 :
60 : static const mozilla::Module::CIDEntry kWebBrowserCIDs[] = {
61 : { &kNS_WEBBROWSER_CID, false, NULL, nsWebBrowserConstructor },
62 : { &kNS_COMMANDHANDLER_CID, false, NULL, nsCommandHandlerConstructor },
63 : { &kNS_WEBBROWSERCONTENTPOLICY_CID, false, NULL, nsWebBrowserContentPolicyConstructor },
64 : { NULL }
65 : };
66 :
67 : static const mozilla::Module::ContractIDEntry kWebBrowserContracts[] = {
68 : { NS_WEBBROWSER_CONTRACTID, &kNS_WEBBROWSER_CID },
69 : { NS_COMMANDHANDLER_CONTRACTID, &kNS_COMMANDHANDLER_CID },
70 : { NS_WEBBROWSERCONTENTPOLICY_CONTRACTID, &kNS_WEBBROWSERCONTENTPOLICY_CID },
71 : { NULL }
72 : };
73 :
74 : static const mozilla::Module::CategoryEntry kWebBrowserCategories[] = {
75 : { "content-policy", NS_WEBBROWSERCONTENTPOLICY_CONTRACTID, NS_WEBBROWSERCONTENTPOLICY_CONTRACTID },
76 : { NULL }
77 : };
78 :
79 : static const mozilla::Module kWebBrowserModule = {
80 : mozilla::Module::kVersion,
81 : kWebBrowserCIDs,
82 : kWebBrowserContracts,
83 : kWebBrowserCategories
84 : };
85 :
86 : NSMODULE_DEFN(Browser_Embedding_Module) = &kWebBrowserModule;
87 :
88 :
89 :
|