aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-shell.h
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2011-01-19 00:10:11 +0800
committerDiego Escalante Urrelo <descalante@igalia.com>2011-03-08 04:34:52 +0800
commitb9f9bf1a0763492f8bf41b8856bbd1149c5871a9 (patch)
tree92ad55101bff9eabcbc17afdba4a398ce4c4b709 /embed/ephy-embed-shell.h
parent7f7826a163f31bb662247ac4486dca0d01df35f6 (diff)
downloadgsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.tar.gz
gsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.tar.zst
gsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.zip
ephy-download: add the new EphyDownload object
EphyDownload is a wrapper object around WebKitDownload that handles common behavior in downloads: auto-destination, default action for the MIME type. It can be used to wrap a WebKitDownload coming from a WebKitView or to download a url: ephy_download_new_for_uri and ephy_download_new_for_download are provided. Its lifetime is not automagic like EphyEmbedPersist, so you have to unref it when you no longer need it. This new object replaces EphyEmbedPersist and enables us to use a single codepath for downloads in all Epiphany. Bug #618443
Diffstat (limited to 'embed/ephy-embed-shell.h')
-rw-r--r--embed/ephy-embed-shell.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index c58df978c..00087fa9b 100644
--- a/embed/ephy-embed-shell.h
+++ b/embed/ephy-embed-shell.h
@@ -28,6 +28,8 @@
#include <glib-object.h>
#include <gtk/gtk.h>
+#include "ephy-download.h"
+
G_BEGIN_DECLS
#define EPHY_TYPE_EMBED_SHELL (ephy_embed_shell_get_type ())
@@ -55,6 +57,9 @@ struct _EphyEmbedShellClass
{
GObjectClass parent_class;
+ void (* download_added) (EphyEmbedShell *shell, EphyDownload *download);
+ void (* download_removed) (EphyEmbedShell *shell, EphyDownload *download);
+
void (* prepare_close) (EphyEmbedShell *shell);
/*< private >*/
@@ -69,10 +74,6 @@ GObject *ephy_embed_shell_get_favicon_cache (EphyEmbedShell *shell);
GObject *ephy_embed_shell_get_global_history (EphyEmbedShell *shell);
-GObject *ephy_embed_shell_get_downloader_view (EphyEmbedShell *shell);
-
-GObject *ephy_embed_shell_get_downloader_view_nocreate (EphyEmbedShell *shell);
-
GObject *ephy_embed_shell_get_encodings (EphyEmbedShell *shell);
GObject *ephy_embed_shell_get_embed_single (EphyEmbedShell *shell);
@@ -91,6 +92,13 @@ void ephy_embed_shell_set_print_settings (EphyEmbedShell *shell,
GtkPrintSettings *ephy_embed_shell_get_print_settings (EphyEmbedShell *shell);
+GList *ephy_embed_shell_get_downloads (EphyEmbedShell *shell);
+
+void ephy_embed_shell_add_download (EphyEmbedShell *shell,
+ EphyDownload *download);
+void ephy_embed_shell_remove_download (EphyEmbedShell *shell,
+ EphyDownload *download);
+
/* Private API */
void _ephy_embed_shell_track_object (EphyEmbedShell *shell,
GObject *object);