teach top-level windows to show/hide and query visible state of menubars
git-svn-id: svn://10.0.0.236/trunk@34437 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
55cfe73afc
commit
771acb9497
@ -91,6 +91,9 @@ public:
|
||||
|
||||
NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax) = 0;
|
||||
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow) = 0;
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible) = 0;
|
||||
|
||||
NS_IMETHOD GetWebShell(nsIWebShell*& aResult) = 0;
|
||||
|
||||
// XXX minimize, maximize
|
||||
|
||||
@ -1632,6 +1632,19 @@ nsBrowserWindow::SetProgress(PRInt32 aProgress, PRInt32 aProgressMax)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserWindow::ShowMenuBar(PRBool aShow)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserWindow::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
*aVisible = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserWindow::WillLoadURL(nsIWebShell* aShell, const PRUnichar* aURL,
|
||||
nsLoadType aReason)
|
||||
@ -1799,6 +1812,7 @@ nsBrowserWindow::FocusAvailable(nsIWebShell* aFocusedWebShell, PRBool& aFocusTak
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
// Stream observer implementation
|
||||
|
||||
@ -93,6 +93,8 @@ public:
|
||||
NS_IMETHOD SetStatus(const PRUnichar* aStatus);
|
||||
NS_IMETHOD GetStatus(const PRUnichar** aResult);
|
||||
NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
NS_IMETHOD GetWebShell(nsIWebShell*& aResult);
|
||||
|
||||
// nsIStreamObserver
|
||||
|
||||
@ -121,7 +121,7 @@ static NS_DEFINE_IID(kIWebShellWindowIID, NS_IWEBSHELL_WINDOW_IID);
|
||||
static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID);
|
||||
static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
|
||||
static NS_DEFINE_IID(kIWebShellContainerIID, NS_IWEB_SHELL_CONTAINER_IID);
|
||||
static NS_DEFINE_IID(kIBrowserWindowIID, NS_IBROWSER_WINDOW_IID);
|
||||
static NS_DEFINE_IID(kIBrowserWindowIID, NS_IBROWSER_WINDOW_IID);
|
||||
|
||||
static NS_DEFINE_IID(kIAppShellServiceIID, NS_IAPPSHELL_SERVICE_IID);
|
||||
static NS_DEFINE_IID(kIAppShellIID, NS_IAPPSHELL_IID);
|
||||
@ -247,7 +247,7 @@ nsWebShellWindow::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if ( aIID.Equals(kIBrowserWindowIID) ) {
|
||||
if (aIID.Equals(kIBrowserWindowIID)) {
|
||||
*aInstancePtr = (void*) (nsIBrowserWindow*) this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
@ -2418,3 +2418,15 @@ NS_IMETHODIMP nsWebShellWindow::SetProgress(PRInt32 aProgress, PRInt32 aProgress
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShellWindow::ShowMenuBar(PRBool aShow)
|
||||
{
|
||||
return mWindow->ShowMenuBar(aShow);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShellWindow::IsMenuBarVisible(PRBool *aVisible)
|
||||
{
|
||||
return mWindow->IsMenuBarVisible(aVisible);
|
||||
}
|
||||
|
||||
@ -108,7 +108,6 @@ public:
|
||||
|
||||
NS_IMETHOD FocusAvailable(nsIWebShell* aFocusedWebShell, PRBool& aFocusTaken);
|
||||
|
||||
|
||||
// nsIWebShellWindow methods...
|
||||
NS_IMETHOD Show(PRBool aShow);
|
||||
NS_IMETHOD ShowModal();
|
||||
@ -224,6 +223,8 @@ public:
|
||||
NS_IMETHOD SetStatus(const PRUnichar* aStatus);
|
||||
NS_IMETHOD GetStatus(const PRUnichar** aResult);
|
||||
NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax);
|
||||
NS_IMETHOD ShowMenuBar(PRBool aShow);
|
||||
NS_IMETHOD IsMenuBarVisible(PRBool *aVisible);
|
||||
|
||||
protected:
|
||||
void ExecuteJavaScriptString(nsString& aJavaScript);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user