mshtml: Added new nsChannelBSC type.
This commit is contained in:
parent
979b42d749
commit
5a04f526ad
|
@ -54,6 +54,7 @@
|
|||
typedef struct HTMLDOMNode HTMLDOMNode;
|
||||
typedef struct ConnectionPoint ConnectionPoint;
|
||||
typedef struct BSCallback BSCallback;
|
||||
typedef struct BSCallback nsChannelBSC;
|
||||
|
||||
typedef struct {
|
||||
const IHTMLWindow2Vtbl *lpHTMLWindow2Vtbl;
|
||||
|
@ -138,7 +139,7 @@ struct HTMLDocument {
|
|||
|
||||
IOleUndoManager *undomgr;
|
||||
|
||||
BSCallback *bscallback;
|
||||
nsChannelBSC *bscallback;
|
||||
IMoniker *mon;
|
||||
LPOLESTR url;
|
||||
struct list bindings;
|
||||
|
@ -211,7 +212,7 @@ struct NSContainer {
|
|||
|
||||
HWND hwnd;
|
||||
|
||||
BSCallback *bscallback; /* hack */
|
||||
nsChannelBSC *bscallback; /* hack */
|
||||
HWND reset_focus; /* hack */
|
||||
};
|
||||
|
||||
|
@ -428,14 +429,16 @@ void get_editor_controller(NSContainer*);
|
|||
void init_nsevents(NSContainer*);
|
||||
nsresult get_nsinterface(nsISupports*,REFIID,void**);
|
||||
|
||||
BSCallback *create_bscallback(IMoniker*);
|
||||
HRESULT start_binding(HTMLDocument*,BSCallback*,IBindCtx*);
|
||||
HRESULT load_stream(BSCallback*,IStream*);
|
||||
void set_document_bscallback(HTMLDocument*,BSCallback*);
|
||||
void set_document_bscallback(HTMLDocument*,nsChannelBSC*);
|
||||
void set_current_mon(HTMLDocument*,IMoniker*);
|
||||
HRESULT start_binding(HTMLDocument*,BSCallback*,IBindCtx*);
|
||||
|
||||
void channelbsc_set_channel(BSCallback*,nsChannel*,nsIStreamListener*,nsISupports*);
|
||||
IMoniker *get_channelbsc_mon(BSCallback*);
|
||||
HRESULT bind_mon_to_buffer(HTMLDocument*,IMoniker*,void**);
|
||||
|
||||
nsChannelBSC *create_channelbsc(IMoniker*);
|
||||
HRESULT channelbsc_load_stream(nsChannelBSC*,IStream*);
|
||||
void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*);
|
||||
IMoniker *get_channelbsc_mon(nsChannelBSC*);
|
||||
|
||||
IHTMLSelectionObject *HTMLSelectionObject_Create(HTMLDocument*,nsISelection*);
|
||||
IHTMLTxtRange *HTMLTxtRange_Create(HTMLDocument*,nsIDOMRange*);
|
||||
|
|
|
@ -660,7 +660,7 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
|
|||
BSCServiceProvider_QueryService
|
||||
};
|
||||
|
||||
BSCallback *create_bscallback(IMoniker *mon)
|
||||
BSCallback *create_channelbsc(IMoniker *mon)
|
||||
{
|
||||
BSCallback *ret = heap_alloc(sizeof(BSCallback));
|
||||
|
||||
|
@ -789,7 +789,7 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame,
|
|||
IHlink *hlink;
|
||||
HRESULT hr;
|
||||
|
||||
callback = create_bscallback(NULL);
|
||||
callback = create_channelbsc(NULL);
|
||||
|
||||
if(post_data_stream) {
|
||||
parse_post_data(post_data_stream, &callback->headers, &callback->post_data,
|
||||
|
@ -897,7 +897,7 @@ void set_document_bscallback(HTMLDocument *doc, BSCallback *callback)
|
|||
}
|
||||
}
|
||||
|
||||
HRESULT load_stream(BSCallback *bscallback, IStream *stream)
|
||||
HRESULT channelbsc_load_stream(BSCallback *bscallback, IStream *stream)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
|
|
|
@ -727,7 +727,7 @@ static nsresult async_open_doc_uri(nsChannel *This, NSContainer *container,
|
|||
static nsresult async_open(nsChannel *This, NSContainer *container, nsIStreamListener *listener,
|
||||
nsISupports *context)
|
||||
{
|
||||
BSCallback *bscallback;
|
||||
nsChannelBSC *bscallback;
|
||||
IMoniker *mon = NULL;
|
||||
nsresult nsres;
|
||||
task_t *task;
|
||||
|
@ -769,7 +769,7 @@ static nsresult async_open(nsChannel *This, NSContainer *container, nsIStreamLis
|
|||
if(FAILED(hres))
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
bscallback = create_bscallback(mon);
|
||||
bscallback = create_channelbsc(mon);
|
||||
IMoniker_Release(mon);
|
||||
|
||||
channelbsc_set_channel(bscallback, This, listener, context);
|
||||
|
|
|
@ -185,7 +185,7 @@ void set_current_mon(HTMLDocument *This, IMoniker *mon)
|
|||
|
||||
static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BOOL *bind_complete)
|
||||
{
|
||||
BSCallback *bscallback;
|
||||
nsChannelBSC *bscallback;
|
||||
LPOLESTR url = NULL;
|
||||
task_t *task;
|
||||
HRESULT hres;
|
||||
|
@ -271,7 +271,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
|
|||
}
|
||||
}
|
||||
|
||||
bscallback = create_bscallback(mon);
|
||||
bscallback = create_channelbsc(mon);
|
||||
|
||||
if(This->frame) {
|
||||
task = heap_alloc(sizeof(task_t));
|
||||
|
@ -305,7 +305,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
|
|||
if(NS_SUCCEEDED(nsres)) {
|
||||
/* FIXME: don't return here (URL Moniker needs to be good enough) */
|
||||
|
||||
IBindStatusCallback_Release(STATUSCLB(bscallback));
|
||||
IUnknown_Release((IUnknown*)bscallback);
|
||||
CoTaskMemFree(url);
|
||||
|
||||
if(bind_complete)
|
||||
|
@ -317,7 +317,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
|
|||
}
|
||||
|
||||
set_document_bscallback(This, bscallback);
|
||||
IBindStatusCallback_Release(STATUSCLB(bscallback));
|
||||
IUnknown_Release((IUnknown*)bscallback);
|
||||
CoTaskMemFree(url);
|
||||
|
||||
if(bind_complete)
|
||||
|
@ -422,7 +422,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
|
|||
return hres;
|
||||
|
||||
if(!bind_complete)
|
||||
return start_binding(This, This->bscallback, pibc);
|
||||
return start_binding(This, (BSCallback*)This->bscallback, pibc);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -687,7 +687,7 @@ static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
return load_stream(This->bscallback, pStm);
|
||||
return channelbsc_load_stream(This->bscallback, pStm);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM pStm,
|
||||
|
|
Loading…
Reference in New Issue