Remove debugging printfs.
Have browser window visible, but no content pane. git-svn-id: svn://10.0.0.236/trunk@173508 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a61b59332d
commit
0a89a34a27
@ -132,6 +132,7 @@ NativeBrowserControl::Realize(jobject javaBrowserControl,
|
|||||||
void *parentWinPtr, PRBool *aAlreadyRealized,
|
void *parentWinPtr, PRBool *aAlreadyRealized,
|
||||||
PRUint32 width, PRUint32 height)
|
PRUint32 width, PRUint32 height)
|
||||||
{
|
{
|
||||||
|
nsresult rv = NS_OK;
|
||||||
mJavaBrowserControl = javaBrowserControl;
|
mJavaBrowserControl = javaBrowserControl;
|
||||||
|
|
||||||
// Create our session history object and tell the navigation object
|
// Create our session history object and tell the navigation object
|
||||||
@ -153,7 +154,11 @@ NativeBrowserControl::Realize(jobject javaBrowserControl,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// create the window
|
// create the window
|
||||||
mWindow->CreateWindow_(width, height);
|
rv = mWindow->CreateWindow_(width, height);
|
||||||
|
if (NS_FAILED(rv)) {
|
||||||
|
JNIEnv *env = (JNIEnv *) JNU_GetEnv(gVm, JNI_VERSION);
|
||||||
|
::util_ThrowExceptionToJava(env, "Can't CreateWindow");
|
||||||
|
}
|
||||||
|
|
||||||
// bind the progress listener to the browser object
|
// bind the progress listener to the browser object
|
||||||
nsCOMPtr<nsISupportsWeakReference> supportsWeak;
|
nsCOMPtr<nsISupportsWeakReference> supportsWeak;
|
||||||
@ -311,6 +316,7 @@ jobject NativeBrowserControl::QueryInterfaceJava(WEBCLIENT_INTERFACES interface)
|
|||||||
{
|
{
|
||||||
PR_ASSERT(nsnull != mJavaBrowserControl);
|
PR_ASSERT(nsnull != mJavaBrowserControl);
|
||||||
JNIEnv *env = (JNIEnv *) JNU_GetEnv(gVm, JNI_VERSION);
|
JNIEnv *env = (JNIEnv *) JNU_GetEnv(gVm, JNI_VERSION);
|
||||||
|
env->ExceptionClear();
|
||||||
|
|
||||||
jobject result = nsnull;
|
jobject result = nsnull;
|
||||||
jstring interfaceJStr = ::util_NewStringUTF(env,
|
jstring interfaceJStr = ::util_NewStringUTF(env,
|
||||||
@ -319,6 +325,7 @@ jobject NativeBrowserControl::QueryInterfaceJava(WEBCLIENT_INTERFACES interface)
|
|||||||
jclass clazz = env->GetObjectClass(mJavaBrowserControl);
|
jclass clazz = env->GetObjectClass(mJavaBrowserControl);
|
||||||
jmethodID mid = env->GetMethodID(clazz, "queryInterface",
|
jmethodID mid = env->GetMethodID(clazz, "queryInterface",
|
||||||
"(Ljava/lang/String;)Ljava/lang/Object;");
|
"(Ljava/lang/String;)Ljava/lang/Object;");
|
||||||
|
|
||||||
if (nsnull != mid) {
|
if (nsnull != mid) {
|
||||||
result = env->CallObjectMethod(mJavaBrowserControl, mid,
|
result = env->CallObjectMethod(mJavaBrowserControl, mid,
|
||||||
interfaceJStr);
|
interfaceJStr);
|
||||||
|
|||||||
@ -36,7 +36,6 @@
|
|||||||
#include "jni_util.h" //for throwing Exceptions to Java
|
#include "jni_util.h" //for throwing Exceptions to Java
|
||||||
|
|
||||||
jint CocoaBrowserControlCanvas::cocoaGetHandleToPeer(JNIEnv *env, jobject canvas) {
|
jint CocoaBrowserControlCanvas::cocoaGetHandleToPeer(JNIEnv *env, jobject canvas) {
|
||||||
printf("debug: edburns: in CocoaBrowserControlCanvas::nativeGetHandleToPeer\n");
|
|
||||||
JAWT awt;
|
JAWT awt;
|
||||||
JAWT_DrawingSurface* ds = NULL;
|
JAWT_DrawingSurface* ds = NULL;
|
||||||
JAWT_DrawingSurfaceInfo* dsi = NULL;
|
JAWT_DrawingSurfaceInfo* dsi = NULL;
|
||||||
@ -47,40 +46,24 @@ jint CocoaBrowserControlCanvas::cocoaGetHandleToPeer(JNIEnv *env, jobject canvas
|
|||||||
NSWindow *win = NULL;
|
NSWindow *win = NULL;
|
||||||
void * windowPtr = NULL;
|
void * windowPtr = NULL;
|
||||||
|
|
||||||
printf("debug: edburns: about to get AWT\n");
|
|
||||||
// get the AWT
|
// get the AWT
|
||||||
awt.version = JAWT_VERSION_1_4;
|
awt.version = JAWT_VERSION_1_4;
|
||||||
|
|
||||||
printf("debug: edburns: set awt version: ok\n");
|
|
||||||
|
|
||||||
result = JAWT_GetAWT(env, &awt);
|
result = JAWT_GetAWT(env, &awt);
|
||||||
|
|
||||||
printf("debug: edburns: got awt: result: %d\n",result);
|
|
||||||
printf("debug: edburns: additional printf\n");
|
|
||||||
printf("debug: edburns: got AWT\n");
|
|
||||||
printf("debug: edburns: about to get drawing surface\n");
|
|
||||||
fflush(stdout);
|
|
||||||
// Get the drawing surface. This can be safely cached.
|
// Get the drawing surface. This can be safely cached.
|
||||||
// Anything below the DS (DSI, contexts, etc)
|
// Anything below the DS (DSI, contexts, etc)
|
||||||
// can possibly change/go away and should not be cached.
|
// can possibly change/go away and should not be cached.
|
||||||
ds = awt.GetDrawingSurface(env, canvas);
|
ds = awt.GetDrawingSurface(env, canvas);
|
||||||
|
|
||||||
printf("debug: edburns: got drawing surface: %d\n", ds);
|
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
if (NULL == ds) {
|
if (NULL == ds) {
|
||||||
util_ThrowExceptionToJava(env, "CocoaBrowserControlCanvas: can't get drawing surface");
|
util_ThrowExceptionToJava(env, "CocoaBrowserControlCanvas: can't get drawing surface");
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("debug: edburns: about to lock drawing surface: %d\n", ds);
|
|
||||||
fflush(stdout);
|
|
||||||
// Lock the drawing surface
|
// Lock the drawing surface
|
||||||
// You must lock EACH TIME before drawing
|
// You must lock EACH TIME before drawing
|
||||||
lock = ds->Lock(ds);
|
lock = ds->Lock(ds);
|
||||||
|
|
||||||
printf("debug: edburns: acquired lock: %d\n", lock);
|
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
if ((lock & JAWT_LOCK_ERROR) != 0) {
|
if ((lock & JAWT_LOCK_ERROR) != 0) {
|
||||||
util_ThrowExceptionToJava(env, "CocoaBrowserControlCanvas: can't lock drawing surface");
|
util_ThrowExceptionToJava(env, "CocoaBrowserControlCanvas: can't lock drawing surface");
|
||||||
}
|
}
|
||||||
@ -102,14 +85,8 @@ jint CocoaBrowserControlCanvas::cocoaGetHandleToPeer(JNIEnv *env, jobject canvas
|
|||||||
|
|
||||||
// Get the corresponding peer from the caller canvas
|
// Get the corresponding peer from the caller canvas
|
||||||
view = dsi_mac->cocoaViewRef;
|
view = dsi_mac->cocoaViewRef;
|
||||||
printf("debug: edburns: view: %p\n", view);
|
|
||||||
fflush(stdout);
|
|
||||||
win = [view window];
|
win = [view window];
|
||||||
printf("debug: edburns: win: %p\n", win);
|
|
||||||
fflush(stdout);
|
|
||||||
windowPtr = [win windowRef];
|
windowPtr = [win windowRef];
|
||||||
printf("debug: edburns: windowPtr: %p\n", windowPtr);
|
|
||||||
fflush(stdout);
|
|
||||||
// Free the DrawingSurfaceInfo
|
// Free the DrawingSurfaceInfo
|
||||||
ds->FreeDrawingSurfaceInfo(dsi);
|
ds->FreeDrawingSurfaceInfo(dsi);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,8 +38,6 @@
|
|||||||
*/
|
*/
|
||||||
JNIEXPORT jint JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_CocoaBrowserControlCanvas_getHandleToPeer
|
JNIEXPORT jint JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_CocoaBrowserControlCanvas_getHandleToPeer
|
||||||
(JNIEnv *env, jobject canvas) {
|
(JNIEnv *env, jobject canvas) {
|
||||||
printf("debug: edburns: in CocoaBrowserControlCanvasImpl->nativeGetHandleToPeer\n");
|
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
jint result = -1;
|
jint result = -1;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user