This checkin enables Navigation.stop() to work.
I'm working towards getting equivalent functionality to <https://jdic.dev.java.net/nonav/documentation/javadoc/jdic/org/jdesktop/jdic/browser/WebBrowser.html> working by JavaOne SF 2004. At this point, all that remains are refresh(), back(), forward(), and post(). All but post() are trivial. M classes_spec/org/mozilla/webclient/Navigation2.java - remove "blocking" methods since we don't need them now that we have DocumentLoadListener working again. M classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java - remove "blocking" methods since we don't need them now that we have DocumentLoadListener working again. - implement stop(). M classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java - throw IllegalStateException if you try to get a BrowserControl instance after appTerminate() has been called. - throw IllegalStateException if appTerminate() is called more than once. M src_moz/NavigationImpl.cpp - call through to stop M test/automated/src/classes/org/mozilla/webclient/NavigationTest.java - test first test for stop. git-svn-id: svn://10.0.0.236/trunk@157964 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -44,8 +44,6 @@
|
||||
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_NavigationImpl_nativeLoadURL
|
||||
(JNIEnv *env, jobject obj, jint nativeBCPtr, jstring urlString)
|
||||
{
|
||||
jobject jobj = obj;
|
||||
|
||||
#if DEBUG_RAPTOR_CANVAS
|
||||
const char * urlChars = (char *) ::util_GetStringUTFChars(env,
|
||||
urlString);
|
||||
@@ -299,27 +297,27 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_Navigatio
|
||||
return;
|
||||
}
|
||||
|
||||
*********************/
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_NavigationImpl_nativeStop
|
||||
(JNIEnv *env, jobject obj, jint nativeBCPtr)
|
||||
{
|
||||
JNIEnv * pEnv = env;
|
||||
jobject jobj = obj;
|
||||
|
||||
NativeBrowserControl* nativeBrowserControl = (NativeBrowserControl *) nativeBCPtr;
|
||||
|
||||
if (nativeBrowserControl == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null nativeBCPtr passed to raptorWebShellStop");
|
||||
return;
|
||||
}
|
||||
|
||||
if (nativeBrowserControl->initComplete) {
|
||||
wsStopEvent * actionEvent = new wsStopEvent(nativeBrowserControl->webNavigation);
|
||||
PLEvent * event = (PLEvent*) *actionEvent;
|
||||
|
||||
::util_PostEvent(nativeBrowserControl, event);
|
||||
}
|
||||
|
||||
if (nativeBrowserControl == nsnull) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: null passed to nativeLoadURL");
|
||||
return;
|
||||
}
|
||||
|
||||
nsresult rv =
|
||||
nativeBrowserControl->mNavigation->Stop(nsIWebNavigation::STOP_ALL);
|
||||
if (NS_FAILED(rv)) {
|
||||
::util_ThrowExceptionToJava(env, "Exception: Can't stop load");
|
||||
}
|
||||
}
|
||||
|
||||
/***********************
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_mozilla_webclient_impl_wrapper_1native_NavigationImpl_nativeSetPrompt
|
||||
(JNIEnv *env, jobject obj, jint nativeBCPtr, jobject userPrompt)
|
||||
|
||||
Reference in New Issue
Block a user