Added the implementation for FocusAvailable. Added implementation for the new intrinsicSizing attribute. Moved over the NotifyObservers() call from nsWebShellWindow. r=hyatt

git-svn-id: svn://10.0.0.236/trunk@60697 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-02-14 06:13:12 +00:00
parent f886af1249
commit 4a3661ba6f

View File

@@ -42,6 +42,7 @@
#include "nsIIOService.h" #include "nsIIOService.h"
#include "nsIJSContextStack.h" #include "nsIJSContextStack.h"
#include "nsIMarkupDocumentViewer.h" #include "nsIMarkupDocumentViewer.h"
#include "nsIObserverService.h"
#include "nsIWindowMediator.h" #include "nsIWindowMediator.h"
// XXX Get rid of this // XXX Get rid of this
@@ -119,6 +120,20 @@ NS_IMETHODIMP nsXULWindow::GetDocShell(nsIDocShell** aDocShell)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsXULWindow::SetIntrinsicallySized(PRBool aIntrinsicallySized)
{
mIntrinsicallySized = aIntrinsicallySized;
return NS_OK;
}
NS_IMETHODIMP nsXULWindow::GetIntrinsicallySized(PRBool* aIntrinsicallySized)
{
NS_ENSURE_ARG_POINTER(aIntrinsicallySized);
*aIntrinsicallySized = mIntrinsicallySized;
return NS_OK;
}
NS_IMETHODIMP nsXULWindow::GetPrimaryContentShell(nsIDocShellTreeItem** NS_IMETHODIMP nsXULWindow::GetPrimaryContentShell(nsIDocShellTreeItem**
aDocShellTreeItem) aDocShellTreeItem)
{ {
@@ -511,8 +526,6 @@ NS_IMETHODIMP nsXULWindow::SetFocus()
NS_IMETHODIMP nsXULWindow::FocusAvailable(nsIBaseWindow* aCurrentFocus, NS_IMETHODIMP nsXULWindow::FocusAvailable(nsIBaseWindow* aCurrentFocus,
PRBool* aTookFocus) PRBool* aTookFocus)
{ {
//XXX First Check In
NS_ASSERTION(PR_FALSE, "Not Yet Implemented");
return NS_OK; return NS_OK;
} }
@@ -1034,6 +1047,31 @@ NS_IMETHODIMP nsXULWindow::CreateNewContentWindow(PRInt32 aChromeFlags,
return NS_OK; return NS_OK;
} }
// XXX can this switch now?
/// This should rightfully be somebody's PROGID?
// Will switch when the "app shell browser component" arrives.
static const char *prefix = "component://netscape/appshell/component/browser/window";
NS_IMETHODIMP nsXULWindow::NotifyObservers(const PRUnichar* aTopic,
const PRUnichar* aData)
{
nsCOMPtr<nsIObserverService> service(do_GetService(NS_OBSERVERSERVICE_PROGID));
if(!service)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIWebShellWindow>
removeme(do_QueryInterface(NS_STATIC_CAST(nsIXULWindow*, this)));
nsAutoString topic(prefix);
topic += ";";
topic += aTopic;
NS_ENSURE_SUCCESS(service->Notify(removeme, topic.GetUnicode(), aData),
NS_ERROR_FAILURE);
return NS_OK;
}
//***************************************************************************** //*****************************************************************************
// nsXULWindow: Accessors // nsXULWindow: Accessors
//***************************************************************************** //*****************************************************************************