A docshell is now passed in. Use the nsIWebNavigation for loading an URL rather than nsIWebShell::LoadURL.
git-svn-id: svn://10.0.0.236/trunk@64460 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c79eb9dae7
commit
264c89e73a
@ -23,6 +23,8 @@
|
|||||||
#include "nsIRobotSink.h"
|
#include "nsIRobotSink.h"
|
||||||
#include "nsIRobotSinkObserver.h"
|
#include "nsIRobotSinkObserver.h"
|
||||||
#include "nsIParser.h"
|
#include "nsIParser.h"
|
||||||
|
#include "nsIDocShell.h"
|
||||||
|
#include "nsIWebNavigation.h"
|
||||||
#include "nsIWebShell.h"
|
#include "nsIWebShell.h"
|
||||||
#include "nsIDocumentLoader.h"
|
#include "nsIDocumentLoader.h"
|
||||||
#include "nsIDocumentLoaderObserver.h"
|
#include "nsIDocumentLoaderObserver.h"
|
||||||
@ -204,7 +206,7 @@ extern "C" NS_EXPORT void DumpVectorRecord(void);
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
extern "C" NS_EXPORT int DebugRobot(
|
extern "C" NS_EXPORT int DebugRobot(
|
||||||
nsVoidArray * workList,
|
nsVoidArray * workList,
|
||||||
nsIWebShell * ww,
|
nsIDocShell * docShell,
|
||||||
int iMaxLoads,
|
int iMaxLoads,
|
||||||
char * verify_dir,
|
char * verify_dir,
|
||||||
void (*yieldProc )(const char *)
|
void (*yieldProc )(const char *)
|
||||||
@ -315,10 +317,11 @@ extern "C" NS_EXPORT int DebugRobot(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_bReadyForNextUrl = PR_FALSE;
|
g_bReadyForNextUrl = PR_FALSE;
|
||||||
if (ww) {
|
if (docShell) {
|
||||||
nsIDocumentLoader *docLoader;
|
nsIDocumentLoader *docLoader;
|
||||||
|
|
||||||
ww->GetDocumentLoader(docLoader);
|
nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(docShell));
|
||||||
|
webShell->GetDocumentLoader(docLoader);
|
||||||
if (docLoader) {
|
if (docLoader) {
|
||||||
docLoader->AddObserver(pl);
|
docLoader->AddObserver(pl);
|
||||||
NS_RELEASE(docLoader);
|
NS_RELEASE(docLoader);
|
||||||
@ -327,7 +330,8 @@ extern "C" NS_EXPORT int DebugRobot(
|
|||||||
(void)url->GetSpec(&spec);
|
(void)url->GetSpec(&spec);
|
||||||
nsAutoString theSpec(spec);
|
nsAutoString theSpec(spec);
|
||||||
nsCRT::free(spec);
|
nsCRT::free(spec);
|
||||||
ww->LoadURL(theSpec.GetUnicode());/* XXX hook up stream listener here! */
|
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(docShell));
|
||||||
|
webNav->LoadURI(theSpec.GetUnicode());/* XXX hook up stream listener here! */
|
||||||
while (!g_bReadyForNextUrl) {
|
while (!g_bReadyForNextUrl) {
|
||||||
if (yieldProc != NULL) {
|
if (yieldProc != NULL) {
|
||||||
(void)url->GetSpec(&spec);
|
(void)url->GetSpec(&spec);
|
||||||
|
|||||||
@ -23,6 +23,8 @@
|
|||||||
#include "nsIRobotSink.h"
|
#include "nsIRobotSink.h"
|
||||||
#include "nsIRobotSinkObserver.h"
|
#include "nsIRobotSinkObserver.h"
|
||||||
#include "nsIParser.h"
|
#include "nsIParser.h"
|
||||||
|
#include "nsIDocShell.h"
|
||||||
|
#include "nsIWebNavigation.h"
|
||||||
#include "nsIWebShell.h"
|
#include "nsIWebShell.h"
|
||||||
#include "nsIDocumentLoader.h"
|
#include "nsIDocumentLoader.h"
|
||||||
#include "nsIDocumentLoaderObserver.h"
|
#include "nsIDocumentLoaderObserver.h"
|
||||||
@ -204,7 +206,7 @@ extern "C" NS_EXPORT void DumpVectorRecord(void);
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
extern "C" NS_EXPORT int DebugRobot(
|
extern "C" NS_EXPORT int DebugRobot(
|
||||||
nsVoidArray * workList,
|
nsVoidArray * workList,
|
||||||
nsIWebShell * ww,
|
nsIDocShell * docShell,
|
||||||
int iMaxLoads,
|
int iMaxLoads,
|
||||||
char * verify_dir,
|
char * verify_dir,
|
||||||
void (*yieldProc )(const char *)
|
void (*yieldProc )(const char *)
|
||||||
@ -315,10 +317,11 @@ extern "C" NS_EXPORT int DebugRobot(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_bReadyForNextUrl = PR_FALSE;
|
g_bReadyForNextUrl = PR_FALSE;
|
||||||
if (ww) {
|
if (docShell) {
|
||||||
nsIDocumentLoader *docLoader;
|
nsIDocumentLoader *docLoader;
|
||||||
|
|
||||||
ww->GetDocumentLoader(docLoader);
|
nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(docShell));
|
||||||
|
webShell->GetDocumentLoader(docLoader);
|
||||||
if (docLoader) {
|
if (docLoader) {
|
||||||
docLoader->AddObserver(pl);
|
docLoader->AddObserver(pl);
|
||||||
NS_RELEASE(docLoader);
|
NS_RELEASE(docLoader);
|
||||||
@ -327,7 +330,8 @@ extern "C" NS_EXPORT int DebugRobot(
|
|||||||
(void)url->GetSpec(&spec);
|
(void)url->GetSpec(&spec);
|
||||||
nsAutoString theSpec(spec);
|
nsAutoString theSpec(spec);
|
||||||
nsCRT::free(spec);
|
nsCRT::free(spec);
|
||||||
ww->LoadURL(theSpec.GetUnicode());/* XXX hook up stream listener here! */
|
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(docShell));
|
||||||
|
webNav->LoadURI(theSpec.GetUnicode());/* XXX hook up stream listener here! */
|
||||||
while (!g_bReadyForNextUrl) {
|
while (!g_bReadyForNextUrl) {
|
||||||
if (yieldProc != NULL) {
|
if (yieldProc != NULL) {
|
||||||
(void)url->GetSpec(&spec);
|
(void)url->GetSpec(&spec);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user