Add -chrome argument to mfcembed so it can load chrome content. b=111627 r=chak@netscape.com sr=rpotts@netscape.com

git-svn-id: svn://10.0.0.236/trunk@109010 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
locka%iol.ie
2001-11-27 20:09:39 +00:00
parent b992807046
commit 1c0e19032f
3 changed files with 9 additions and 1 deletions

View File

@@ -228,7 +228,11 @@ HRESULT CBrowserView::CreateBrowser()
nsCOMPtr<nsIDocShellTreeItem> dsti = do_QueryInterface(mWebBrowser, &rv);
if(NS_FAILED(rv))
return rv;
dsti->SetItemType(nsIDocShellTreeItem::typeContentWrapper);
// If the browser window hosting chrome or content?
dsti->SetItemType(((CMfcEmbedApp *)AfxGetApp())->m_bChrome ?
nsIDocShellTreeItem::typeChromeWrapper :
nsIDocShellTreeItem::typeContentWrapper);
// Create the real webbrowser window

View File

@@ -107,6 +107,7 @@ CMfcEmbedApp::CMfcEmbedApp() :
m_iStartupPage = 0;
m_bChrome = FALSE;
}
CMfcEmbedApp theApp;
@@ -149,6 +150,8 @@ void CMfcEmbedApp::ParseCmdLine()
// Show Debug Console?
if(IsCmdLineSwitch("-console"))
ShowDebugConsole();
if(IsCmdLineSwitch("-chrome"))
m_bChrome = TRUE;
}
/* Some Gecko interfaces are implemented as components, automatically

View File

@@ -95,6 +95,7 @@ public:
CObList m_FrameWndLst;
BOOL m_bChrome;
CString m_strHomePage;
inline BOOL GetHomePage(CString& strHomePage) {
strHomePage = m_strHomePage;