- rename initContext to NativeBrowserControl, at both the native and
java layers.
- Rework NativeEventThread to be usable without having the
browserControl window realized.
- change who owns the NativEventThread to be the BrowserControl, by
proxy through WrapperFactoryImpl. Again, this is with a view toward
using webclient without the browserControl window realized.
A webclient/src_moz/NativeBrowserControl.h
A webclient/src_moz/NativeBrowserControl.cpp
- Centerpiece of native Object hierarchy. Owned by NativeEventThread.
M webclient/build-tests.xml
- reformat
- add new test, currently failing, for Navigation.
M webclient/classes_spec/org/mozilla/webclient/impl/BrowserControlImpl.java
- destroy our nativeBrowserControl.
M webclient/classes_spec/org/mozilla/webclient/impl/WrapperFactory.java
- Added API for obtaining the NativeEventThread for a BrowserControl.
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/BookmarksImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/CurrentPageImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/HistoryImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java
- rename nativeWebShell to nativeBrowserControl
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/ImplObjectNative.java
- rename nativeWebShell to nativeBrowserControl
- add method to get the NativeEventThread for this instance.
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/NativeEventThread.java
- remove dependency on WindowControl
- make this class be the owner of the nativeBrowserControl instance.
- rename nativeWebShell to nativeBrowserControl
- renamed nativeInitialize to nativeStartup
- added nativeShutdown
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WindowControlImpl.java
- remove delete() method.
- no longer owns NativeEventThread
- no longer owns nativeBrowserControl
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java
- Take over NativeEventThread ownership responsibilities from
WindowControlImpl (by proxy for BrowserControl).
M webclient/src_moz/CBrowserContainer.cpp
M webclient/src_moz/CBrowserContainer.h
M webclient/src_moz/CurrentPageActionEvents.cpp
M webclient/src_moz/CurrentPageActionEvents.h
M webclient/src_moz/CurrentPageImpl.cpp
M webclient/src_moz/HistoryActionEvents.cpp
M webclient/src_moz/HistoryActionEvents.h
M webclient/src_moz/HistoryImpl.cpp
M webclient/src_moz/NativeEventThreadActionEvents.cpp
M webclient/src_moz/NativeEventThreadActionEvents.h
M webclient/src_moz/NavigationActionEvents.cpp
M webclient/src_moz/NavigationActionEvents.h
M webclient/src_moz/NavigationImpl.cpp
M webclient/src_moz/PromptActionEvents.cpp
M webclient/src_moz/PromptActionEvents.h
M webclient/src_moz/WindowControlActionEvents.cpp
M webclient/src_moz/WindowControlActionEvents.h
M webclient/src_moz/WindowCreator.cpp
M webclient/src_moz/WindowCreator.h
- rename nativeWebShell to nativeBrowserControl
M webclient/src_moz/Makefile.in
- comment out not yet fixed per-window sources
- add NativeBrowserControl.cpp
M webclient/src_moz/NativeEventThread.cpp
- major refactoring. Much of the work is now being done in
NativeBrowserControl.cpp
M webclient/src_moz/WindowControlImpl.cpp
- remove functionality now located in NativeEventThread and
NativeBrowserControl.
M webclient/src_moz/WrapperFactoryImpl.cpp
- flesh out native{Create,Destroy}BrowserControl.
M webclient/src_moz/ns_globals.h
- remove gActionQueue and gEmbeddedThread. Moved into class
NativeBrowserControl.
M webclient/src_moz/ns_util.cpp
- rename initContext to NativeBrowserControl
- get action queue from NativeBrowserControl
M webclient/src_moz/ns_util.h
- remove WebShellInitContext! It's finally a class now, called
NativeBrowserControl.
M webclient/test/automated/src/classes/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImplTest.java
- added new testcase to show create/deleteBrowserControl works.
git-svn-id: svn://10.0.0.236/trunk@154679 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -41,7 +41,7 @@ JNIEXPORT void JNICALL
|
||||
Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeSetBounds
|
||||
(JNIEnv *env, jobject obj, jint webShellPtr, jint x, jint y, jint w, jint h)
|
||||
{
|
||||
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
|
||||
NativeBrowserControl* initContext = (NativeBrowserControl *) webShellPtr;
|
||||
|
||||
if (initContext == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to nativeSetBounds");
|
||||
@@ -57,87 +57,10 @@ Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeSetBound
|
||||
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeCreateInitContext
|
||||
(JNIEnv *env, jobject obj, jint windowPtr, jint x, jint y,
|
||||
jint width, jint height, jobject aBrowserControlImpl)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
WindowPtr pWindow = (WindowPtr) windowPtr;
|
||||
Rect webRect = pWindow->portRect;
|
||||
// nsIWidget * pWidget = (nsIWidget *) widgetPtr;
|
||||
#elif defined(XP_PC)
|
||||
// elif defined(XP_WIN)
|
||||
HWND parentHWnd = (HWND)windowPtr;
|
||||
#elif defined(XP_UNIX)
|
||||
GtkWidget * parentHWnd = (GtkWidget *) windowPtr;
|
||||
#endif
|
||||
|
||||
if (parentHWnd == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null window handle passed to raptorWebShellCreate");
|
||||
return (jint) 0;
|
||||
}
|
||||
WebShellInitContext* initContext = new WebShellInitContext;
|
||||
|
||||
initContext->initComplete = FALSE;
|
||||
initContext->initFailCode = 0;
|
||||
initContext->parentHWnd = parentHWnd;
|
||||
initContext->webShell = nsnull;
|
||||
initContext->docShell = nsnull;
|
||||
initContext->baseWindow = nsnull;
|
||||
initContext->webNavigation = nsnull;
|
||||
initContext->presShell = nsnull;
|
||||
// initContext->embeddedThread = nsnull;
|
||||
// initContext->actionQueue = nsnull;
|
||||
initContext->env = env;
|
||||
initContext->nativeEventThread = nsnull;
|
||||
initContext->stopThread = FALSE;
|
||||
initContext->x = x;
|
||||
initContext->y = y;
|
||||
initContext->w = width;
|
||||
initContext->h = height;
|
||||
initContext->currentDocument = nsnull;
|
||||
initContext->browserContainer = nsnull;
|
||||
util_InitializeShareInitContext(env, &(initContext->shareContext));
|
||||
|
||||
#ifdef XP_UNIX
|
||||
initContext->gtkWinPtr =
|
||||
(int)::util_GetGTKWinPtrFromCanvas(env, aBrowserControlImpl);
|
||||
#else
|
||||
initContext->gtkWinPtr = nsnull;
|
||||
#endif
|
||||
|
||||
return (jint) initContext;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeDestroyInitContext
|
||||
(JNIEnv *env, jobject obj, jint webShellPtr)
|
||||
{
|
||||
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
|
||||
|
||||
if (initContext == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to nativeDestroyInitContext");
|
||||
return;
|
||||
}
|
||||
wsDeallocateInitContextEvent * actionEvent =
|
||||
new wsDeallocateInitContextEvent(initContext);
|
||||
PLEvent * event = (PLEvent*) *actionEvent;
|
||||
nsresult rv;
|
||||
|
||||
rv = (nsresult) ::util_PostSynchronousEvent(initContext, event);
|
||||
if (NS_FAILED(rv)) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: Can't destroy initContext");
|
||||
return;
|
||||
}
|
||||
// initContext->actionQueue = nsnull;
|
||||
delete initContext;
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeMoveWindowTo
|
||||
(JNIEnv *env, jobject obj, jint webShellPtr, jint x, jint y)
|
||||
{
|
||||
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
|
||||
NativeBrowserControl* initContext = (NativeBrowserControl *) webShellPtr;
|
||||
|
||||
if (initContext == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to raptorWebShellMoveTo");
|
||||
@@ -155,7 +78,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowCon
|
||||
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeRemoveFocus
|
||||
(JNIEnv *env, jobject obj, jint webShellPtr)
|
||||
{
|
||||
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
|
||||
NativeBrowserControl* initContext = (NativeBrowserControl *) webShellPtr;
|
||||
|
||||
if (initContext == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to raptorWebShellRemoveFocus");
|
||||
@@ -173,7 +96,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowCon
|
||||
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeRepaint
|
||||
(JNIEnv *env, jobject obj, jint webShellPtr, jboolean forceRepaint)
|
||||
{
|
||||
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
|
||||
NativeBrowserControl* initContext = (NativeBrowserControl *) webShellPtr;
|
||||
|
||||
if (initContext == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to raptorWebShellRepaint");
|
||||
@@ -193,7 +116,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowCon
|
||||
(JNIEnv *env, jobject obj, jint webShellPtr, jboolean newState)
|
||||
{
|
||||
|
||||
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
|
||||
NativeBrowserControl* initContext = (NativeBrowserControl *) webShellPtr;
|
||||
if (initContext == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to raptorWebShellRepaint");
|
||||
return;
|
||||
@@ -209,7 +132,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowCon
|
||||
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WindowControlImpl_nativeSetFocus
|
||||
(JNIEnv *env, jobject obj, jint webShellPtr)
|
||||
{
|
||||
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
|
||||
NativeBrowserControl* initContext = (NativeBrowserControl *) webShellPtr;
|
||||
|
||||
if (initContext == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to raptorWebShellSetFocus");
|
||||
|
||||
Reference in New Issue
Block a user