[epiphany/history-rewrite-second: 11/26] Add a EphyBrowseHistory instance to EphyEmbedShell



commit 27cae5cf66677addf99a09d83a5178bc85152b23
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Fri Aug 26 14:25:39 2011 +0300

    Add a EphyBrowseHistory instance to EphyEmbedShell

 embed/ephy-embed-shell.c |   27 +++++++++++++++++++++++++++
 embed/ephy-embed-shell.h |    2 ++
 2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index f0332b2..63fe5c1 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -37,6 +37,7 @@
 #include "ephy-favicon-cache.h"
 #include "ephy-file-helpers.h"
 #include "ephy-history.h"
+#include "ephy-browse-history.h"
 
 #include "ephy-print-utils.h"
 
@@ -52,6 +53,7 @@
 struct _EphyEmbedShellPrivate
 {
 	EphyHistory *global_history;
+	EphyBrowseHistory *global_browse_history;
 	GList *downloads;
 	EphyFaviconCache *favicon_cache;
 	EphyEmbedSingle *embed_single;
@@ -143,6 +145,12 @@ ephy_embed_shell_finalize (GObject *object)
 		g_object_unref (shell->priv->global_history);
 	}
 
+	if (shell->priv->global_browse_history)
+	{
+		LOG ("Unref browse history");
+		g_object_unref (shell->priv->global_browse_history);
+	}
+
 	if (shell->priv->embed_single)
 	{
 		LOG ("Unref embed single");
@@ -199,6 +207,25 @@ ephy_embed_shell_get_global_history (EphyEmbedShell *shell)
 	return G_OBJECT (shell->priv->global_history);
 }
 
+/**
+ * ephy_embed_shell_get_global_browse_history:
+ * @shell: the #EphyEmbedShell
+ *
+ * Return value: (transfer none):
+ **/
+GObject *
+ephy_embed_shell_get_global_browse_history (EphyEmbedShell *shell)
+{
+	g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+
+	if (shell->priv->global_browse_history == NULL)
+	{
+		shell->priv->global_browse_history = ephy_browse_history_new ();
+	}
+
+	return G_OBJECT (shell->priv->global_browse_history);
+}
+
 static GObject *
 impl_get_embed_single (EphyEmbedShell *shell)
 {
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index fab9dd4..a31d290 100644
--- a/embed/ephy-embed-shell.h
+++ b/embed/ephy-embed-shell.h
@@ -83,6 +83,8 @@ GObject		  *ephy_embed_shell_get_favicon_cache	(EphyEmbedShell *shell);
 
 GObject		  *ephy_embed_shell_get_global_history	(EphyEmbedShell *shell);
 
+GObject		  *ephy_embed_shell_get_global_browse_history (EphyEmbedShell *shell);
+
 GObject		  *ephy_embed_shell_get_encodings	(EphyEmbedShell *shell);
 
 GObject		  *ephy_embed_shell_get_embed_single	(EphyEmbedShell *shell);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]