You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
roytam1 a5a18a6c3f bump KMELEON_VERSION, also port commit bd6ba759d4 and cc030e6cb7 to km74 4 years ago
..
Install fixup commit for tag 'kmeleon74' 8 years ago
JSBridge Fixs for VC2005 4 years ago
bmp_menu Fixs for VC2005 4 years ago
chrome fixup commit for tag 'kmeleon74' 8 years ago
components fixup commit for tag 'kmeleon74' 8 years ago
crash fixup commit for tag 'kmeleon74' 8 years ago
default fixup commit for tag 'kmeleon74' 8 years ago
external Fixs for VC2005 4 years ago
fullscreen Fixs for VC2005 4 years ago
gestures Fixs for VC2005 4 years ago
history history: fix build 4 years ago
ie_favorites Fixs for VC2005 4 years ago
kmeleon_winamp fixup commit for tag 'kmeleon74' 8 years ago
layers Fixs for VC2005 4 years ago
loader Fixs for VC2005 4 years ago
login Fixs for VC2005 4 years ago
macros Fixs for VC2005 4 years ago
macros2 Fixs for VC2005 4 years ago
ns_bookmarks Fixs for VC2005 4 years ago
op_hotlist Fixs for VC2005 4 years ago
privacy Fixs for VC2005 4 years ago
rebar_menu Fixs for VC2005 4 years ago
res fixup commit for tag 'kmeleon74' 8 years ago
sessions Fixs for VC2005 4 years ago
toolbars Fixs for VC2005 4 years ago
utils fixup commit for tag 'kmeleon74' 8 years ago
weasel fixup commit for tag 'kmeleon74' 8 years ago
About.cpp fixup commit for tag 'kmeleon74' 8 years ago
About.h fixup commit for tag 'kmeleon74' 8 years ago
AccelParser.cpp fixup commit for tag 'kmeleon74' 8 years ago
AccelParser.h fixup commit for tag 'kmeleon74' 8 years ago
AutoComplete.h fixup commit for tag 'kmeleon74' 8 years ago
BrowserFrameGlue.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserFrm.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserFrm.h fixup commit for tag 'kmeleon74' 8 years ago
BrowserFrmTab.cpp cherry-picked 2a0ab853eb : Fix high CPU usage with animated elements 4 years ago
BrowserFrmTab.h fixup commit for tag 'kmeleon74' 8 years ago
BrowserGlue.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserImpl.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserImpl.h fixup commit for tag 'kmeleon74' 8 years ago
BrowserImplCtxMenuLstnr.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserImplWebPrgrsLstnr.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserView.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserView.h fixup commit for tag 'kmeleon74' 8 years ago
BrowserViewFind.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserViewPanning.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserViewUtils.cpp fixup commit for tag 'kmeleon74' 8 years ago
BrowserWindow.cpp InjectJS: get return value from engine (requires JSCompartment fix in engine) 4 years ago
BrowserWindow.h cherry-picked 2a0ab853eb : Fix high CPU usage with animated elements 4 years ago
CmdLine.cpp fixup commit for tag 'kmeleon74' 8 years ago
CmdLine.h fixup commit for tag 'kmeleon74' 8 years ago
Components.cpp fixup commit for tag 'kmeleon74' 8 years ago
ContentDispatchChooser.cpp fixup commit for tag 'kmeleon74' 8 years ago
ContentDispatchChooser.h fixup commit for tag 'kmeleon74' 8 years ago
CookiePromptService.cpp fixup commit for tag 'kmeleon74' 8 years ago
CookiePromptService.h fixup commit for tag 'kmeleon74' 8 years ago
Cookies.h fixup commit for tag 'kmeleon74' 8 years ago
CookiesViewerDlg.cpp fixup commit for tag 'kmeleon74' 8 years ago
CookiesViewerDlg.h fixup commit for tag 'kmeleon74' 8 years ago
DPIaware.manifest fixup commit for tag 'kmeleon74' 8 years ago
DialogEx.h fixup commit for tag 'kmeleon74' 8 years ago
DialogUtils.cpp fixup commit for tag 'kmeleon74' 8 years ago
DialogUtils.h fixup commit for tag 'kmeleon74' 8 years ago
Dialogs.cpp fixup commit for tag 'kmeleon74' 8 years ago
Dialogs.h fixup commit for tag 'kmeleon74' 8 years ago
FavIconList.cpp Fixs for VC2005 4 years ago
FavIconList.h Fixs for VC2005 4 years ago
FontPackageHandler.cpp fixup commit for tag 'kmeleon74' 8 years ago
FontPackageHandler.h fixup commit for tag 'kmeleon74' 8 years ago
GenKeyPairDialogs.cpp fixup commit for tag 'kmeleon74' 8 years ago
GenKeyPairDialogs.h fixup commit for tag 'kmeleon74' 8 years ago
GenericDlg.cpp fixup commit for tag 'kmeleon74' 8 years ago
GenericDlg.h fixup commit for tag 'kmeleon74' 8 years ago
HiddenWnd.cpp cherry-picked 5f4f965585 : Fix crash when closing windows session 4 years ago
HiddenWnd.h fixup commit for tag 'kmeleon74' 8 years ago
IBrowserFrameGlue.h fixup commit for tag 'kmeleon74' 8 years ago
KMeleon.dsp fixup commit for tag 'kmeleon74' 8 years ago
KMeleon.dsw fixup commit for tag 'kmeleon74' 8 years ago
KMeleon.sln Fixs for VC2005 4 years ago
KMeleon.vcproj Fixs for VC2005 4 years ago
KMeleon.vcxproj fixup commit for tag 'kmeleon74' 8 years ago
KMeleon.vcxproj.filters fixup commit for tag 'kmeleon74' 8 years ago
KMeleon10.sln fixup commit for tag 'kmeleon74' 8 years ago
KMeleonConst.h bump KMELEON_VERSION, also port commit bd6ba759d4 and cc030e6cb7 to km74 4 years ago
KmAbout.cpp fixup commit for tag 'kmeleon74' 8 years ago
KmAbout.h fixup commit for tag 'kmeleon74' 8 years ago
KmAppInfo.cpp bump KMELEON_VERSION, also port commit bd6ba759d4 and cc030e6cb7 to km74 4 years ago
KmAppInfo.h fixup commit for tag 'kmeleon74' 8 years ago
KmCommand.cpp fixup commit for tag 'kmeleon74' 8 years ago
KmCommand.h fixup commit for tag 'kmeleon74' 8 years ago
KmFileLocProvider.cpp fixup commit for tag 'kmeleon74' 8 years ago
KmFileLocProvider.h fixup commit for tag 'kmeleon74' 8 years ago
KmMenu.cpp fixup commit for tag 'kmeleon74' 8 years ago
KmMenu.h fixup commit for tag 'kmeleon74' 8 years ago
LangParser.cpp fixup commit for tag 'kmeleon74' 8 years ago
LangParser.h fixup commit for tag 'kmeleon74' 8 years ago
LocalesUtils.h fixup commit for tag 'kmeleon74' 8 years ago
Log.h fixup commit for tag 'kmeleon74' 8 years ago
MenuParser.cpp fixup commit for tag 'kmeleon74' 8 years ago
MenuParser.h fixup commit for tag 'kmeleon74' 8 years ago
MfcEmbed.cpp cherry-picked 5f4f965585 : Fix crash when closing windows session 4 years ago
MfcEmbed.h fixup commit for tag 'kmeleon74' 8 years ago
MfcEmbed.rc fixup commit for tag 'kmeleon74' 8 years ago
MostRecentUrls.cpp fixup commit for tag 'kmeleon74' 8 years ago
MostRecentUrls.h fixup commit for tag 'kmeleon74' 8 years ago
MozUtils.cpp fixup commit for tag 'kmeleon74' 8 years ago
MozUtils.h Fixs for VC2005 4 years ago
NSSDialogs.cpp Fixs for VC2005 4 years ago
NSSDialogs.h fixup commit for tag 'kmeleon74' 8 years ago
Parser.cpp fixup commit for tag 'kmeleon74' 8 years ago
Parser.h fixup commit for tag 'kmeleon74' 8 years ago
PasswordViewerDlg.cpp fixup commit for tag 'kmeleon74' 8 years ago
PasswordViewerDlg.h fixup commit for tag 'kmeleon74' 8 years ago
Permissions.cpp fixup commit for tag 'kmeleon74' 8 years ago
Permissions.h fixup commit for tag 'kmeleon74' 8 years ago
Plugins.cpp fixup commit for tag 'kmeleon74' 8 years ago
Plugins.h fixup commit for tag 'kmeleon74' 8 years ago
Preferences.cpp fixup commit for tag 'kmeleon74' 8 years ago
Preferences.h fixup commit for tag 'kmeleon74' 8 years ago
PreferencesDlg.cpp fixup commit for tag 'kmeleon74' 8 years ago
PrintProgressDialog.cpp fixup commit for tag 'kmeleon74' 8 years ago
PrintProgressDialog.h fixup commit for tag 'kmeleon74' 8 years ago
PrintSetupDialog.cpp fixup commit for tag 'kmeleon74' 8 years ago
PrintSetupDialog.h fixup commit for tag 'kmeleon74' 8 years ago
ProfileMgr.cpp fixup commit for tag 'kmeleon74' 8 years ago
ProfileMgr.h fixup commit for tag 'kmeleon74' 8 years ago
ProfilesDlg.cpp fixup commit for tag 'kmeleon74' 8 years ago
ProfilesDlg.h fixup commit for tag 'kmeleon74' 8 years ago
PromptService.cpp fixup commit for tag 'kmeleon74' 8 years ago
PromptService.h fixup commit for tag 'kmeleon74' 8 years ago
README.TXT fixup commit for tag 'kmeleon74' 8 years ago
ReBarEx.cpp Fixs for VC2005 4 years ago
ReBarEx.h fixup commit for tag 'kmeleon74' 8 years ago
SaveAsHandler.cpp fixup commit for tag 'kmeleon74' 8 years ago
SaveAsHandler.h fixup commit for tag 'kmeleon74' 8 years ago
SideBar.cpp fixup commit for tag 'kmeleon74' 8 years ago
SideBar.h fixup commit for tag 'kmeleon74' 8 years ago
StdAfx.cpp fixup commit for tag 'kmeleon74' 8 years ago
StdAfx.h Fixs for VC2005 4 years ago
TabReBar.cpp Fixs for VC2005 4 years ago
TabReBar.h fixup commit for tag 'kmeleon74' 8 years ago
ToolBarEx.cpp fixup commit for tag 'kmeleon74' 8 years ago
ToolBarEx.h fixup commit for tag 'kmeleon74' 8 years ago
Tooltips.cpp fixup commit for tag 'kmeleon74' 8 years ago
Tooltips.h fixup commit for tag 'kmeleon74' 8 years ago
TooltipsProvider.cpp fixup commit for tag 'kmeleon74' 8 years ago
TooltipsProvider.h fixup commit for tag 'kmeleon74' 8 years ago
UnknownContentTypeHandler.cpp Fixs for VC2005 4 years ago
UnknownContentTypeHandler.h fixup commit for tag 'kmeleon74' 8 years ago
Utils.cpp fixup commit for tag 'kmeleon74' 8 years ago
Utils.h fixup commit for tag 'kmeleon74' 8 years ago
VisualStylesXP.cpp fixup commit for tag 'kmeleon74' 8 years ago
VisualStylesXP.h fixup commit for tag 'kmeleon74' 8 years ago
comctl6.manifest fixup commit for tag 'kmeleon74' 8 years ago
defineMap.cpp fixup commit for tag 'kmeleon74' 8 years ago
findskin.cpp fixup commit for tag 'kmeleon74' 8 years ago
kmeleon_plugin.h fixup commit for tag 'kmeleon74' 8 years ago
nsGenericFactory.cpp Fixs for VC2005 4 years ago
nsGenericFactory.h Fixs for VC2005 4 years ago
nsPrintSettingsImpl.cpp fixup commit for tag 'kmeleon74' 8 years ago
nsPrintSettingsImpl.h fixup commit for tag 'kmeleon74' 8 years ago
nsProfileDirServiceProvider.cpp fixup commit for tag 'kmeleon74' 8 years ago
nsProfileLock.cpp fixup commit for tag 'kmeleon74' 8 years ago
nsProfileLock.h fixup commit for tag 'kmeleon74' 8 years ago
nsProfileStringTypes.h fixup commit for tag 'kmeleon74' 8 years ago
qsort.cpp fixup commit for tag 'kmeleon74' 8 years ago
resource.h Fixs for VC2005 4 years ago
strconv.h fixup commit for tag 'kmeleon74' 8 years ago
stristr.cpp fixup commit for tag 'kmeleon74' 8 years ago
urlbar.cpp cherry-picked e3932cb374 : Fix losing font in autocomplete result 4 years ago
urlbar.h cherry-picked e3932cb374 : Fix losing font in autocomplete result 4 years ago
utf.h fixup commit for tag 'kmeleon74' 8 years ago
version.h fixup commit for tag 'kmeleon74' 8 years ago
winEmbedFileLocProvider.cpp fixup commit for tag 'kmeleon74' 8 years ago
winEmbedFileLocProvider.h fixup commit for tag 'kmeleon74' 8 years ago

