IE 4.0 Shell Architecture

Download Report

Transcript IE 4.0 Shell Architecture

IE 4.0 Shell Architecture
Satoshi Nakajima
IE 4.0
8 Nov., 1996
IE 4.0 Technology Exchange Meeting
Topic
Scope of this presentation
• Covered in this presentation
Browser, Shell Explorer, WebBar, Asynchronos
Navigation, UI negotiation
• Not covered
WebView, Automation Model, Desktop News
Topic
Browser Evolution
• How Win95 Explorer works
Shell Namespace, IShellFolder, pidl, IShellView,
IShellBrowser
• How IE 3.0 browser works
DocObject
• How IE 4.0 browser works
WebBar
Advanced topics
• Layout negotiation
• How asynchronous navigation works
Topic
Shell Name Space
WIN95
• Shell NameSpace
Hierarchical name space, which the user can
browse with the Shell Explorer
• Shell Items
Items in the shell name space -- drives, files,
directories, servers, shares, MyComputer,
ControlPanel, ControlPanel items, Printer
Folder, Printers.
WIN95
IShellFolder
IShellFolder
Explorer
Shell Folder
IShellFolder allows you to
•
•
•
•
•
Enumerate items in it (returns pidls)
Parse display name (name to pidl)
Get display name (pidl to name)
Bind to an item
Get UI objects (menu, drop target, …)
What is a “pidl”?
WIN95
An identifier of an item in the shell name
space.
SHITEMID
PIDL
cb
SHITEMID1
opaque bits
SHITEMID2
0
A pidl to “C:\tmp\foo.htm”
cb1 MyComputer cb2 C:\ cb3 tmp cb4 Foo.htm
0
Remember that pidls are opaque!
WIN95
Binding to IShellFolder
SHGetDesktopFolder
IShellFolder
Desktop
ISF::BindToObject
cb1 MyComputer
0
IShellFolder
MyComputer
ISF::BindToObject cb2 C:\ cb3 tmp 0
IShellFolder
C:\tmp
IShellBrowser / IShellView
Explorer
IShellBrowser
IShellFolder
WIN95
C:\tmp (folder)
ISF::CreateViewObject
IShellView
C:\tmp (view)
IShellBrowser
WIN95
It allows the shell view to
• Merge Menus
• Add Toolbar buttons
• Put some status text
• Translate accelerators
Not OLE’s In-place UI negotiation!
WIN95
DefView
A default implementation of IShellView on
top of IShellFolder.
IShellView
DefView
IShellFolder
C:\tmp (folder)
ISF::CreateViewObject
SHCreateShellFolderView(psf)
WIN95
Extended Name Space
ISVs can plug-in their own hierarchical
name space
IShellFolder
Explorer
Desktop
MyComputer
NetHood
MSN
Athena
Zip Folder
IE 3.0
Internet Explorer 3.0
CShellBrowser
IShellFolder
Http://msw
IShellBrowser
ISF::CreateViewObject
IShellView
C:\tmp
Wedge
IOleDocumentSite
IOleDocument
HTMLObj
Word/Excel
IE 3.0
CShellBrowser
CShellBrowser is a mini-Explorer
CBaseBrowser
subclass
CShellBrowser
IShellBrowser
IOleCommandTarget
IOleContainer
IOleInPlaceUIWindow
IDispatch
IWebBrowserApp
IHlinkFrame
ITargetFrame
IE 3.0
“Wedge”
CShellDocView
IShellView
IOleCommandTarget
CDocObjectHost
IOleDocumentSite
IOleSite
IOleInPlaceSite
IOleCommandTarget
IServiceProvider
IE 3.0
WebBrowserOC
IOleObject
IViewObject2
IPersistSreamInit
IOleControl
IWebBrowser
etc.
CWebBrowserOC
CWebBrowserSB
CBaseBrowser
subclass
IShellBrowser
IOleCommandTarget
IOleContainer
IOleInPlaceUIWindow
Frame Set
IE 3.0
CShellBrowser
Wedge
Site
HTLMObj
IShellBrowser
IShellView
IOleDocumentSite
IOleDocument
Site
IOleClientSite
IOleObject
CWebBrowserOC
CWebBrowserSB
Wedge
HTMLObj
CWebBrowserOC
CWebBrowserSB
Wedge
HTMLObj
IShellBrowser
IShellView
IOleDocumentSite
IOleDocument
IE 4.0
IE 4.0 Explorer
IE 4.0 Explorer, Folder and Desktop are
based on IE 3.0 browser code.
CBaseBrowser
CWebBrowserOC
CWebBrowserSB
subclass
subclass
CShellBrowser
subclass
CDesktopBrowser
CExplorerBrwsr
IE 4.0
WebBar
WebBar is a dockable browser, which can
be docked on a browser or the desktop
CBaseBrowser
subclass
IDockingWindowSite
CShellBrowser
CDesktopBrwsr
IDockingWindow
CWebBar
OCHost
WebBrowserOC
Layout Negotiation
IE 4.0
Effective Client Area
Internet toolbar takes this border space
Effective Client Area
CBaseBrowser::_GetEffectiveClientArea
IDockingWindowSite::GetBorderDW for the
internet toolbar returns this rectangle.
IE 4.0
ISTBS::GetBorderST
IDockingWindowSite::GetBorderDW
for the scope pane returns this
rectangle.
The scope pane takes the border
space from left and top.
IE 4.0
Shell View Rectangle
Excel’s formular bar
CBaseBrowser::_GetViewRect
IOleInPlaceUIWindow::GetBorder
returns this rectangle.
IE 4.0
IE 4.0
Shell View Window Rectangle
CBaseBrowser::_GetViewWindo
wRect
IOleDocumentView::SetRect will
be called with this rectangle.
Asynchronous Navigation
IE 4.0
1
CShellBrowser
_psv
_psvPending
Wedge1
2
Wedge2
3
URL moniker
HTLMView1
1. IHlinkFrame::Navigate called
2. Create a new Wedge (Wedge2)
3. Create URL moniker and call BindToObject
(Note that HTMLView1 remains UIActive)
Asynchronous Navigation
IE 4.0
CShellBrowser
_psv
_psvPending
Wedge1
Wedge2
6
HTLMView2
5
URL moniker
HTLMView1
4
4. Moniker sends a HTTP request to the server
5. Server responds
6. Moniker create another HTML view
(Note that HTMLView1 is still UIActive)
Asynchronous Navigation
IE 4.0
CShellBrowser
_psv
_psvPending
Wedge1
9
Wedge2
8
7
URL moniker
HTLMView1
HTLMView2
7. Moniker calls Wedge’s OnObjectAvailable
8. Wedge2 gets the pointer to HTML view
9. Wedge2 notifies it to the browser
(Note that HTMLView1 is still UIActive)
Asynchronous Navigation
CShellBrowser
10
_psv
11
Wedge2
Wedge1
IE 4.0
12
HTLMView2
HTLMView1
10. Deactivate and release the current view
11. Activate the Wedge2
12. UIActivate HTMLView2
IE 4.0
More Information
• http://ohserv/users/satona
• nt\private\shell\docs (\\trango\slmadd)
SHIP IT!
Robustness
Performance
Bug fixes