From ea3bca56c53237a212d97251cb46eaeaecb15b31 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 6 Mar 2005 20:53:33 +0000 Subject: [PATCH] Add nsEmbedCID and move the webbrowser contractid to it. Bug 258039, r=darin git-svn-id: svn://10.0.0.236/trunk@170246 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/embedding/base/Makefile.in | 1 + mozilla/embedding/base/nsEmbedCID.h | 61 +++++++++++++++++++ mozilla/embedding/browser/build/Makefile.in | 1 + .../browser/build/nsWebBrowserModule.cpp | 2 + .../embedding/browser/webBrowser/Makefile.in | 1 + .../browser/webBrowser/nsCWebBrowser.idl | 6 +- .../browser/webBrowser/nsWebBrowser.h | 5 ++ 7 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 mozilla/embedding/base/nsEmbedCID.h diff --git a/mozilla/embedding/base/Makefile.in b/mozilla/embedding/base/Makefile.in index e23ddb82d3e..6f799e375fa 100644 --- a/mozilla/embedding/base/Makefile.in +++ b/mozilla/embedding/base/Makefile.in @@ -56,6 +56,7 @@ DEFINES += -DMOZILLA_STRICT_API SDK_HEADERS = \ nsEmbedAPI.h \ + nsEmbedCID.h \ $(NULL) SDK_XPIDLSRCS = \ diff --git a/mozilla/embedding/base/nsEmbedCID.h b/mozilla/embedding/base/nsEmbedCID.h new file mode 100644 index 00000000000..6d9fdb5c9ca --- /dev/null +++ b/mozilla/embedding/base/nsEmbedCID.h @@ -0,0 +1,61 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla.org code. + * + * The Initial Developer of the Original Code is + * Boris Zbarsky . + * Portions created by the Initial Developer are Copyright (C) 2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef NSEMBEDCID_H +#define NSEMBEDCID_H + +/** + * @file + * @brief List of, and documentation for, frozen Gecko embedding contracts. + */ + +/** + * Web Browser ContractID + * The web browser is the basic way to instantiate a Gecko browser. + * + * This contract implements the following interfaces: + * nsIWebBrowser + * nsIWebBrowserSetup + * nsIInterfaceRequestor + * + * @note This contract does not guarantee implementation of any other + * interfaces and does not guarantee ability to get any particular + * interfaces via the nsIInterfaceRequestor implementation. + */ +#define NS_WEBBROWSER_CONTRACTID \ + "@mozilla.org/embedding/browser/nsWebBrowser;1" + +#endif // NSEMBEDCID_H diff --git a/mozilla/embedding/browser/build/Makefile.in b/mozilla/embedding/browser/build/Makefile.in index 0a33a7afbb2..92ae56380c4 100644 --- a/mozilla/embedding/browser/build/Makefile.in +++ b/mozilla/embedding/browser/build/Makefile.in @@ -66,6 +66,7 @@ REQUIRES = xpcom \ shistory \ windowwatcher \ webbrowserpersist \ + embed_base \ $(NULL) ifeq (,$(filter-out WINCE WINNT,$(OS_ARCH))) diff --git a/mozilla/embedding/browser/build/nsWebBrowserModule.cpp b/mozilla/embedding/browser/build/nsWebBrowserModule.cpp index 560f14a957e..aa7799d7dfb 100644 --- a/mozilla/embedding/browser/build/nsWebBrowserModule.cpp +++ b/mozilla/embedding/browser/build/nsWebBrowserModule.cpp @@ -43,6 +43,8 @@ #include "nsICategoryManager.h" #include "nsXPIDLString.h" +#include "nsEmbedCID.h" + #include "nsWebBrowser.h" #include "nsCommandHandler.h" #include "nsWebBrowserContentPolicy.h" diff --git a/mozilla/embedding/browser/webBrowser/Makefile.in b/mozilla/embedding/browser/webBrowser/Makefile.in index 0dd0c692afb..3871b9b7965 100644 --- a/mozilla/embedding/browser/webBrowser/Makefile.in +++ b/mozilla/embedding/browser/webBrowser/Makefile.in @@ -67,6 +67,7 @@ REQUIRES = xpcom \ unicharutil \ imglib2 \ locale \ + embed_base \ $(NULL) ifdef MOZ_PHOENIX diff --git a/mozilla/embedding/browser/webBrowser/nsCWebBrowser.idl b/mozilla/embedding/browser/webBrowser/nsCWebBrowser.idl index dd10e42f08f..e425504cb2f 100644 --- a/mozilla/embedding/browser/webBrowser/nsCWebBrowser.idl +++ b/mozilla/embedding/browser/webBrowser/nsCWebBrowser.idl @@ -63,9 +63,5 @@ nsIInterfaceRequestor */ %{ C++ -// {F1EAC761-87E9-11d3-AF80-00A024FFC08C} - -#define NS_WEBBROWSER_CID \ -{ 0xf1eac761, 0x87e9, 0x11d3, { 0xaf, 0x80, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c } } -#define NS_WEBBROWSER_CONTRACTID \ -"@mozilla.org/embedding/browser/nsWebBrowser;1" +#include "nsEmbedCID.h" %} diff --git a/mozilla/embedding/browser/webBrowser/nsWebBrowser.h b/mozilla/embedding/browser/webBrowser/nsWebBrowser.h index 05f9f351670..2ccd3852a91 100644 --- a/mozilla/embedding/browser/webBrowser/nsWebBrowser.h +++ b/mozilla/embedding/browser/webBrowser/nsWebBrowser.h @@ -99,6 +99,11 @@ public: nsIID mID; }; +// {F1EAC761-87E9-11d3-AF80-00A024FFC08C} - +#define NS_WEBBROWSER_CID \ +{0xf1eac761, 0x87e9, 0x11d3, { 0xaf, 0x80, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }} + + class nsWebBrowser : public nsIWebBrowser, public nsIWebNavigation, public nsIWebBrowserSetup,