forked from Mirrors/wine-wine
mshtml: Get rid of no longer needed nsIWindowCreator2.
parent
dbc21a185e
commit
9d0bfce9d8
|
@ -2428,7 +2428,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
|
||||||
|
|
||||||
doc->usermode = UNKNOWN_USERMODE;
|
doc->usermode = UNKNOWN_USERMODE;
|
||||||
|
|
||||||
hres = create_nscontainer(doc, NULL, &doc->nscontainer);
|
hres = create_nscontainer(doc, &doc->nscontainer);
|
||||||
if(FAILED(hres)) {
|
if(FAILED(hres)) {
|
||||||
ERR("Failed to init Gecko, returning CLASS_E_CLASSNOTAVAILABLE\n");
|
ERR("Failed to init Gecko, returning CLASS_E_CLASSNOTAVAILABLE\n");
|
||||||
htmldoc_release(&doc->basedoc);
|
htmldoc_release(&doc->basedoc);
|
||||||
|
|
|
@ -666,9 +666,8 @@ void ConnectionPoint_Init(ConnectionPoint*,ConnectionPointContainer*,REFIID,cp_s
|
||||||
void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*) DECLSPEC_HIDDEN;
|
void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*) DECLSPEC_HIDDEN;
|
||||||
void ConnectionPointContainer_Destroy(ConnectionPointContainer*) DECLSPEC_HIDDEN;
|
void ConnectionPointContainer_Destroy(ConnectionPointContainer*) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
HRESULT create_nscontainer(HTMLDocumentObj*,NSContainer*,NSContainer**) DECLSPEC_HIDDEN;
|
HRESULT create_nscontainer(HTMLDocumentObj*,NSContainer**) DECLSPEC_HIDDEN;
|
||||||
void NSContainer_Release(NSContainer*) DECLSPEC_HIDDEN;
|
void NSContainer_Release(NSContainer*) DECLSPEC_HIDDEN;
|
||||||
nsresult create_chrome_window(nsIWebBrowserChrome*,nsIWebBrowserChrome**) DECLSPEC_HIDDEN;
|
|
||||||
|
|
||||||
void init_mutation(nsIComponentManager*) DECLSPEC_HIDDEN;
|
void init_mutation(nsIComponentManager*) DECLSPEC_HIDDEN;
|
||||||
void init_document_mutation(HTMLDocumentNode*) DECLSPEC_HIDDEN;
|
void init_document_mutation(HTMLDocumentNode*) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -1733,22 +1733,6 @@ static const nsISupportsWeakReferenceVtbl nsSupportsWeakReferenceVtbl = {
|
||||||
nsSupportsWeakReference_GetWeakReference
|
nsSupportsWeakReference_GetWeakReference
|
||||||
};
|
};
|
||||||
|
|
||||||
nsresult create_chrome_window(nsIWebBrowserChrome *parent, nsIWebBrowserChrome **ret)
|
|
||||||
{
|
|
||||||
NSContainer *new_container;
|
|
||||||
HRESULT hres;
|
|
||||||
|
|
||||||
if(parent->lpVtbl != &nsWebBrowserChromeVtbl)
|
|
||||||
return NS_ERROR_UNEXPECTED;
|
|
||||||
|
|
||||||
hres = create_nscontainer(NULL, impl_from_nsIWebBrowserChrome(parent), &new_container);
|
|
||||||
if(FAILED(hres))
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
*ret = &new_container->nsIWebBrowserChrome_iface;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static HRESULT init_nscontainer(NSContainer *nscontainer)
|
static HRESULT init_nscontainer(NSContainer *nscontainer)
|
||||||
{
|
{
|
||||||
nsIWebBrowserSetup *wbsetup;
|
nsIWebBrowserSetup *wbsetup;
|
||||||
|
@ -1857,7 +1841,7 @@ static HRESULT init_nscontainer(NSContainer *nscontainer)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT create_nscontainer(HTMLDocumentObj *doc, NSContainer *parent, NSContainer **_ret)
|
HRESULT create_nscontainer(HTMLDocumentObj *doc, NSContainer **_ret)
|
||||||
{
|
{
|
||||||
NSContainer *ret;
|
NSContainer *ret;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
@ -1880,10 +1864,6 @@ HRESULT create_nscontainer(HTMLDocumentObj *doc, NSContainer *parent, NSContaine
|
||||||
ret->doc = doc;
|
ret->doc = doc;
|
||||||
ret->ref = 1;
|
ret->ref = 1;
|
||||||
|
|
||||||
if(parent)
|
|
||||||
nsIWebBrowserChrome_AddRef(&parent->nsIWebBrowserChrome_iface);
|
|
||||||
ret->parent = parent;
|
|
||||||
|
|
||||||
hres = init_nscontainer(ret);
|
hres = init_nscontainer(ret);
|
||||||
if(SUCCEEDED(hres))
|
if(SUCCEEDED(hres))
|
||||||
*_ret = ret;
|
*_ret = ret;
|
||||||
|
|
|
@ -2822,51 +2822,6 @@ interface nsIProfile : nsISupports
|
||||||
nsresult CloneProfile(const PRUnichar *profileName);
|
nsresult CloneProfile(const PRUnichar *profileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
[
|
|
||||||
object,
|
|
||||||
uuid(30465632-a777-44cc-90f9-8145475ef999),
|
|
||||||
local
|
|
||||||
]
|
|
||||||
interface nsIWindowCreator : nsISupports
|
|
||||||
{
|
|
||||||
nsresult CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
|
|
||||||
nsIWebBrowserChrome **_retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
[
|
|
||||||
object,
|
|
||||||
uuid(f673ec81-a4b0-11d6-964b-eb5a2bf216fc),
|
|
||||||
local
|
|
||||||
]
|
|
||||||
interface nsIWindowCreator2 : nsIWindowCreator
|
|
||||||
{
|
|
||||||
nsresult CreateChromeWindow2(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
|
|
||||||
PRUint32 contextFlags, nsIURI *uri, bool *cancel,
|
|
||||||
nsIWebBrowserChrome **_retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
[
|
|
||||||
object,
|
|
||||||
uuid(002286a8-494b-43b3-8ddd-49e3fc50622b),
|
|
||||||
local
|
|
||||||
]
|
|
||||||
interface nsIWindowWatcher : nsISupports
|
|
||||||
{
|
|
||||||
nsresult OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName,
|
|
||||||
const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval);
|
|
||||||
nsresult RegisterNotification(nsIObserver *aObserver);
|
|
||||||
nsresult UnregisterNotification(nsIObserver *aObserver);
|
|
||||||
nsresult GetWindowEnumerator(nsISimpleEnumerator **_retval);
|
|
||||||
nsresult GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval);
|
|
||||||
nsresult GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval);
|
|
||||||
nsresult SetWindowCreator(nsIWindowCreator *creator);
|
|
||||||
nsresult GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval);
|
|
||||||
nsresult GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow,
|
|
||||||
nsIDOMWindow **_retval);
|
|
||||||
nsresult GetActiveWindow(nsIDOMWindow **aActiveWindow);
|
|
||||||
nsresult SetActiveWindow(nsIDOMWindow *aActiveWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
[
|
[
|
||||||
object,
|
object,
|
||||||
uuid(24f3f4da-18a4-448d-876d-7360fefac029),
|
uuid(24f3f4da-18a4-448d-876d-7360fefac029),
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
||||||
|
|
||||||
#define NS_PROMPTSERVICE_CONTRACTID "@mozilla.org/embedcomp/prompt-service;1"
|
#define NS_PROMPTSERVICE_CONTRACTID "@mozilla.org/embedcomp/prompt-service;1"
|
||||||
#define NS_WINDOWWATCHER_CONTRACTID "@mozilla.org/embedcomp/window-watcher;1"
|
|
||||||
#define NS_TOOLTIPTEXTPROVIDER_CONTRACTID "@mozilla.org/embedcomp/tooltiptextprovider;1"
|
#define NS_TOOLTIPTEXTPROVIDER_CONTRACTID "@mozilla.org/embedcomp/tooltiptextprovider;1"
|
||||||
|
|
||||||
#define NS_TOOLTIPTEXTPROVIDER_CLASSNAME "nsTooltipTextProvider"
|
#define NS_TOOLTIPTEXTPROVIDER_CLASSNAME "nsTooltipTextProvider"
|
||||||
|
@ -45,72 +44,6 @@ static const nsIID NS_PROMPTSERVICE_CID =
|
||||||
static const nsIID NS_TOOLTIPTEXTPROVIDER_CID =
|
static const nsIID NS_TOOLTIPTEXTPROVIDER_CID =
|
||||||
{0x0b666e3e,0x569a,0x462c,{0xa7,0xf0,0xb1,0x6b,0xb1,0x5d,0x42,0xff}};
|
{0x0b666e3e,0x569a,0x462c,{0xa7,0xf0,0xb1,0x6b,0xb1,0x5d,0x42,0xff}};
|
||||||
|
|
||||||
static nsresult NSAPI nsWindowCreator_QueryInterface(nsIWindowCreator2 *iface, nsIIDRef riid,
|
|
||||||
void **result)
|
|
||||||
{
|
|
||||||
*result = NULL;
|
|
||||||
|
|
||||||
if(IsEqualGUID(&IID_nsISupports, riid)) {
|
|
||||||
TRACE("(IID_nsISupports %p)\n", result);
|
|
||||||
*result = iface;
|
|
||||||
}else if(IsEqualGUID(&IID_nsIWindowCreator, riid)) {
|
|
||||||
TRACE("(IID_nsIWindowCreator %p)\n", result);
|
|
||||||
*result = iface;
|
|
||||||
}else if(IsEqualGUID(&IID_nsIWindowCreator2, riid)) {
|
|
||||||
TRACE("(IID_nsIWindowCreator2 %p)\n", result);
|
|
||||||
*result = iface;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(*result) {
|
|
||||||
nsIWindowCreator_AddRef(iface);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
WARN("(%s %p)\n", debugstr_guid(riid), result);
|
|
||||||
return NS_NOINTERFACE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static nsrefcnt NSAPI nsWindowCreator_AddRef(nsIWindowCreator2 *iface)
|
|
||||||
{
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
static nsrefcnt NSAPI nsWindowCreator_Release(nsIWindowCreator2 *iface)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static nsresult NSAPI nsWindowCreator_CreateChromeWindow(nsIWindowCreator2 *iface,
|
|
||||||
nsIWebBrowserChrome *parent, PRUint32 chromeFlags, nsIWebBrowserChrome **_retval)
|
|
||||||
{
|
|
||||||
TRACE("(%p %08x %p)\n", parent, chromeFlags, _retval);
|
|
||||||
return nsIWindowCreator2_CreateChromeWindow2(iface, parent, chromeFlags, 0, NULL,
|
|
||||||
NULL, _retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
static nsresult NSAPI nsWindowCreator_CreateChromeWindow2(nsIWindowCreator2 *iface,
|
|
||||||
nsIWebBrowserChrome *parent, PRUint32 chromeFlags, PRUint32 contextFlags,
|
|
||||||
nsIURI *uri, cpp_bool *cancel, nsIWebBrowserChrome **_retval)
|
|
||||||
{
|
|
||||||
TRACE("(%p %08x %08x %p %p %p)\n", parent, chromeFlags, contextFlags, uri,
|
|
||||||
cancel, _retval);
|
|
||||||
|
|
||||||
if(cancel)
|
|
||||||
*cancel = FALSE;
|
|
||||||
|
|
||||||
return create_chrome_window(parent, _retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const nsIWindowCreator2Vtbl nsWindowCreatorVtbl = {
|
|
||||||
nsWindowCreator_QueryInterface,
|
|
||||||
nsWindowCreator_AddRef,
|
|
||||||
nsWindowCreator_Release,
|
|
||||||
nsWindowCreator_CreateChromeWindow,
|
|
||||||
nsWindowCreator_CreateChromeWindow2
|
|
||||||
};
|
|
||||||
|
|
||||||
static nsIWindowCreator2 nsWindowCreator = { &nsWindowCreatorVtbl };
|
|
||||||
|
|
||||||
static nsresult NSAPI nsPromptService_QueryInterface(nsIPromptService *iface,
|
static nsresult NSAPI nsPromptService_QueryInterface(nsIPromptService *iface,
|
||||||
nsIIDRef riid, void **result)
|
nsIIDRef riid, void **result)
|
||||||
{
|
{
|
||||||
|
@ -454,7 +387,6 @@ static nsServiceFactory nsTooltipTextFactory = {
|
||||||
|
|
||||||
void register_nsservice(nsIComponentRegistrar *registrar, nsIServiceManager *service_manager)
|
void register_nsservice(nsIComponentRegistrar *registrar, nsIServiceManager *service_manager)
|
||||||
{
|
{
|
||||||
nsIWindowWatcher *window_watcher;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_PROMPTSERVICE_CID,
|
nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_PROMPTSERVICE_CID,
|
||||||
|
@ -462,18 +394,6 @@ void register_nsservice(nsIComponentRegistrar *registrar, nsIServiceManager *ser
|
||||||
if(NS_FAILED(nsres))
|
if(NS_FAILED(nsres))
|
||||||
ERR("RegisterFactory failed: %08x\n", nsres);
|
ERR("RegisterFactory failed: %08x\n", nsres);
|
||||||
|
|
||||||
nsres = nsIServiceManager_GetServiceByContractID(service_manager, NS_WINDOWWATCHER_CONTRACTID,
|
|
||||||
&IID_nsIWindowWatcher, (void**)&window_watcher);
|
|
||||||
if(NS_SUCCEEDED(nsres)) {
|
|
||||||
nsres = nsIWindowWatcher_SetWindowCreator(window_watcher,
|
|
||||||
(nsIWindowCreator*)&nsWindowCreator);
|
|
||||||
if(NS_FAILED(nsres))
|
|
||||||
ERR("SetWindowCreator failed: %08x\n", nsres);
|
|
||||||
nsIWindowWatcher_Release(window_watcher);
|
|
||||||
}else {
|
|
||||||
ERR("Could not get WindowWatcher object: %08x\n", nsres);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_TOOLTIPTEXTPROVIDER_CID,
|
nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_TOOLTIPTEXTPROVIDER_CID,
|
||||||
NS_TOOLTIPTEXTPROVIDER_CLASSNAME, NS_TOOLTIPTEXTPROVIDER_CONTRACTID,
|
NS_TOOLTIPTEXTPROVIDER_CLASSNAME, NS_TOOLTIPTEXTPROVIDER_CONTRACTID,
|
||||||
&nsTooltipTextFactory.nsIFactory_iface);
|
&nsTooltipTextFactory.nsIFactory_iface);
|
||||||
|
|
Loading…
Reference in New Issue