Update viewer to use nsIWebBrowserSiteWindow. b=67723, sr=buster
git-svn-id: svn://10.0.0.236/trunk@86994 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a4c6556f22
commit
cad02c4d6f
@ -779,6 +779,7 @@ nsViewerApp::OpenWindow(PRUint32 aNewChromeMask, nsBrowserWindow*& aNewWindow)
|
||||
|
||||
bw->SetApp(this);
|
||||
bw->Init(mAppShell, nsRect(0, 0, 620, 400), aNewChromeMask, mAllowPlugins);
|
||||
bw->SetVisibility(PR_TRUE);
|
||||
|
||||
aNewWindow = bw;
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ NS_INTERFACE_MAP_BEGIN(nsWebBrowserChrome)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChrome)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIBaseWindow)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebBrowserSiteWindow)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIPrompt)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
NS_INTERFACE_MAP_END
|
||||
@ -195,8 +195,8 @@ NS_IMETHODIMP nsWebBrowserChrome::ShowAsModal()
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::IsWindowModal(PRBool *_retval)
|
||||
{
|
||||
NS_ERROR("Haven't Implemented this yet");
|
||||
return NS_ERROR_FAILURE;
|
||||
*_retval = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::ExitModalEventLoop(nsresult aStatus)
|
||||
@ -222,24 +222,9 @@ nsWebBrowserChrome::GetPersistence(PRBool* aPersistX, PRBool* aPersistY,
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsWebBrowserChrome::nsIBaseWindow
|
||||
// nsWebBrowserChrome::nsIWebBrowserSiteWindow
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::InitWindow(nativeWindow aParentNativeWindow,
|
||||
nsIWidget* parentWidget, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy)
|
||||
{
|
||||
// Ignore wigdet parents for now. Don't think those are a vaild thing to call.
|
||||
NS_ENSURE_SUCCESS(SetPositionAndSize(x, y, cx, cy, PR_FALSE), NS_ERROR_FAILURE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::Create()
|
||||
{
|
||||
NS_ASSERTION(PR_FALSE, "You can't call this");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::Destroy()
|
||||
{
|
||||
return mBrowserWindow->Destroy();
|
||||
@ -290,26 +275,7 @@ NS_IMETHODIMP nsWebBrowserChrome::GetPositionAndSize(PRInt32* aX, PRInt32* aY,
|
||||
return mBrowserWindow->GetPositionAndSize(aX, aY, aCX, aCY);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::Repaint(PRBool aForce)
|
||||
{
|
||||
return mBrowserWindow->Repaint(aForce);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::GetParentWidget(nsIWidget** aParentWidget)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aParentWidget);
|
||||
//XXX First Check In
|
||||
NS_ASSERTION(PR_FALSE, "Not Yet Implemented");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::SetParentWidget(nsIWidget* aParentWidget)
|
||||
{
|
||||
NS_ASSERTION(PR_FALSE, "You can't call this");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::GetParentNativeWindow(nativeWindow* aParentNativeWindow)
|
||||
NS_IMETHODIMP nsWebBrowserChrome::GetSiteWindow(void ** aParentNativeWindow)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aParentNativeWindow);
|
||||
|
||||
@ -318,42 +284,11 @@ NS_IMETHODIMP nsWebBrowserChrome::GetParentNativeWindow(nativeWindow* aParentNat
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::SetParentNativeWindow(nativeWindow aParentNativeWindow)
|
||||
{
|
||||
NS_ASSERTION(PR_FALSE, "You can't call this");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::GetVisibility(PRBool* aVisibility)
|
||||
{
|
||||
return mBrowserWindow->GetVisibility(aVisibility);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::SetVisibility(PRBool aVisibility)
|
||||
{
|
||||
return mBrowserWindow->SetVisibility(aVisibility);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::GetMainWidget(nsIWidget** aMainWidget)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aMainWidget);
|
||||
|
||||
//XXX First Check In
|
||||
NS_ASSERTION(PR_FALSE, "Not Yet Implemented");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::SetFocus()
|
||||
{
|
||||
return mBrowserWindow->SetFocus();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::FocusAvailable(nsIBaseWindow* aCurrentFocus,
|
||||
PRBool* aTookFocus)
|
||||
{
|
||||
return mBrowserWindow->FocusAvailable(aCurrentFocus, aTookFocus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowserChrome::GetTitle(PRUnichar** aTitle)
|
||||
{
|
||||
return mBrowserWindow->GetTitle(aTitle);
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
// Interfaces Needed
|
||||
#include "nsIWebBrowserChrome.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIWebBrowserSiteWindow.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
#include "nsTimer.h"
|
||||
@ -39,7 +39,7 @@
|
||||
class nsBrowserWindow;
|
||||
|
||||
class nsWebBrowserChrome : public nsIWebBrowserChrome,
|
||||
public nsIBaseWindow,
|
||||
public nsIWebBrowserSiteWindow,
|
||||
public nsIWebProgressListener,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIPrompt,
|
||||
@ -51,7 +51,7 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_DECL_NSIWEBBROWSERCHROME
|
||||
NS_DECL_NSIBASEWINDOW
|
||||
NS_DECL_NSIWEBBROWSERSITEWINDOW
|
||||
NS_DECL_NSIWEBPROGRESSLISTENER
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSIPROMPT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user