This checkin verifies that loading documents over HTTP works as
expected. M src_moz/Makefile.in - added WindowWatcher to compilation M src_moz/NativeBrowserControl.cpp - turn on our WindowWatcher. Still need to flesh this out, but it seemed to be necessary for http to work. M src_moz/WindowCreator.cpp M src_moz/WindowCreator.h - return to compilation M src_moz/WrapperFactoryImpl.cpp - hack to workaround bug posted to n.p.m.e by me today regarding nsIOService::SetOffline(TRUE) being called. The workaround is to manually call nsIOService::SetOffline(FALSE) *after* the point in time where the "TRUE" call is made. M test/automated/src/classes/org/mozilla/util/THTTPD.java - tweaks to make this suitable for JUnit testing. M test/automated/src/classes/org/mozilla/webclient/NavigationTest.java - all navigation tests work. git-svn-id: svn://10.0.0.236/trunk@158322 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -23,13 +23,13 @@
|
||||
#include "nsIWebBrowserChrome.h"
|
||||
#include "WindowCreator.h"
|
||||
|
||||
int processEventLoop(NativeBrowserControl * initContext);
|
||||
NativeBrowserControl* gNewWindowNativeBCPtr;
|
||||
|
||||
NativeBrowserControl* gNewWindowInitContext;
|
||||
NS_IMPL_ISUPPORTS2(WindowCreator, nsIWindowCreator, nsIWindowCreator2)
|
||||
|
||||
WindowCreator::WindowCreator(NativeBrowserControl *yourInitContext)
|
||||
WindowCreator::WindowCreator(NativeBrowserControl *yourNativeBCPtr)
|
||||
{
|
||||
mInitContext = yourInitContext;
|
||||
mNativeBCPtr = yourNativeBCPtr;
|
||||
mTarget = 0;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,6 @@ WindowCreator::~WindowCreator()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(WindowCreator, nsIWindowCreator)
|
||||
|
||||
NS_IMETHODIMP WindowCreator::AddNewWindowListener(jobject target)
|
||||
{
|
||||
if (! mTarget)
|
||||
@@ -55,24 +53,37 @@ WindowCreator::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||
if (!mTarget)
|
||||
return NS_OK;
|
||||
|
||||
gNewWindowInitContext = nsnull;
|
||||
gNewWindowNativeBCPtr = nsnull;
|
||||
|
||||
/********
|
||||
|
||||
util_SendEventToJava(mInitContext->env,
|
||||
mInitContext->nativeEventThread,
|
||||
util_SendEventToJava(mNativeBCPtr->env,
|
||||
mNativeBCPtr->nativeEventThread,
|
||||
mTarget,
|
||||
NEW_WINDOW_LISTENER_CLASSNAME,
|
||||
chromeFlags,
|
||||
0);
|
||||
|
||||
// check gNewWindowInitContext to see if the initialization had completed
|
||||
while (!gNewWindowInitContext) {
|
||||
processEventLoop(mInitContext);
|
||||
// check gNewWindowNativeBCPtr to see if the initialization had completed
|
||||
while (!gNewWindowNativeBCPtr) {
|
||||
processEventLoop(mNativeBCPtr);
|
||||
::PR_Sleep(PR_INTERVAL_NO_WAIT);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIWebBrowserChrome> webChrome(do_QueryInterface(gNewWindowInitContext->browserContainer));
|
||||
nsCOMPtr<nsIWebBrowserChrome> webChrome(do_QueryInterface(gNewWindowNativeBCPtr->browserContainer));
|
||||
*_retval = webChrome;
|
||||
NS_IF_ADDREF(*_retval);
|
||||
printf ("RET=%x\n", *_retval);
|
||||
*************/
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
WindowCreator::CreateChromeWindow2(nsIWebBrowserChrome *parent,
|
||||
PRUint32 chromeFlags,
|
||||
PRUint32 contextFlags,
|
||||
nsIURI *uri, PRBool *cancel,
|
||||
nsIWebBrowserChrome **_retval)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user