Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
PrefObserver Class Reference
Inheritance diagram for PrefObserver:
Inheritance graph
Collaboration diagram for PrefObserver:
Collaboration graph

List of all members.

Public Member Functions

 PrefObserver ()
nsresult Subscribe ()
nsresult Unsubscribe ()
PRUint32 GetHostingFlags () const
void observe (in nsISupports aSubject, in string aTopic, in wstring aData)
 Observe will be called when there is a notification for the topic |aTopic|.

Static Public Attributes

sPrefObserver = nsnull

Protected Member Functions

virtual ~PrefObserver ()
void Sync (nsIPrefBranch *aPrefBranch)

Protected Attributes

PRUint32 mHostingFlags
nsCOMPtr< nsIPrefBranch2mPrefBranch

Detailed Description

Definition at line 65 of file PrefObserver.cpp.

Constructor & Destructor Documentation

Definition at line 96 of file PrefObserver.cpp.

Here is the call graph for this function:

PrefObserver::~PrefObserver ( ) [protected, virtual]

Definition at line 104 of file PrefObserver.cpp.


Member Function Documentation

Definition at line 188 of file PrefObserver.cpp.

    return mHostingFlags;
void nsIObserver::observe ( in nsISupports  aSubject,
in string  aTopic,
in wstring  aData 
) [inherited]

Observe will be called when there is a notification for the topic |aTopic|.

This assumes that the object implementing this interface has been registered with an observer service such as the nsIObserverService.

If you expect multiple topics/subjects, the impl is responsible for filtering.

You should not modify, add, remove, or enumerate notifications in the implemention of observe.

aSubject: Notification specific interface pointer.
aTopic: The notification topic or subject.
aData: Notification specific wide string. subject event.

Definition at line 163 of file PrefObserver.cpp.

Here is the call graph for this function:

void PrefObserver::Sync ( nsIPrefBranch aPrefBranch) [protected]

Definition at line 139 of file PrefObserver.cpp.

    NS_ASSERTION(aPrefBranch, "no pref branch");
    if (!aPrefBranch)

    // TODO
    // const char *userAgent = NPN_UserAgent(mData->pPluginInstance);
       // ::UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, userAgent, strlen(userAgent), 0);      

    // TODO
    // ::UrlMkSetSessionOption(INTERNET_OPTION_PROXY, ....);

    nsCOMPtr<nsIDispatchSupport> dispSupport = do_GetService(NS_IDISPATCH_SUPPORT_CONTRACTID);
    if (!dispSupport)
        mHostingFlags = kDefaultHostingFlags;
        dispSupport->GetHostingFlags(nsnull, &mHostingFlags);

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 177 of file PrefObserver.cpp.


    mPrefBranch->RemoveObserver(kProxyPref, this);
    mPrefBranch->RemoveObserver(kUserAgentPref, this);
    mPrefBranch->RemoveObserver(kActiveXHostingFlags, this);

    return NS_OK;

Member Data Documentation

Definition at line 77 of file PrefObserver.cpp.

Definition at line 78 of file PrefObserver.cpp.

Definition at line 83 of file PrefObserver.cpp.

The documentation for this class was generated from the following file: