Closed Bug 120026 Opened 24 years ago Closed 24 years ago

Rework PPEmbed so its classes are less dependent on each other

Categories

(Core Graveyard :: Embedding: APIs, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: ccarlen, Assigned: ccarlen)

Details

Attachments

(2 files)

The design of PPEmbed is quite old and has some problems: (1) The nsIWebBrowserChrome impl is owned by the CBrowserWindow class, meaning there can be only 1 chrome for any number of web browsers in the window. We have since required in the embedding APIs that there must be 1 chrome for each browser. The patch makes that the case. CBrowserShell is a view class. It owns and creates both the nsIWebBrowser and the nsIWebBrowserChrome objects, ensuring a 1:1 relationship. (2) Because the CBrowserWindow class created the chrome, it was what tied together the chrome, the web browser, and the UI. Having to use these 3 classes together creates too many dependencies. It should be possible to stick an instance of CBrowserShell into any LWindow-derived window class. The patch makes that possible. It breaks direct references between the the browser, the view, and the window by using PowerPlant's LBroadcaster/LListener mechanism.
Attached patch patchSplinter Review
Adam - can you review from an embedding API perspective? Simon - can you sr? There's a chunk of this patch you've already sr'd - the throbber code which never made it in :-/
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
Comment on attachment 64972 [details] [diff] [review] patch The patch seems fairly sane from an embedding perspective so r=adamlock. I did notice that the impl of CBrowserChrome::SetDimensions & GetDimensions is wrong. It is possible for the caller to pass a combination of size & position flags but the impl assumes it's either one or the other when it could be both or none.
Attachment #64972 - Flags: review+
This impl of GetDimensions and SetDimensions allows getting/setting both position and size at once. Simon, can you sr?
QA Contact: mdunn → depstein
Comment on attachment 64972 [details] [diff] [review] patch sr=sfraser
Attachment #64972 - Flags: superreview+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified in Mozilla trunk 0.9.8 Gecko/20020209, patch checkins: PPBrowser.xml ContextMenus.r Throbber.r ApplIDs.h CBrowserApp.cp / .h CBrowserChrome.cpp / .h CBrowserShell.cpp / .h CBrowserWindow.cp / .h CThrobber.cpp / .h CWindowCreator.cpp / .h PPEmbedConfig.h
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: