diff options
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/EphySingle.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/embed/mozilla/EphySingle.cpp b/embed/mozilla/EphySingle.cpp index e8f2d4ee4..bd7f0a718 100644 --- a/embed/mozilla/EphySingle.cpp +++ b/embed/mozilla/EphySingle.cpp @@ -60,6 +60,7 @@ EphySingle::Init (EphyEmbedSingle *aOwner) rv |= mObserverService->AddObserver (this, "cookie-rejected", PR_FALSE); rv |= mObserverService->AddObserver (this, "perm-changed", PR_FALSE); rv |= mObserverService->AddObserver (this, "network:offline-status-changed", PR_FALSE); + rv |= mObserverService->AddObserver (this, "signonChanged", PR_FALSE); NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); mOwner = aOwner; @@ -79,6 +80,7 @@ EphySingle::Detach () mObserverService->RemoveObserver (this, "cookie-changed"); mObserverService->RemoveObserver (this, "cookie-rejected"); mObserverService->RemoveObserver (this, "perm-changed"); + mObserverService->RemoveObserver (this, "signonChanged"); mObserverService->RemoveObserver (this, "network:offline-status-changed"); } @@ -215,6 +217,14 @@ NS_IMETHODIMP EphySingle::Observe(nsISupports *aSubject, rv = NS_ERROR_FAILURE; } } + else if (strcmp (aTopic, "signonChanged") == 0) + { + /* aData can be PRUnichar[] "signons", "rejects", "nocaptures" and "nopreviews" */ + if (aData[0] == 's') + { + g_signal_emit_by_name (mOwner, "passwords-changed"); + } + } else if (strcmp (aTopic, "network:offline-status-changed") == 0) { /* aData is either (PRUnichar[]) "offline" or "online" */ |