diff options
Diffstat (limited to 'embed/mozilla/MozRegisterComponents.cpp')
-rw-r--r-- | embed/mozilla/MozRegisterComponents.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp index 5cebf9f38..7d8b3223d 100644 --- a/embed/mozilla/MozRegisterComponents.cpp +++ b/embed/mozilla/MozRegisterComponents.cpp @@ -28,6 +28,7 @@ #include "PrintingPromptService.h" #include "MozDownload.h" #include "EphyContentPolicy.h" +#include "EphySidebar.h" #ifdef ENABLE_FILEPICKER #include "FilePicker.h" @@ -55,6 +56,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(GContentHandler) NS_GENERIC_FACTORY_CONSTRUCTOR(MozGlobalHistory) NS_GENERIC_FACTORY_CONSTRUCTOR(GPrintingPromptService) NS_GENERIC_FACTORY_CONSTRUCTOR(EphyContentPolicy) +NS_GENERIC_FACTORY_CONSTRUCTOR(EphySidebar) #ifdef ENABLE_FILEPICKER NS_GENERIC_FACTORY_CONSTRUCTOR(GFilePicker) @@ -86,6 +88,20 @@ RegisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath, return rv; } +static NS_METHOD +RegisterSidebar(nsIComponentManager *aCompMgr, nsIFile *aPath, + const char *registryLocation, const char *componentType, + const nsModuleComponentInfo *info) +{ + nsCOMPtr<nsICategoryManager> cm = + do_GetService(NS_CATEGORYMANAGER_CONTRACTID); + NS_ENSURE_TRUE (cm, NS_ERROR_FAILURE); + + return cm->AddCategoryEntry("JavaScript global property", + "sidebar", NS_SIDEBAR_CONTRACTID, + PR_FALSE, PR_TRUE, nsnull); +} + static const nsModuleComponentInfo sAppComps[] = { { MOZ_DOWNLOAD_CLASSNAME, @@ -152,6 +168,13 @@ static const nsModuleComponentInfo sAppComps[] = { EphyContentPolicyConstructor, RegisterContentPolicy }, + { + EPHY_SIDEBAR_CLASSNAME, + EPHY_SIDEBAR_CID, + NS_SIDEBAR_CONTRACTID, + EphySidebarConstructor, + RegisterSidebar + }, }; |