electron
electron copied to clipboard
refactor: prefer to inherit observer classes privately
Description of Change
We have a lot of classes that inherit from upstream observer classes to manage internal state, e.g. our AutofillDriverFactory inherits from content::WebContentsObserver so that it can know when to close popups.
Since WebContentsObserver inherits AutofillDriverFactory publicly, we are accidentally exposing a lot of public API (it's a 900+ LOC class!) to WebContentsObserver's clients. We shouldn't do that; it might accidentally get used.
This PR uses private inheritance instead..
Checklist
- [x] PR description included and stakeholders cc'd
- [x]
npm testpasses - [x] PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: none.