Bug 694224, remove appshell argument from various widget creation methods, r=roc

This commit is contained in:
Neil Deakin 2011-10-14 09:06:39 -04:00
parent 53dac2fab8
commit 90f42cf310
32 changed files with 45 additions and 97 deletions

View File

@ -1156,7 +1156,7 @@ NS_IMETHODIMP nsWebBrowser::Create()
mInternalWidget->SetClientData(static_cast<nsWebBrowser *>(this));
mInternalWidget->Create(nsnull, mParentNativeWindow, bounds, nsWebBrowser::HandleEvent,
nsnull, nsnull, nsnull, &widgetInit);
nsnull, nsnull, &widgetInit);
}
nsCOMPtr<nsIDocShell> docShell(do_CreateInstance("@mozilla.org/docshell;1", &rv));

View File

@ -468,7 +468,7 @@ nsObjectFrame::CreateWidget(nscoord aWidth,
// mWidget isn't the view's designated widget.
EVENT_CALLBACK eventHandler = mInnerView->AttachWidgetEventHandler(mWidget);
rv = mWidget->Create(parentWidget, nsnull, nsIntRect(0,0,0,0),
eventHandler, dx, nsnull, nsnull, &initData);
eventHandler, dx, nsnull, &initData);
if (NS_FAILED(rv)) {
mWidget->Destroy();
mWidget = nsnull;

View File

@ -194,7 +194,7 @@ nsAppStartup::CreateHiddenWindow()
(do_GetService(NS_APPSHELLSERVICE_CONTRACTID));
NS_ENSURE_TRUE(appShellService, NS_ERROR_FAILURE);
return appShellService->CreateHiddenWindow(mAppShell);
return appShellService->CreateHiddenWindow();
}
@ -512,7 +512,7 @@ nsAppStartup::CreateChromeWindow2(nsIWebBrowserChrome *aParent,
NS_ASSERTION(xulParent, "window created using non-XUL parent. that's unexpected, but may work.");
if (xulParent)
xulParent->CreateNewWindow(aChromeFlags, mAppShell, getter_AddRefs(newWindow));
xulParent->CreateNewWindow(aChromeFlags, getter_AddRefs(newWindow));
// And if it fails, don't try again without a parent. It could fail
// intentionally (bug 115969).
} else { // try using basic methods:
@ -529,7 +529,7 @@ nsAppStartup::CreateChromeWindow2(nsIWebBrowserChrome *aParent,
appShell->CreateTopLevelWindow(0, 0, aChromeFlags,
nsIAppShellService::SIZE_TO_CONTENT,
nsIAppShellService::SIZE_TO_CONTENT,
mAppShell, getter_AddRefs(newWindow));
getter_AddRefs(newWindow));
}
// if anybody gave us anything to work with, use it

View File

