aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-shell.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-02 04:08:38 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-02 04:08:38 +0800
commit2a830a379ab4c38b512ee521ccf10ba9cb28da53 (patch)
tree5ab90ff00c245743162cbf9f42951ca12c7cc090 /embed/mozilla/mozilla-embed-shell.cpp
parent66677ed1062c18fd63cb13ea9480343a01058c96 (diff)
downloadgsoc2013-epiphany-2a830a379ab4c38b512ee521ccf10ba9cb28da53.tar
gsoc2013-epiphany-2a830a379ab4c38b512ee521ccf10ba9cb28da53.tar.gz
gsoc2013-epiphany-2a830a379ab4c38b512ee521ccf10ba9cb28da53.tar.bz2
gsoc2013-epiphany-2a830a379ab4c38b512ee521ccf10ba9cb28da53.tar.lz
gsoc2013-epiphany-2a830a379ab4c38b512ee521ccf10ba9cb28da53.tar.xz
gsoc2013-epiphany-2a830a379ab4c38b512ee521ccf10ba9cb28da53.tar.zst
gsoc2013-epiphany-2a830a379ab4c38b512ee521ccf10ba9cb28da53.zip
Cleanup unused code. Reorder build. In new bookmark dialog enter activate
2003-01-01 Marco Pesenti Gritti <marco@it.gnome.org> * embed/Makefile.am: * embed/ephy-embed-favicon.c: (location_changed_cb), (favicon_cb): * embed/ephy-embed-popup.c: (embed_popup_copy_location_cmd), (embed_popup_save_page_as_cmd), (embed_popup_open_frame_cmd): * embed/ephy-embed-shell.c: (ephy_embed_shell_free_cookies): * embed/ephy-embed-shell.h: * embed/ephy-embed-utils.c: (ephy_embed_utils_save): * embed/ephy-embed.c: (ephy_embed_get_location), (ephy_embed_shistory_copy): * embed/ephy-embed.h: * embed/mozilla/EphyWrapper.cpp: * embed/mozilla/EphyWrapper.h: * embed/mozilla/Makefile.am: * embed/mozilla/mozilla-embed-shell.cpp: * embed/mozilla/mozilla-embed.cpp: * lib/Makefile.am: * lib/toolbar/Makefile.am: * lib/widgets/Makefile.am: * src/Makefile.am: * src/bookmarks/ephy-new-bookmark.c: (build_editing_table): * src/ephy-nautilus-view.c: (gnv_embed_location_cb), (gnv_popup_cmd_frame_in_new_window): * src/ephy-shell.c: (build_homepage_url): * src/ephy-tab.c: (ephy_tab_location_cb): * src/pdm-dialog.c: (pdm_dialog_cookie_add): * src/popup-commands.c: (popup_cmd_frame_in_new_tab), (popup_cmd_frame_in_new_window): Cleanup unused code. Reorder build. In new bookmark dialog enter activate ok.
Diffstat (limited to 'embed/mozilla/mozilla-embed-shell.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-shell.cpp112
1 files changed, 2 insertions, 110 deletions
diff --git a/embed/mozilla/mozilla-embed-shell.cpp b/embed/mozilla/mozilla-embed-shell.cpp
index 717985d45..8a66191b9 100644
--- a/embed/mozilla/mozilla-embed-shell.cpp
+++ b/embed/mozilla/mozilla-embed-shell.cpp
@@ -46,9 +46,7 @@
#include <nsIFontList.h>
#include <nsISupportsPrimitives.h>
#include <nsReadableUtils.h>
-#include <nsIPermissionManager.h>
#include <nsICookieManager.h>
-#include <nsIPermission.h>
#include <nsIPasswordManager.h>
#include <nsIPassword.h>
#include <nsICookie.h>
@@ -92,19 +90,6 @@ impl_get_font_list (EphyEmbedShell *shell,
GList **fontList,
char **default_font);
static gresult
-impl_set_permission (EphyEmbedShell *shell,
- const char *url,
- PermissionType type,
- gboolean allow);
-static gresult
-impl_list_permissions (EphyEmbedShell *shell,
- PermissionType type,
- GList **permissions);
-static gresult
-impl_remove_permissions (EphyEmbedShell *shell,
- PermissionType type,
- GList *permissions);
-static gresult
impl_list_cookies (EphyEmbedShell *shell,
GList **cookies);
static gresult
@@ -191,9 +176,6 @@ mozilla_embed_shell_class_init (MozillaEmbedShellClass *klass)
shell_class->get_charset_titles = impl_get_charset_titles;
shell_class->get_charset_groups = impl_get_charset_groups;
shell_class->get_font_list = impl_get_font_list;
- shell_class->set_permission = impl_set_permission;
- shell_class->list_permissions = impl_list_permissions;
- shell_class->remove_permissions = impl_remove_permissions;
shell_class->list_cookies = impl_list_cookies;
shell_class->remove_cookies = impl_remove_cookies;
shell_class->list_passwords = impl_list_passwords;
@@ -533,7 +515,6 @@ impl_get_capabilities (EphyEmbedShell *shell,
JAVA_CONSOLE_CAP |
JS_CONSOLE_CAP |
CHARSETS_CAP |
- PERMISSIONS_CAP |
COOKIES_CAP |
PASSWORDS_CAP);
@@ -777,95 +758,6 @@ impl_get_font_list (EphyEmbedShell *shell,
}
static gresult
-impl_set_permission (EphyEmbedShell *shell,
- const char *url,
- PermissionType type,
- gboolean allow)
-{
- nsresult rv;
- nsCOMPtr<nsIPermissionManager> permissionManager =
- do_CreateInstance (NS_PERMISSIONMANAGER_CONTRACTID);
-
- rv = permissionManager->Add (nsDependentCString(url),
- allow ? PR_TRUE : PR_FALSE, type);
- if (NS_FAILED(rv)) return G_FAILED;
-
- return G_OK;
-}
-
-static gresult
-impl_list_permissions (EphyEmbedShell *shell,
- PermissionType type,
- GList **permissions)
-{
- nsresult result;
-
- *permissions = NULL;
-
- nsCOMPtr<nsIPermissionManager> permissionManager =
- do_CreateInstance (NS_PERMISSIONMANAGER_CONTRACTID);
- nsCOMPtr<nsISimpleEnumerator> permissionEnumerator;
- result = permissionManager->GetEnumerator (getter_AddRefs(permissionEnumerator));
- if (NS_FAILED(result)) return G_FAILED;
-
- PRBool enumResult;
- for (permissionEnumerator->HasMoreElements(&enumResult) ;
- enumResult == PR_TRUE ;
- permissionEnumerator->HasMoreElements(&enumResult))
- {
- nsCOMPtr<nsIPermission> nsPermission;
- result = permissionEnumerator->GetNext (getter_AddRefs(nsPermission));
- if (NS_FAILED(result)) return G_FAILED;
-
- PRInt32 cType;
- nsPermission->GetType (&cType);
- if (cType == type)
- {
- PermissionInfo *b = g_new0 (PermissionInfo, 1);
- gchar *tmp = NULL;
-
- nsPermission->GetHost (&tmp);
- b->domain = g_strdup (tmp);
- nsMemory::Free (tmp);
-
- PRBool cap;
- nsPermission->GetCapability (&cap);
- if (cap == PR_TRUE)
- b->type = g_strdup (_("Allowed"));
- else
- b->type = g_strdup (_("Blocked"));
-
- *permissions = g_list_prepend (*permissions, b);
- }
- }
-
- *permissions = g_list_reverse (*permissions);
-
- return G_OK;
-}
-
-static gresult
-impl_remove_permissions (EphyEmbedShell *shell,
- PermissionType type,
- GList *permissions)
-{
- nsresult result;
- nsCOMPtr<nsIPermissionManager> permissionManager =
- do_CreateInstance (NS_PERMISSIONMANAGER_CONTRACTID);
-
- for (GList *permissions = g_list_first(permissions); permissions != NULL;
- permissions = g_list_next(permissions))
- {
- PermissionInfo *b = (PermissionInfo *)permissions->data;
- result = permissionManager->Remove (nsDependentCString(b->domain),
- type);
- if (NS_FAILED(result)) return G_FAILED;
- };
-
- return G_OK;
-}
-
-static gresult
impl_list_cookies (EphyEmbedShell *shell,
GList **cookies)
{
@@ -894,7 +786,7 @@ impl_list_cookies (EphyEmbedShell *shell,
nsCAutoString transfer;
nsCookie->GetHost (transfer);
- c->base.domain = g_strdup (transfer.get());
+ c->domain = g_strdup (transfer.get());
nsCookie->GetName (transfer);
c->name = g_strdup (transfer.get());
nsCookie->GetValue (transfer);
@@ -938,7 +830,7 @@ impl_remove_cookies (EphyEmbedShell *shell,
{
CookieInfo *c = (CookieInfo *)cl->data;
- result = cookieManager->Remove (NS_LITERAL_CSTRING(c->base.domain),
+ result = cookieManager->Remove (NS_LITERAL_CSTRING(c->domain),
NS_LITERAL_CSTRING(c->name),
NS_LITERAL_CSTRING(c->path),
PR_FALSE);