README.TXT

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Chak Nanga <chak@netscape.com>
*/

This sample shows how to embed Mozilla from within
an MFC Windows application

Mainly demonstrates the use of the following interfaces:

nsIWebBrowserChrome
nsIWebBrowserSiteWindow
nsIWebProgressListener
nsIContextMenuListener
nsIPrompt

General Overview:
-----------------

1. The MfcEmbedApp creates BrowserFrames

2. BrowserFrame creates the toolbar, statusbar, URLbar
BrowserView etc.
BrowserFrames implement the IBrowserFrameGlue interface
using which new BrowserFrames can be created, statusbar
updated etc.

3. BrowserView creates the embeddable browser instance and
manages user interaction such as URL navigation etc.
BrowserView connects the BrowserImpl with the BrowserFrame
via the IBrowserFrameGlue interface

4. BrowserImpl implements the set of required/optional Gecko
embedding interfaces


Start by first looking at MfcEmbed.cpp

Files:

StdAfx.h
- Includes the required Mozilla header files

MfcEmbed.cpp
- CWinApp derived class
- Creates the browser's main frame window etc
using the CreateNewBrowserFrame() and loads
the HomePage
- Makes the required NS_InitEmbedding() and the
NS_TermEmbedding() calls in the app's InitInstance()
and ExitInstance() functions
- Keeps track of the list of new BrowserFrames created
which it cleans up properly in ExitInstance()