@ -747,7 +747,7 @@ nsresult nsView::CreateWidget(nsWidgetInitData *aWidgetInitData,
// XXX: using aForceUseIWidgetParent=true to preserve previous
// semantics. It's not clear that it's actually needed.
mWindow = parentWidget->CreateChild(trect, ::HandleEvent,
dx, nsnull, nsnull, aWidgetInitData,
dx, nsnull, aWidgetInitData,
PR_TRUE).get();
if (!mWindow) {
return NS_ERROR_FAILURE;
@ -779,7 +779,7 @@ nsresult nsView::CreateWidgetForParent(nsIWidget* aParentWidget,
mWindow =
aParentWidget->CreateChild(trect, ::HandleEvent,
dx, nsnull, nsnull, aWidgetInitData).get();
dx, nsnull, aWidgetInitData).get();
if (!mWindow) {
return NS_ERROR_FAILURE;
}
@ -812,7 +812,7 @@ nsresult nsView::CreateWidgetForPopup(nsWidgetInitData *aWidgetInitData,
// XXX: using aForceUseIWidgetParent=true to preserve previous
// semantics. It's not clear that it's actually needed.
mWindow = aParentWidget->CreateChild(trect, ::HandleEvent,
dx, nsnull, nsnull, aWidgetInitData,
dx, nsnull, aWidgetInitData,
PR_TRUE).get();
}
else {
@ -826,7 +826,7 @@ nsresult nsView::CreateWidgetForPopup(nsWidgetInitData *aWidgetInitData,
mWindow =
nearestParent->CreateChild(trect, ::HandleEvent,
dx, nsnull, nsnull, aWidgetInitData).get();
dx, nsnull, aWidgetInitData).get();
}
if (!mWindow) {
return NS_ERROR_FAILURE;

View File

@ -57,7 +57,6 @@
#include "nsXULAppAPI.h"
// forward declarations
class nsIAppShell;
class nsIToolkit;
class nsFontMetrics;
class nsRenderingContext;
@ -121,8 +120,8 @@ typedef nsEventStatus (* EVENT_CALLBACK)(nsGUIEvent *event);
#endif
#define NS_IWIDGET_IID \
{ 0xf43254ce, 0xd315, 0x458b, \
{ 0xba, 0x72, 0xa8, 0xdf, 0x21, 0xcf, 0xa7, 0x2a } }
{ 0x64e1ee3d, 0xe0f2, 0x4ace, \
{ 0x91, 0xb7, 0xdc, 0xd1, 0xbe, 0x69, 0xb6, 0xe6 } }
/*
* Window shadow styles
@ -326,8 +325,6 @@ class nsIWidget : public nsISupports {
* @param aRect the widget dimension
* @param aHandleEventFunction the event handler callback function
* @param aContext
* @param aAppShell the parent application shell. If nsnull,
* the parent window's application shell will be used.
* @param aToolkit
* @param aInitData data that is used for widget initialization
*
@ -337,7 +334,6 @@ class nsIWidget : public nsISupports {
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull) = 0;
@ -361,7 +357,6 @@ class nsIWidget : public nsISupports {
CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull,
bool aForceUseIWidgetParent = false) = 0;

View File

@ -202,7 +202,6 @@ nsWindow::Create(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
@ -232,7 +231,7 @@ nsWindow::Create(nsIWidget *aParent,
}
BaseCreate(nsnull, mBounds, aHandleEventFunction, aContext,
aAppShell, aToolkit, aInitData);
aToolkit, aInitData);
NS_ASSERTION(IsTopLevel() || parent, "non top level windowdoesn't have a parent!");

View File

@ -87,7 +87,6 @@ public:
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData);
NS_IMETHOD Destroy(void);

View File

@ -55,8 +55,6 @@
#include "TextInputHandler.h"
#include "nsCocoaUtils.h"
#include "nsIAppShell.h"
#include "nsString.h"
#include "nsIDragService.h"
@ -398,7 +396,6 @@ public:
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull);

View File

@ -291,7 +291,6 @@ nsresult nsChildView::Create(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
@ -324,7 +323,7 @@ nsresult nsChildView::Create(nsIWidget *aParent,
mBounds = aRect;
BaseCreate(aParent, aRect, aHandleEventFunction,
aContext, aAppShell, aToolkit, aInitData);
aContext, aToolkit, aInitData);
// inherit things from the parent view and create our parallel
// NSView in the Cocoa display system

View File

@ -216,7 +216,6 @@ public:
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull);
@ -309,7 +308,6 @@ protected:
nsresult CreatePopupContentView(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit);
void DestroyNativeWindow();
void AdjustWindowShadow();

View File

@ -47,7 +47,6 @@
#include "nsChildView.h"
#include "nsWindowMap.h"
#include "nsAppShell.h"
#include "nsIAppShell.h"
#include "nsIAppShellService.h"
#include "nsIBaseWindow.h"
#include "nsIInterfaceRequestorUtils.h"
@ -247,7 +246,6 @@ nsresult nsCocoaWindow::Create(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
@ -285,7 +283,7 @@ nsresult nsCocoaWindow::Create(nsIWidget *aParent,
mWindowType = eWindowType_toplevel;
mBorderStyle = eBorderStyle_default;
Inherited::BaseCreate(aParent, newBounds, aHandleEventFunction, aContext, aAppShell,
Inherited::BaseCreate(aParent, newBounds, aHandleEventFunction, aContext,
aToolkit, aInitData);
mParent = aParent;
@ -302,7 +300,7 @@ nsresult nsCocoaWindow::Create(nsIWidget *aParent,
if (aInitData->mIsDragPopup) {
[mWindow setIgnoresMouseEvents:YES];
}
return CreatePopupContentView(newBounds, aHandleEventFunction, aContext, aAppShell, aToolkit);
return CreatePopupContentView(newBounds, aHandleEventFunction, aContext, aToolkit);
}
return NS_OK;
@ -480,7 +478,6 @@ nsresult nsCocoaWindow::CreateNativeWindow(const NSRect &aRect,
NS_IMETHODIMP nsCocoaWindow::CreatePopupContentView(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
@ -494,7 +491,7 @@ NS_IMETHODIMP nsCocoaWindow::CreatePopupContentView(const nsIntRect &aRect,
nsIWidget* thisAsWidget = static_cast<nsIWidget*>(this);
mPopupContentView->Create(thisAsWidget, nsnull, aRect, aHandleEventFunction,
aContext, aAppShell, aToolkit, nsnull);
aContext, aToolkit, nsnull);
ChildView* newContentView = (ChildView*)mPopupContentView->GetNativeData(NS_NATIVE_WIDGET);
[mWindow setContentView:newContentView];

View File

@ -3878,7 +3878,6 @@ nsWindow::Create(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
@ -3894,7 +3893,7 @@ nsWindow::Create(nsIWidget *aParent,
// initialize all the common bits of this class
BaseCreate(baseParent, aRect, aHandleEventFunction, aContext,
aAppShell, aToolkit, aInitData);
aToolkit, aInitData);
// Do we need to listen for resizes?
bool listenForResizes = false;;

View File

@ -138,7 +138,6 @@ public:
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData);
NS_IMETHOD Destroy(void);

View File

@ -336,7 +336,6 @@ NS_METHOD nsWindow::Create(nsIWidget* aParent,
const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext* aContext,
nsIAppShell* aAppShell,
nsIToolkit* aToolkit,
nsWidgetInitData* aInitData)
{
@ -361,7 +360,7 @@ NS_METHOD nsWindow::Create(nsIWidget* aParent,
}
BaseCreate(aParent, aRect, aHandleEventFunction,
aContext, aAppShell, aToolkit, aInitData);
aContext, aToolkit, aInitData);
#ifdef DEBUG_FOCUS

View File

@ -166,7 +166,6 @@ public:
const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext* aContext,
nsIAppShell* aAppShell = nsnull,
nsIToolkit* aToolkit = nsnull,
nsWidgetInitData* aInitData = nsnull);
NS_IMETHOD Destroy();

View File

@ -2253,7 +2253,6 @@ nsWindow::Create(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
@ -2273,7 +2272,7 @@ nsWindow::Create(nsIWidget *aParent,
// initialize all the common bits of this class
BaseCreate(baseParent, aRect, aHandleEventFunction, aContext,
aAppShell, aToolkit, aInitData);
aToolkit, aInitData);
// and do our common creation
mParent = aParent;
@ -2309,7 +2308,6 @@ already_AddRefed<nsIWidget>
nsWindow::CreateChild(const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext* aContext,
nsIAppShell* aAppShell,
nsIToolkit* aToolkit,
nsWidgetInitData* aInitData,
bool /*aForceUseIWidgetParent*/)
@ -2318,7 +2316,6 @@ nsWindow::CreateChild(const nsIntRect& aRect,
return nsBaseWidget::CreateChild(aRect,
aHandleEventFunction,
aContext,
aAppShell,
aToolkit,
aInitData,
PR_TRUE); // Force parent

View File

@ -128,7 +128,6 @@ public:
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData);
@ -136,7 +135,6 @@ public:
CreateChild(const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext* aContext,
nsIAppShell* aAppShell = nsnull,
nsIToolkit* aToolkit = nsnull,
nsWidgetInitData* aInitData = nsnull,
bool aForceUseIWidgetParent = true);

View File

@ -503,7 +503,6 @@ nsWindow::Create(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
@ -521,8 +520,7 @@ nsWindow::Create(nsIWidget *aParent,
mIsTopWidgetWindow = (nsnull == baseParent);
mBounds = aRect;
BaseCreate(baseParent, aRect, aHandleEventFunction, aContext,
aAppShell, aToolkit, aInitData);
BaseCreate(baseParent, aRect, aHandleEventFunction, aContext, aToolkit, aInitData);
HWND parent;
if (aParent) { // has a nsIWidget parent

View File

@ -114,7 +114,6 @@ public:
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull);
NS_IMETHOD Destroy();

View File

@ -112,14 +112,13 @@ PuppetWidget::Create(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
NS_ABORT_IF_FALSE(!aNativeParent, "got a non-Puppet native parent");
BaseCreate(nsnull, aRect, aHandleEventFunction, aContext,
aAppShell, aToolkit, aInitData);
aToolkit, aInitData);
mBounds = aRect;
mEnabled = PR_TRUE;
@ -152,7 +151,6 @@ already_AddRefed<nsIWidget>
PuppetWidget::CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData,
bool aForceUseIWidgetParent)
@ -162,7 +160,7 @@ PuppetWidget::CreateChild(const nsIntRect &aRect,
return ((widget &&
NS_SUCCEEDED(widget->Create(isPopup ? nsnull: this, nsnull, aRect,
aHandleEventFunction,
aContext, aAppShell, aToolkit,
aContext, aToolkit,
aInitData))) ?
widget.forget() : nsnull);
}

View File

@ -75,7 +75,6 @@ public:
const nsIntRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext* aContext,
nsIAppShell* aAppShell = nsnull,
nsIToolkit* aToolkit = nsnull,
nsWidgetInitData* aInitData = nsnull);
@ -83,7 +82,6 @@ public:
CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull,
bool aForceUseIWidgetParent = false);

View File

@ -163,7 +163,6 @@ void nsBaseWidget::BaseCreate(nsIWidget *aParent,
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData)
{
@ -252,7 +251,6 @@ already_AddRefed<nsIWidget>
nsBaseWidget::CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData,
bool aForceUseIWidgetParent)
@ -280,7 +278,7 @@ nsBaseWidget::CreateChild(const nsIntRect &aRect,
if (widget &&
NS_SUCCEEDED(widget->Create(parent, nativeParent, aRect,
aHandleEventFunction,
aContext, aAppShell, aToolkit,
aContext, aToolkit,
aInitData))) {
return widget.forget();
}

View File

@ -41,7 +41,6 @@
#include "nsIWidget.h"
#include "nsWidgetsCID.h"
#include "nsIToolkit.h"
#include "nsIAppShell.h"
#include "nsILocalFile.h"
#include "nsString.h"
#include "nsCOMPtr.h"
@ -166,7 +165,6 @@ public:
CreateChild(const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell = nsnull,
nsIToolkit *aToolkit = nsnull,
nsWidgetInitData *aInitData = nsnull,
bool aForceUseIWidgetParent = false);
@ -236,7 +234,6 @@ protected:
const nsIntRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
nsDeviceContext *aContext,
nsIAppShell *aAppShell,
nsIToolkit *aToolkit,
nsWidgetInitData *aInitData);

View File

@ -1468,7 +1468,7 @@ TestApp::Run(void)
nsIWebBrowserChrome::CHROME_DEFAULT,
800 /*nsIAppShellService::SIZE_TO_CONTENT*/,
600 /*nsIAppShellService::SIZE_TO_CONTENT*/,
mAppShell, getter_AddRefs(mWindow));
getter_AddRefs(mWindow));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocShell> docShell;

