This change-bundle is the start of loadFromStream(). Currently, I'm
only able to load the first burst from the RandomHTMLInputStream, because for some reason the native stream is getting closed prematurely. Need to investigate more. M classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java - remove loadFromStreamBlocking. No point in implementing this since the loadFromStream() impl is inherently multi-threaded. M src_moz/EmbedWindow.cpp M src_moz/EmbedWindow.h - expose LoadStream() method that wraps same on nsIDocShell. M src_moz/InputStreamShim.cpp - Do a lock around our buffer deletion in or dtor. M src_moz/Makefile.in - activate nsActions and NavigationActionEvents M src_moz/NavigationActionEvents.cpp M src_moz/NavigationActionEvents.h - comment out everything but wsLoadFromStreamEvent. - fix it to work with the NativeBrowserControl. M src_moz/NavigationImpl.cpp - activate nativeLoadFromStream. This is the first *new* version method to use the old native event queue. M src_moz/ns_util.cpp M src_moz/ns_util.h - remove unused first arg from Post*Event methods. M test/automated/src/classes/org/mozilla/webclient/NavigationTest.java - activate loadFromStream test. M test/automated/src/classes/org/mozilla/webclient/RandomHTMLInputStream.java - add a randomExceptions param to the ctor to enable or disable randomly thrown exceptions. git-svn-id: svn://10.0.0.236/trunk@155640 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -40,10 +40,10 @@
|
||||
#include "nsIURI.h"
|
||||
#include "ns_util.h"
|
||||
|
||||
struct NativeBrowserControl;
|
||||
class NativeBrowserControl;
|
||||
class InputStreamShim;
|
||||
|
||||
|
||||
/********************
|
||||
class wsLoadURLEvent : public nsActionEvent {
|
||||
public:
|
||||
wsLoadURLEvent (nsIWebNavigation* webNavigation, PRUnichar * urlString, PRInt32 urlLength);
|
||||
@@ -55,9 +55,11 @@ protected:
|
||||
nsString * mURL;
|
||||
};
|
||||
|
||||
******************/
|
||||
|
||||
class wsLoadFromStreamEvent : public nsActionEvent {
|
||||
public:
|
||||
wsLoadFromStreamEvent(NativeBrowserControl *yourInitContext,
|
||||
wsLoadFromStreamEvent(NativeBrowserControl *yourNativeBC,
|
||||
void *globalStream,
|
||||
nsString &uriToCopy,
|
||||
const char *contentTypeToCopy,
|
||||
@@ -71,17 +73,18 @@ private:
|
||||
|
||||
protected:
|
||||
|
||||
NativeBrowserControl *mInitContext;
|
||||
NativeBrowserControl *mNativeBrowserControl;
|
||||
nsString mUriString;
|
||||
char *mContentType; // MUST be delete'd in destructor
|
||||
void * mProperties; // MUST be util_deleteGlobalRef'd in destructor.
|
||||
InputStreamShim *mShim; // DO NOT delete this in the destructor
|
||||
};
|
||||
|
||||
/*****************
|
||||
|
||||
class wsPostEvent : public nsActionEvent {
|
||||
public:
|
||||
wsPostEvent(NativeBrowserControl *yourInitContext,
|
||||
wsPostEvent(NativeBrowserControl *yourNativeBC,
|
||||
nsIURI *absoluteUrl,
|
||||
const PRUnichar *targetToCopy,
|
||||
PRInt32 targetLength,
|
||||
@@ -97,7 +100,7 @@ private:
|
||||
|
||||
protected:
|
||||
|
||||
NativeBrowserControl *mInitContext;
|
||||
NativeBrowserControl *mNativeBrowserControl;
|
||||
nsCOMPtr<nsIURI> mAbsoluteURI;
|
||||
nsString *mTarget;
|
||||
const char *mPostData;
|
||||
@@ -139,7 +142,7 @@ protected:
|
||||
jobject mUserPrompt;
|
||||
};
|
||||
|
||||
|
||||
*******************/
|
||||
|
||||
#endif /* NavigationActionEvents_h___ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user