User:Jminta: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(initial stab at gfxcontext migration list)
(private browsing sketch)
Line 1: Line 1:
== nsIRenderingContext drawing ==
== Private Browsing ==
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsImageMap.cpp#444 RectArea::Draw]
Goals:
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsImageMap.cpp#565 PolyArea::Draw]
* Implement "private browsing sessions"
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsImageMap.cpp#686 CircleArea::Draw]
* Unify private sessions with clear private data requests
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsHTMLCanvasFrame.cpp#176  nsHTMLCanvasFrame::PaintCanvas] (maybe?)
* Allow for extensions that manage private data to easily integrate with privacy settings.
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsFrameSetFrame.cpp#1696 nsHTMLFramesetBorderFrame::PaintBorder]
Implementation:
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsFrameSetFrame.cpp#1868 nsDisplayFramesetBlank::Paint]
* relies on nsIObserverService and nsIObservers
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsPageFrame.cpp#473 nsPageFrame::PaintPrintPreviewBackground]
* supplements current privacy methods in nsIBrowserGlue
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsFrame.cpp#5796 nsImageFrame::DisplayAltFeedback]
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsImageFrame.cpp#1175 nsImageFrame::PaintImage]


== nsIRenderingContext font drawing ==
=== Private Browsing session ===
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsPageFrame.cpp#350 nsPageFrame::DrawHeaderFooter]
* Each component with private data should add observers for the <code>privacy-status-changed</code> topic
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsImageFrame.cpp#936 nsImageFrame::DisplayAltText]
* The observer service will fire this topic when the privacy status changes
*[http://mxr.mozilla.org/seamonkey/source/layout/generic/nsBulletFrame.cpp#378 nsBulletFrame::PaintBullet]
** The subject for this topic will either be "private" or "normal", corresponding to the new privacy status beginning.
** Components with private data will likely want to cache the current privacy status
* We need some sort of XPCOM service broadcasting the current privacy status (with a boolean isPrivateSession attribute)
** We can stick with nsIBrowserGlue (which has sanitize()) or move to a real privacy service
 
=== Clearing Private Data ===
*Each element in the privacy preferences should be associated with a privacy-subject. (via a privacysubject attribute)
** Extensions should overlay this window and listen for their subject
*When "clear private data" is called via any method (prefs or main browser chrome), an nsIObserverService notification will go out with the <code>clear-private-data</code> topic for each privacy-subject to be cleared.
** The subject of each of these notifications will be the associated privacy topic.
** This will obsolete the <code>browser:purge-session-history</code> topic.
 
=== Private data collections ===
The following places keep private data that should be ignored during private sessions:
*History
*Cookies
*Cache
*SessionStore
*ErrorConsole
*AutoComplete (forms)
*Download Manager
*Password Manager?
*Popup-blocker
*Image-blocker
*Certificates
 
=== Notes ===
I'm not entirely convinced about the idea of using nsIObserverService. If we're going to go to the length of making a real privacy interface, we might as well allow interested components to register nsIObservers directly with that service. I think this would help performance a bit, as we avoid adding more weight to nsIObserverService, but I could be wrong.

Revision as of 00:41, 1 August 2007

Private Browsing

Goals:

  • Implement "private browsing sessions"
  • Unify private sessions with clear private data requests
  • Allow for extensions that manage private data to easily integrate with privacy settings.

Implementation:

  • relies on nsIObserverService and nsIObservers
  • supplements current privacy methods in nsIBrowserGlue

Private Browsing session

  • Each component with private data should add observers for the privacy-status-changed topic
  • The observer service will fire this topic when the privacy status changes
    • The subject for this topic will either be "private" or "normal", corresponding to the new privacy status beginning.
    • Components with private data will likely want to cache the current privacy status
  • We need some sort of XPCOM service broadcasting the current privacy status (with a boolean isPrivateSession attribute)
    • We can stick with nsIBrowserGlue (which has sanitize()) or move to a real privacy service

Clearing Private Data

  • Each element in the privacy preferences should be associated with a privacy-subject. (via a privacysubject attribute)
    • Extensions should overlay this window and listen for their subject
  • When "clear private data" is called via any method (prefs or main browser chrome), an nsIObserverService notification will go out with the clear-private-data topic for each privacy-subject to be cleared.
    • The subject of each of these notifications will be the associated privacy topic.
    • This will obsolete the browser:purge-session-history topic.

Private data collections

The following places keep private data that should be ignored during private sessions:

  • History
  • Cookies
  • Cache
  • SessionStore
  • ErrorConsole
  • AutoComplete (forms)
  • Download Manager
  • Password Manager?
  • Popup-blocker
  • Image-blocker
  • Certificates

Notes

I'm not entirely convinced about the idea of using nsIObserverService. If we're going to go to the length of making a real privacy interface, we might as well allow interested components to register nsIObservers directly with that service. I think this would help performance a bit, as we avoid adding more weight to nsIObserverService, but I could be wrong.