1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
23 * Chak Nanga <chak@netscape.com>
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 // mozembed.h : main header file for the MOZEMBED application
47 #endif // _MSC_VER > 1000
50 #error include 'stdafx.h' before including this file for PCH
53 #include "resource.h" // main symbols
55 /////////////////////////////////////////////////////////////////////////////
57 // See mozembed.cpp for the implementation of this class
63 class CTestEmbedApp
: public CWinApp
,
65 public nsIWindowCreator
,
66 public nsSupportsWeakReference
73 NS_DECL_NSIWINDOWCREATOR
75 CBrowserFrame
* CreateNewBrowserFrame(PRUint32 chromeMask
= nsIWebBrowserChrome::CHROME_ALL
,
76 PRInt32 x
= -1, PRInt32 y
= -1,
77 PRInt32 cx
= -1, PRInt32 cy
= -1,
78 PRBool bShowWindow
= PR_TRUE
);
79 void RemoveFrameFromList(CBrowserFrame
* pFrm
, BOOL bCloseAppOnLastFrame
= TRUE
);
81 void ShowDebugConsole();
82 BOOL
IsCmdLineSwitch(const char *pSwitch
, BOOL bRemove
= TRUE
);
84 nsresult
OverrideComponents();
87 // ClassWizard generated virtual function overrides
88 //{{AFX_VIRTUAL(CTestEmbedApp)
90 virtual BOOL
InitInstance();
91 virtual int ExitInstance();
92 virtual BOOL
OnIdle(LONG lCount
);
95 CObList m_FrameWndLst
;
97 CString m_strHomePage
;
98 inline BOOL
GetHomePage(CString
& strHomePage
) {
99 strHomePage
= m_strHomePage
;
103 int m_iStartupPage
; //0 = BlankPage, 1 = HomePage
104 inline int GetStartupPageMode() {
105 return m_iStartupPage
;
111 //{{AFX_MSG(CTestEmbedApp)
112 afx_msg
void OnAppAbout();
113 afx_msg
void OnNewBrowser();
114 afx_msg
void OnManageProfiles();
115 afx_msg
void OnEditPreferences();
116 // NOTE - the ClassWizard will add and remove member functions here.
117 // DO NOT EDIT what you see in these blocks of generated code !
119 DECLARE_MESSAGE_MAP()
122 BOOL
InitializeProfiles();
123 BOOL
CreateHiddenWindow();
124 nsresult
InitializePrefs();
125 nsresult
InitializeWindowCreator();
128 CProfileMgr
*m_ProfileMgr
;
132 /////////////////////////////////////////////////////////////////////////////
134 //{{AFX_INSERT_LOCATION}}
135 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
137 #endif // _TESTEMBED_H