View File

@ -48,7 +48,7 @@ interface nsIAppShell;
struct JSContext;
%}
[scriptable, uuid(361facd0-6e9a-4ff1-a0d4-450744cf0023)]
[scriptable, uuid(EBCD34E2-2E43-45C0-AAC8-E6F1C692B371)]
interface nsIAppShellService : nsISupports
{
/**
@ -66,8 +66,6 @@ interface nsIAppShellService : nsISupports
* tag in the XUL. Set to NS_SIZETOCONTENT to force
* the window to wrap to its contents.
* @param aInitialHeight like aInitialWidth, but subtly different.
* @param aAppShell a widget "appshell" (event processor) to associate
* with the new window
* @param aResult the newly created window is returned here.
*/
const long SIZE_TO_CONTENT = -1;
@ -75,11 +73,10 @@ interface nsIAppShellService : nsISupports
in nsIURI aUrl,
in PRUint32 aChromeMask,
in long aInitialWidth,
in long aInitialHeight,
in nsIAppShell aAppShell);
in long aInitialHeight);
[noscript]
void createHiddenWindow(in nsIAppShell aAppShell);
void createHiddenWindow();
void destroyHiddenWindow();

View File

@ -48,10 +48,9 @@
interface nsIDocShell;
interface nsIDocShellTreeItem;
interface nsIAppShell;
interface nsIXULBrowserWindow;
[scriptable, uuid(5869c5e5-743d-473c-bb71-41752146d373)]
[scriptable, uuid(CCF9E98A-E442-4061-9F74-94539DD9FE9E)]
interface nsIXULWindow : nsISupports
{
/**
@ -144,8 +143,7 @@ interface nsIXULWindow : nsISupports
* @param aChromeFlags see nsIWebBrowserChrome
* @return the newly minted window
*/
nsIXULWindow createNewWindow(in PRInt32 aChromeFlags,
in nsIAppShell aAppShell);
nsIXULWindow createNewWindow(in PRInt32 aChromeFlags);
attribute nsIXULBrowserWindow XULBrowserWindow;

View File

@ -111,7 +111,7 @@ NS_IMPL_ISUPPORTS2(nsAppShellService,
nsIObserver)
NS_IMETHODIMP
nsAppShellService::CreateHiddenWindow(nsIAppShell* aAppShell)
nsAppShellService::CreateHiddenWindow()
{
nsresult rv;
PRInt32 initialHeight = 100, initialWidth = 100;
@ -134,7 +134,7 @@ nsAppShellService::CreateHiddenWindow(nsIAppShell* aAppShell)
nsRefPtr<nsWebShellWindow> newWindow;
rv = JustCreateTopWindow(nsnull, url,
chromeMask, initialWidth, initialHeight,
PR_TRUE, aAppShell, getter_AddRefs(newWindow));
PR_TRUE, getter_AddRefs(newWindow));
NS_ENSURE_SUCCESS(rv, rv);
mHiddenWindow.swap(newWindow);
@ -167,7 +167,6 @@ nsAppShellService::CreateTopLevelWindow(nsIXULWindow *aParent,
PRUint32 aChromeMask,
PRInt32 aInitialWidth,
PRInt32 aInitialHeight,
nsIAppShell* aAppShell,
nsIXULWindow **aResult)
{
@ -179,7 +178,7 @@ nsAppShellService::CreateTopLevelWindow(nsIXULWindow *aParent,
nsWebShellWindow *newWindow = nsnull;
rv = JustCreateTopWindow(aParent, aUrl,
aChromeMask, aInitialWidth, aInitialHeight,
PR_FALSE, aAppShell, &newWindow); // addrefs
PR_FALSE, &newWindow); // addrefs
*aResult = newWindow; // transfer ref
@ -280,7 +279,6 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent,
PRInt32 aInitialWidth,
PRInt32 aInitialHeight,
bool aIsHiddenWindow,
nsIAppShell* aAppShell,
nsWebShellWindow **aResult)
{
*aResult = nsnull;
@ -381,8 +379,7 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent,
}
nsresult rv = window->Initialize(parent, center ? aParent : nsnull,
aAppShell, aUrl,
aInitialWidth, aInitialHeight,
aUrl, aInitialWidth, aInitialHeight,
aIsHiddenWindow, widgetInitData);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -67,7 +67,7 @@ protected:
nsIURI *aUrl,
PRUint32 aChromeMask,
PRInt32 aInitialWidth, PRInt32 aInitialHeight,
bool aIsHiddenWindow, nsIAppShell* aAppShell,
bool aIsHiddenWindow,
nsWebShellWindow **aResult);
PRUint32 CalculateWindowZLevel(nsIXULWindow *aParent, PRUint32 aChromeMask);

