aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-persist.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-10-28 00:39:50 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-10-28 00:39:50 +0800
commit03518bcc5c5aa9a9149315e932f84a0aee2d44ce (patch)
treeee8ca665c481ecfa6c3e59a68a3abf59e4e91523 /embed/mozilla/mozilla-embed-persist.cpp
parent971cc4759cceb6a5842bf4d2016eb5c8e71896a8 (diff)
downloadgsoc2013-epiphany-03518bcc5c5aa9a9149315e932f84a0aee2d44ce.tar
gsoc2013-epiphany-03518bcc5c5aa9a9149315e932f84a0aee2d44ce.tar.gz
gsoc2013-epiphany-03518bcc5c5aa9a9149315e932f84a0aee2d44ce.tar.bz2
gsoc2013-epiphany-03518bcc5c5aa9a9149315e932f84a0aee2d44ce.tar.lz
gsoc2013-epiphany-03518bcc5c5aa9a9149315e932f84a0aee2d44ce.tar.xz
gsoc2013-epiphany-03518bcc5c5aa9a9149315e932f84a0aee2d44ce.tar.zst
gsoc2013-epiphany-03518bcc5c5aa9a9149315e932f84a0aee2d44ce.zip
Solving the wrapper mess Episode 3. Rename to EphyBrowser and add sanity
2003-10-27 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphyBrowser.h: * embed/mozilla/EphyWrapper.cpp: * embed/mozilla/EphyWrapper.h: * embed/mozilla/EventContext.cpp: * embed/mozilla/EventContext.h: * embed/mozilla/Makefile.am: * embed/mozilla/mozilla-embed-persist.cpp: * embed/mozilla/mozilla-embed.cpp: * embed/mozilla/mozilla-embed.h: Solving the wrapper mess Episode 3. Rename to EphyBrowser and add sanity checks. GtkMozEmbed initialize the browser on realize, that means until that we shouldnt use most of the EphyBrowser methods. I'm quite sure there are not such cases in current implementation, otherwise we would have had problems also before. Though better avoid problems in the future.
Diffstat (limited to 'embed/mozilla/mozilla-embed-persist.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp
index 3aef38c89..f08d8648e 100644
--- a/embed/mozilla/mozilla-embed-persist.cpp
+++ b/embed/mozilla/mozilla-embed-persist.cpp
@@ -24,7 +24,7 @@
#include "mozilla-embed-persist.h"
#include "mozilla-embed.h"
-#include "EphyWrapper.h"
+#include "EphyBrowser.h"
#include "EphyHeaderSniffer.h"
#include "MozDownload.h"
@@ -172,15 +172,15 @@ impl_save (EphyEmbedPersist *persist)
g_return_val_if_fail (filename != NULL, G_FAILED);
- EphyWrapper *wrapper = NULL;
+ EphyBrowser *browser = NULL;
if (embed)
{
- wrapper = (EphyWrapper *) mozilla_embed_get_ephy_wrapper (MOZILLA_EMBED(embed));
- g_return_val_if_fail (wrapper != NULL, G_FAILED);
+ browser = (EphyBrowser *) mozilla_embed_get_ephy_browser (MOZILLA_EMBED(embed));
+ g_return_val_if_fail (browser != NULL, G_FAILED);
}
- /* we must have one of uri or wrapper */
- g_assert (wrapper != NULL || uri != NULL);
+ /* we must have one of uri or browser */
+ g_assert (browser != NULL || uri != NULL);
/* Get a temp filename to save to */
nsCOMPtr<nsIProperties> dirService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
@@ -204,7 +204,7 @@ impl_save (EphyEmbedPersist *persist)
}
else
{
- rv = wrapper->GetDocumentUrl (sURI);
+ rv = browser->GetDocumentUrl (sURI);
if (NS_FAILED(rv)) return G_FAILED;
}
rv = NS_NewURI(getter_AddRefs(inURI), sURI);
@@ -212,11 +212,11 @@ impl_save (EphyEmbedPersist *persist)
/* Get post data */
nsCOMPtr<nsIInputStream> postData;
- if (wrapper)
+ if (browser)
{
PRInt32 sindex;
- nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(wrapper->mWebBrowser));
+ nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(browser->mWebBrowser));
nsCOMPtr<nsISHistory> sessionHistory;
webNav->GetSessionHistory(getter_AddRefs(sessionHistory));
nsCOMPtr<nsIHistoryEntry> entry;
@@ -235,11 +235,11 @@ impl_save (EphyEmbedPersist *persist)
{
if (flags & EMBED_PERSIST_MAINDOC)
{
- rv = wrapper->GetDocument (getter_AddRefs(DOMDocument));
+ rv = browser->GetDocument (getter_AddRefs(DOMDocument));
}
else
{
- rv = wrapper->GetTargetDocument (getter_AddRefs(DOMDocument));
+ rv = browser->GetTargetDocument (getter_AddRefs(DOMDocument));
}
if (NS_FAILED(rv) || !DOMDocument) return G_FAILED;
}