This checkin enables the mozilla side of mouse and key listener

behavior.  Next step is to enable the java side in test-first design
fashion.

A webclient/src_moz/EmbedEventListener.cpp
A webclient/src_moz/EmbedEventListener.h

- carried over directly from GtkMozEmbed, minus GTK code.

M webclient/src_moz/EmbedProgress.cpp

- call to NativeBrowserControl::ContentStateChange() to hook up listeners.

M webclient/src_moz/Makefile.in

- add new EmbedEventListener.cpp file

M webclient/src_moz/NativeBrowserControl.cpp
M webclient/src_moz/NativeBrowserControl.h

- new methods for hooking up listeners.


git-svn-id: svn://10.0.0.236/trunk@164236 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2004-10-23 05:26:08 +00:00
parent e708512bc7
commit ad2a4c6182
6 changed files with 521 additions and 1 deletions

View File

@@ -42,7 +42,10 @@
class EmbedProgress;
class EmbedWindow;
class EmbedEventListener;
class NativeWrapperFactory;
class nsPIDOMWindow;
/**
* <p>Native analog to BrowserControl. Hosts per-window things. Maps
@@ -77,6 +80,22 @@ public:
jobject QueryInterfaceJava(WEBCLIENT_INTERFACES interface);
// This is an upcall that will come from the progress listener
// whenever there is a content state change. We need this so we can
// attach event listeners.
void ContentStateChange (void);
private:
void GetListener (void);
void AttachListeners(void);
void DetachListeners(void);
// this will get the PIDOMWindow for this widget
nsresult GetPIDOMWindow (nsPIDOMWindow **aPIWin);
public:
//
// Relationship ivars
@@ -91,10 +110,15 @@ public:
nsCOMPtr<nsIWebNavigation> mNavigation;
nsCOMPtr<nsISHistory> mSessionHistory;
// our event receiver
nsCOMPtr<nsIDOMEventReceiver> mEventReceiver;
EmbedWindow * mWindow;
nsCOMPtr<nsISupports> mWindowGuard;
EmbedProgress * mProgress;
nsCOMPtr<nsISupports> mProgressGuard;
EmbedEventListener *mEventListener;
nsCOMPtr<nsISupports> mEventListenerGuard;
ShareInitContext mShareContext;
// chrome mask
@@ -105,6 +129,8 @@ public:
PRBool mChromeLoaded;
// has someone called Destroy() on us?
PRBool mIsDestroyed;
// is the chrome listener attached yet?
PRBool mListenersAttached;
jobject mJavaBrowserControl;