Fixed control after changes to web shell caused compile errors
git-svn-id: svn://10.0.0.236/trunk@57723 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -79,7 +79,7 @@ CMozillaBrowser::CMozillaBrowser()
|
||||
|
||||
// Initialize layout interfaces
|
||||
m_pIWebShell = nsnull;
|
||||
|
||||
m_pIWebShellWin = nsnull;
|
||||
m_pIPref = nsnull;
|
||||
m_pIServiceManager = nsnull;
|
||||
|
||||
@@ -227,9 +227,14 @@ LRESULT CMozillaBrowser::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
|
||||
}
|
||||
|
||||
// Destroy layout...
|
||||
if (m_pIWebShellWin != nsnull)
|
||||
{
|
||||
m_pIWebShellWin->Destroy();
|
||||
NS_RELEASE(m_pIWebShellWin);
|
||||
}
|
||||
|
||||
if (m_pIWebShell != nsnull)
|
||||
{
|
||||
m_pIWebShell->Destroy();
|
||||
NS_RELEASE(m_pIWebShell);
|
||||
}
|
||||
|
||||
@@ -254,10 +259,11 @@ LRESULT CMozillaBrowser::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& b
|
||||
NG_TRACE_METHOD(CMozillaBrowser::OnSize);
|
||||
|
||||
// Pass resize information down to the WebShell...
|
||||
if (m_pIWebShell)
|
||||
if (m_pIWebShellWin)
|
||||
{
|
||||
m_pIWebShell->SetBounds(0, 0, LOWORD(lParam), HIWORD(lParam));
|
||||
}
|
||||
m_pIWebShellWin->SetPosition(0, 0);
|
||||
m_pIWebShellWin->SetSize(LOWORD(lParam), HIWORD(lParam), PR_TRUE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -674,6 +680,8 @@ HRESULT CMozillaBrowser::CreateWebShell()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pIWebShell->QueryInterface(kIBaseWindowIID, (void **) &m_pIWebShellWin);
|
||||
|
||||
// Register the cookie service
|
||||
NS_WITH_SERVICE(nsICookieService, cookieService, kCookieServiceCID, &rv);
|
||||
if (NS_FAILED(rv) || (cookieService == nsnull)) {
|
||||
@@ -711,7 +719,7 @@ HRESULT CMozillaBrowser::CreateWebShell()
|
||||
m_pIWebShell->SetDocLoaderObserver((nsIDocumentLoaderObserver*) m_pWebShellContainer);
|
||||
m_pIWebShell->SetWebShellType(nsWebShellContent);
|
||||
|
||||
m_pIWebShell->Show();
|
||||
m_pIWebShellWin->SetVisibility(PR_TRUE);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1848,7 +1856,7 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::get_LocationName(BSTR __RPC_FAR *Loca
|
||||
|
||||
// Get the url from the web shell
|
||||
nsXPIDLString szLocationName;
|
||||
m_pIWebShell->GetTitle(getter_Copies(szLocationName));
|
||||
m_pIWebShellWin->GetTitle(getter_Copies(szLocationName));
|
||||
if (nsnull == (const PRUnichar *) szLocationName)
|
||||
{
|
||||
RETURN_E_UNEXPECTED();
|
||||
|
||||
@@ -303,6 +303,7 @@ protected:
|
||||
|
||||
// Mozilla interfaces
|
||||
nsIWebShell * m_pIWebShell;
|
||||
nsIBaseWindow * m_pIWebShellWin;
|
||||
nsIPref * m_pIPref;
|
||||
nsIEditor * m_pEditor;
|
||||
nsIServiceManager * m_pIServiceManager;
|
||||
|
||||
@@ -98,6 +98,7 @@ typedef long int32;
|
||||
#include "nsIPref.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIBrowserWindow.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIPresShell.h"
|
||||
|
||||
@@ -28,6 +28,7 @@ NS_DEFINE_IID(kHTMLEditorCID, NS_HTMLEDITOR_CID);
|
||||
NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID);
|
||||
|
||||
// Interface IDs
|
||||
NS_DEFINE_IID(kIBaseWindowIID, NS_IBASEWINDOW_IID);
|
||||
NS_DEFINE_IID(kIBrowserWindowIID, NS_IBROWSER_WINDOW_IID);
|
||||
NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID);
|
||||
NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID);
|
||||
|
||||
@@ -31,6 +31,7 @@ NS_EXTERN_IID(kHTMLEditorCID);
|
||||
NS_EXTERN_IID(kCookieServiceCID);
|
||||
|
||||
// Interface IDs
|
||||
NS_EXTERN_IID(kIBaseWindowIID);
|
||||
NS_EXTERN_IID(kIBrowserWindowIID);
|
||||
NS_EXTERN_IID(kIEventQueueServiceIID);
|
||||
NS_EXTERN_IID(kIDocumentViewerIID);
|
||||
|
||||
Reference in New Issue
Block a user