View File

@ -64,9 +64,6 @@
#include "nsGUIEvent.h"
#include "nsWidgetsCID.h"
#include "nsIWidget.h"
#include "nsIAppShell.h"
#include "nsIAppShellService.h"
#include "nsIDOMCharacterData.h"
#include "nsIDOMNodeList.h"
@ -149,7 +146,7 @@ NS_INTERFACE_MAP_END_INHERITING(nsXULWindow)
nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
nsIXULWindow* aOpener,
nsIAppShell* aShell, nsIURI* aUrl,
nsIURI* aUrl,
PRInt32 aInitialWidth,
PRInt32 aInitialHeight,
bool aIsHiddenWindow,
@ -209,7 +206,6 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
r, // Widget dimensions
nsWebShellWindow::HandleEvent, // Event handler function
nsnull, // Device context
aShell, // Application shell
nsnull, // nsIToolkit
&widgetInitData); // Widget initialization data
mWindow->GetClientBounds(r);

View File

@ -51,7 +51,6 @@
/* Forward declarations.... */
class nsIURI;
class nsIAppShell;
class nsWebShellWindow : public nsXULWindow,
public nsIWebProgressListener
@ -64,7 +63,7 @@ public:
// nsWebShellWindow methods...
nsresult Initialize(nsIXULWindow * aParent, nsIXULWindow * aOpener,
nsIAppShell* aShell, nsIURI* aUrl,
nsIURI* aUrl,
PRInt32 aInitialWidth, PRInt32 aInitialHeight,
bool aIsHiddenWindow,
nsWidgetInitData& widgetInitData);

