diff options
author | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-10-28 00:20:17 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-10-28 00:20:17 +0800 |
commit | 971cc4759cceb6a5842bf4d2016eb5c8e71896a8 (patch) | |
tree | b6ae09fc0bb229a9d3485c473dcdd5842ebb090a /embed/mozilla/EphyWrapper.cpp | |
parent | 0c602edff1de6eaf85746201f94e2b1c4d815da0 (diff) | |
download | gsoc2013-epiphany-971cc4759cceb6a5842bf4d2016eb5c8e71896a8.tar gsoc2013-epiphany-971cc4759cceb6a5842bf4d2016eb5c8e71896a8.tar.gz gsoc2013-epiphany-971cc4759cceb6a5842bf4d2016eb5c8e71896a8.tar.bz2 gsoc2013-epiphany-971cc4759cceb6a5842bf4d2016eb5c8e71896a8.tar.lz gsoc2013-epiphany-971cc4759cceb6a5842bf4d2016eb5c8e71896a8.tar.xz gsoc2013-epiphany-971cc4759cceb6a5842bf4d2016eb5c8e71896a8.tar.zst gsoc2013-epiphany-971cc4759cceb6a5842bf4d2016eb5c8e71896a8.zip |
*** empty log message ***
Diffstat (limited to 'embed/mozilla/EphyWrapper.cpp')
-rw-r--r-- | embed/mozilla/EphyWrapper.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/embed/mozilla/EphyWrapper.cpp b/embed/mozilla/EphyWrapper.cpp index a511d5b98..793a27197 100644 --- a/embed/mozilla/EphyWrapper.cpp +++ b/embed/mozilla/EphyWrapper.cpp @@ -90,21 +90,28 @@ EphyWrapper::~EphyWrapper () nsresult EphyWrapper::Init (GtkMozEmbed *mozembed) { - nsresult rv; + mGtkMozEmbed = mozembed; gtk_moz_embed_get_nsIWebBrowser (mozembed, getter_AddRefs(mWebBrowser)); if (!mWebBrowser) return NS_ERROR_FAILURE; - rv = mWebBrowser->GetContentDOMWindow (getter_AddRefs (mDOMWindow)); - if (NS_FAILED (rv)) return NS_ERROR_FAILURE; + return mWebBrowser->GetContentDOMWindow (getter_AddRefs (mDOMWindow)); +} + +nsresult EphyWrapper::InitDocument () +{ + nsresult rv; mEventListener = new EphyEventListener(); - mEventListener->Init (EPHY_EMBED (mozembed)); - GetListener(); - AttachListeners(); - return NS_OK; + rv = mEventListener->Init (EPHY_EMBED (mGtkMozEmbed)); + if (NS_FAILED (rv)) return NS_ERROR_FAILURE; + + rv = GetListener(); + if (NS_FAILED (rv)) return NS_ERROR_FAILURE; + + return AttachListeners(); } nsresult |