/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
class IconLoader : public imgINotificationObserver { public: // This is the interface that our listeners need to implement so that they can // be notified when the icon is loaded. class Listener { public: virtual nsresult OnComplete(imgIContainer* aContainer) = 0;
};
// Create the loader. // aListener will be notified when the load is complete. // The loader does not keep an owning reference to the listener. Call Destroy // before the listener goes away. explicit IconLoader(Listener* aListener);
// LoadIcon will start a load request for the icon. // The request may not complete until after LoadIcon returns. // If aIsInternalIcon is true, the document and principal will not be // used when loading.
nsresult LoadIcon(nsIURI* aIconURI, nsINode* aNode, bool aIsInternalIcon = false);
void Destroy();
protected: virtual ~IconLoader();
private:
RefPtr<imgRequestProxy> mIconRequest;
// The listener, which is notified when loading completes. // Can be null, after a call to Destroy. // This is a non-owning reference and needs to be cleared with a call to // Destroy before the listener goes away.
Listener* mListener;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.