make DoDialog available from idl. bug 72112 continues
git-svn-id: svn://10.0.0.236/trunk@91716 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "nsPromptService.h"
|
||||
|
||||
#include "nsDialogParamBlock.h"
|
||||
#include "nsXPComFactory.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIDialogParamBlock.h"
|
||||
@@ -29,8 +30,6 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsISupportsUtils.h"
|
||||
|
||||
static NS_DEFINE_CID(kDialogParamBlockCID, NS_DialogParamBlock_CID);
|
||||
|
||||
const char *kPromptURL="chrome://global/content/commonDialog.xul";
|
||||
const char *kSelectPromptURL="chrome://global/content/selectDialog.xul";
|
||||
const char *kQuestionIconURL ="chrome://global/skin/question-icon.gif";
|
||||
@@ -51,7 +50,8 @@ public:
|
||||
NS_IF_RELEASE(mBlock);
|
||||
}
|
||||
nsresult Init() {
|
||||
return nsComponentManager::CreateInstance(kDialogParamBlockCID,
|
||||
return nsComponentManager::CreateInstance(
|
||||
NS_DIALOGPARAMBLOCK_CONTRACTID,
|
||||
0, NS_GET_IID(nsIDialogParamBlock),
|
||||
(void**) &mBlock);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
************************ nsPromptService ***********************
|
||||
****************************************************************/
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsPromptService, nsIPromptService)
|
||||
NS_IMPL_ISUPPORTS2(nsPromptService, nsIPromptService, nsPIPromptService)
|
||||
|
||||
nsPromptService::nsPromptService() {
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
@@ -31,12 +31,14 @@
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIPromptService.h"
|
||||
#include "nsPIPromptService.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
|
||||
class nsIDOMWindow;
|
||||
class nsIDialogParamBlock;
|
||||
|
||||
class nsPromptService: public nsIPromptService {
|
||||
class nsPromptService: public nsIPromptService,
|
||||
public nsPIPromptService {
|
||||
|
||||
public:
|
||||
|
||||
@@ -46,14 +48,11 @@ public:
|
||||
nsresult Init();
|
||||
|
||||
NS_DECL_NSIPROMPTSERVICE
|
||||
NS_DECL_NSPIPROMPTSERVICE
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
private:
|
||||
|
||||
nsresult DoDialog(nsIDOMWindow *aParent,
|
||||
nsIDialogParamBlock *aParamBlock,
|
||||
const char *aChromeURL);
|
||||
|
||||
nsCOMPtr<nsIWindowWatcher> mWatcher;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user