View File

@ -1738,17 +1738,17 @@ NS_IMETHODIMP nsXULWindow::ExitModalLoop(nsresult aStatus)
// top-level function to create a new window
NS_IMETHODIMP nsXULWindow::CreateNewWindow(PRInt32 aChromeFlags,
nsIAppShell* aAppShell, nsIXULWindow **_retval)
nsIXULWindow **_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
if (aChromeFlags & nsIWebBrowserChrome::CHROME_OPENAS_CHROME)
return CreateNewChromeWindow(aChromeFlags, aAppShell, _retval);
return CreateNewContentWindow(aChromeFlags, aAppShell, _retval);
return CreateNewChromeWindow(aChromeFlags, _retval);
return CreateNewContentWindow(aChromeFlags, _retval);
}
NS_IMETHODIMP nsXULWindow::CreateNewChromeWindow(PRInt32 aChromeFlags,
nsIAppShell* aAppShell, nsIXULWindow **_retval)
nsIXULWindow **_retval)
{
nsCOMPtr<nsIAppShellService> appShell(do_GetService(NS_APPSHELLSERVICE_CONTRACTID));
NS_ENSURE_TRUE(appShell, NS_ERROR_FAILURE);
@ -1759,7 +1759,7 @@ NS_IMETHODIMP nsXULWindow::CreateNewChromeWindow(PRInt32 aChromeFlags,
appShell->CreateTopLevelWindow(this, nsnull, aChromeFlags,
nsIAppShellService::SIZE_TO_CONTENT,
nsIAppShellService::SIZE_TO_CONTENT,
aAppShell, getter_AddRefs(newWindow));
getter_AddRefs(newWindow));
NS_ENSURE_TRUE(newWindow, NS_ERROR_FAILURE);
@ -1770,7 +1770,7 @@ NS_IMETHODIMP nsXULWindow::CreateNewChromeWindow(PRInt32 aChromeFlags,
}
NS_IMETHODIMP nsXULWindow::CreateNewContentWindow(PRInt32 aChromeFlags,
nsIAppShell* aAppShell, nsIXULWindow **_retval)
nsIXULWindow **_retval)
{
nsCOMPtr<nsIAppShellService> appShell(do_GetService(NS_APPSHELLSERVICE_CONTRACTID));
NS_ENSURE_TRUE(appShell, NS_ERROR_FAILURE);
@ -1795,7 +1795,7 @@ NS_IMETHODIMP nsXULWindow::CreateNewContentWindow(PRInt32 aChromeFlags,
nsCOMPtr<nsIXULWindow> newWindow;
appShell->CreateTopLevelWindow(this, uri,
aChromeFlags, 615, 480, aAppShell,
aChromeFlags, 615, 480,
getter_AddRefs(newWindow));
NS_ENSURE_TRUE(newWindow, NS_ERROR_FAILURE);

View File

@ -134,10 +134,8 @@ protected:
NS_IMETHOD SizeShellTo(nsIDocShellTreeItem* aShellItem, PRInt32 aCX,
PRInt32 aCY);
NS_IMETHOD ExitModalLoop(nsresult aStatus);
NS_IMETHOD CreateNewChromeWindow(PRInt32 aChromeFlags,
nsIAppShell* aAppShell, nsIXULWindow **_retval);
NS_IMETHOD CreateNewContentWindow(PRInt32 aChromeFlags,
nsIAppShell* aAppShell, nsIXULWindow **_retval);
NS_IMETHOD CreateNewChromeWindow(PRInt32 aChromeFlags, nsIXULWindow **_retval);
NS_IMETHOD CreateNewContentWindow(PRInt32 aChromeFlags, nsIXULWindow **_retval);
void EnableParent(bool aEnable);
bool ConstrainToZLevel(bool aImmediate, nsWindowZ *aPlacement,