diff options
author | Crispin Flowerday <gnome@flowerday.cx> | 2005-01-02 05:32:57 +0800 |
---|---|---|
committer | Crispin Flowerday <crispin@src.gnome.org> | 2005-01-02 05:32:57 +0800 |
commit | 8999f2e890891e4286f501d2076716d523c7d169 (patch) | |
tree | fb44fc505779c839c0ee36dbf9d82772f8e470cb /embed/mozilla/MozRegisterComponents.cpp | |
parent | 478e8b73f9a7302f0c30aaa685fc3104b99d7480 (diff) | |
download | gsoc2013-epiphany-8999f2e890891e4286f501d2076716d523c7d169.tar gsoc2013-epiphany-8999f2e890891e4286f501d2076716d523c7d169.tar.gz gsoc2013-epiphany-8999f2e890891e4286f501d2076716d523c7d169.tar.bz2 gsoc2013-epiphany-8999f2e890891e4286f501d2076716d523c7d169.tar.lz gsoc2013-epiphany-8999f2e890891e4286f501d2076716d523c7d169.tar.xz gsoc2013-epiphany-8999f2e890891e4286f501d2076716d523c7d169.tar.zst gsoc2013-epiphany-8999f2e890891e4286f501d2076716d523c7d169.zip |
Add an "add-sidebar" signal on the EphyEmbedSingle interface, it gets
2005-01-01 Crispin Flowerday <gnome@flowerday.cx>
* embed/ephy-embed-single.c: (ephy_embed_single_iface_init):
* embed/ephy-embed-single.h:
* embed/mozilla/EphySidebar.cpp:
* embed/mozilla/EphySidebar.h:
* embed/mozilla/Makefile.am:
* embed/mozilla/MozRegisterComponents.cpp:
Add an "add-sidebar" signal on the EphyEmbedSingle interface,
it gets emitted when a user clicks on a link that wants
to add a url to the sidebar.
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 + }, }; |