BrowserFrm.cpp
- This is the browser's Frame window i.e. the one with the
"chrome" - with the toolbar, urlbar etc.
- Creates the toolbar, URLbar, statusbar, progressbar
also the browser's view window.

BrowserFrameGlue.cpp
- Implements the IBrowserFrameGlue interface. This interface
contains platform specific implementations of functions to
update the statusbar, creating new browser frames etc. Embedded
browser's callbacks use this interface when needed

BrowserView.cpp
- Creates the embedded browser object and handles most aspects
of the embedded browser interactions - like URL navigation,
clipboard interactions etc
- Also has code to keep the menu/toolbar/statusbar UI items up
to date
- It's the view which conntects the BrowserFrame to the BrowserImpl
(see below) by passing it the pointer to IBrowserFrameGlue

BrowserImpl*.cpp
- Implements the required and/or optional embedded browser
interfaces
(BrowserImpl.cpp implements the set of interfaces which
are required by Gecko of all embedding apps. The other
interfaces implemented in the BrowserImpl*.cpp files are
optional)

- Calls on the statusbar/progressbar update functions exposed
via the IBrowserFrameGlue in response to the nsIProgressListener
interface callbacks

Dialogs.cpp
- Contains dialog box code for displaying Prompts, getting
passwords, getting username/passwords etc

winEmbedFileLocProvider.cpp, ProfilesDlg.cpp, ProfileMgr.cpp
- Profile management related code (by Conrad Carlen)

MfcEmbed.htm
- This is a simple test harness for excercising some of the
implemented interfaces . For ex, the nsIWebBrowserChrome.
- Open the file in mfcemed by typing the following in it's
location bar. For ex:

file:///c:/tmp/mfcembed.htm
- Read/Click on the links on that page more info
- This test page is just a start and will add more test
case to it over time


makefile.win
- We define "_AFXDLL" and for the compiler and specify
"-SUBSYSTEM:windows" for the linker using LCFLAGS and
LLFLAGS, respectively

mfcembed.dsp and mfcembed.dsw
- These VisualStudio workspace/project files can be used
to open/build this sample inside of the VC++ IDE