Author=Ronald Capelli <capelli@us.ibm.com>

r=edburns

This checkin makes Webclient run with IE!

Thanks Ron!

Ed


git-svn-id: svn://10.0.0.236/trunk@141070 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2003-04-12 21:40:35 +00:00
parent 249c42dc3c
commit 01f52fbd60
12 changed files with 677 additions and 278 deletions

View File

@@ -1,5 +1,5 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
@@ -18,9 +18,10 @@
* Rights Reserved.
*
* Contributor(s): Glenn Barney <gbarney@uiuc.edu>
* Ron Capelli <capelli@us.ibm.com>
*/
#include "ie_globals.h"
#include "NavigationImpl.h"
@@ -29,27 +30,24 @@
JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeLoadURL
(JNIEnv *env, jobject obj, jint webShellPtr, jstring urlString)
{
jobject jobj = obj;
jobject jobj = obj;
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
if (initContext == NULL) {
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to nativeLoadURL");
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to nativeLoadURL");
}
const wchar_t * urlStringChars = ::util_GetStringChars(env, urlString);
if (::util_ExceptionOccurred(env)) {
::util_ThrowExceptionToJava(env, "nativeLoadURL Exception: unable to extract Java string");
if (urlStringChars != NULL)
::util_ReleaseStringChars(env, urlString, urlStringChars);
return;
if (::util_ExceptionOccurred(env)) {
::util_ThrowExceptionToJava(env, "nativeLoadURL Exception: unable to extract Java string");
if (urlStringChars != NULL)
::util_ReleaseStringChars(env, urlString, urlStringChars);
return;
}
initContext->wcharURL = _wcsdup((const wchar_t *) urlStringChars);
initContext->wcharURL = _wcsdup((const wchar_t *) urlStringChars);
HRESULT hr = PostMessage(initContext->browserHost, WM_NAVIGATE, 0, 0);
::util_ReleaseStringChars(env, urlString, urlStringChars);
@@ -58,31 +56,54 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl
JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeRefresh
(JNIEnv *env, jobject obj, jint webShellPtr, jlong loadFlags)
{
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
if (initContext == NULL) {
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to nativeRefresh");
return;
}
HRESULT hr = PostMessage(initContext->browserHost, WM_REFRESH,0, 0);
if (initContext == NULL) {
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to nativeRefresh");
return;
}
HRESULT hr = PostMessage(initContext->browserHost, WM_REFRESH,0, 0);
return;
}
JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeStop
(JNIEnv *env, jobject obj, jint webShellPtr)
{
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
if (initContext == NULL) {
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to nativeStop");
return;
}
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
if (initContext == NULL) {
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to nativeStop");
return;
}
HRESULT hr = PostMessage(initContext->browserHost, WM_STOP, 0, 0);
}
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeSetPrompt
(JNIEnv *env, jobject obj, jint webShellPtr, jobject userPrompt)
{
JNIEnv * pEnv = env;
jobject jobj = obj;
WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;
if (initContext == nsnull) {
::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to nativeSetPrompt");
return;
}
if (userPrompt == nsnull) {
::util_ThrowExceptionToJava(env, "Exception: null properties passed to nativeSetPrompt");
return;
}
if (!initContext->initComplete) {
return;
}
// hr = PostMessage(initContext->browserHost, ?SETPROMPT?, 0, 0);
}