Page Speed Optimization Libraries  1.7.30.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
net_instaweb::HtmlResourceSlot Class Reference
Inheritance diagram for net_instaweb::HtmlResourceSlot:
net_instaweb::ResourceSlot

List of all members.

Public Member Functions

 HtmlResourceSlot (const ResourcePtr &resource, HtmlElement *element, HtmlElement::Attribute *attribute, RewriteDriver *driver)
HtmlElement * element ()
HtmlElement::Attribute * attribute ()
virtual void Render ()
virtual GoogleString LocationString ()
virtual void DirectSetUrl (const StringPiece &url)
virtual bool CanDirectSetUrl ()
UrlRelativity url_relativity () const

Protected Member Functions

 REFCOUNT_FRIEND_DECLARATION (HtmlResourceSlot)

Member Function Documentation

virtual bool net_instaweb::HtmlResourceSlot::CanDirectSetUrl ( ) [inline, virtual]

Returns true if DirectSetUrl is supported by this slot (html and css right now).

Reimplemented from net_instaweb::ResourceSlot.

virtual void net_instaweb::HtmlResourceSlot::DirectSetUrl ( const StringPiece &  url) [virtual]

Update the URL in the slot target without touching the resource. This is intended for when we're inlining things as data: URLs. Note that if you call this you should also call set_disable_rendering(true), or otherwise the result will be overwritten. Does not alter the URL in any way. Not supported on all slot types --- presently only slots representing things within CSS and HTML have this operation (others will DCHECK-fail). Must be called from within a context's Render() method.

Reimplemented from net_instaweb::ResourceSlot.

virtual GoogleString net_instaweb::HtmlResourceSlot::LocationString ( ) [virtual]

Returns a human-readable description of where this slot occurs, for use in log messages.

Implements net_instaweb::ResourceSlot.

virtual void net_instaweb::HtmlResourceSlot::Render ( ) [virtual]

Render is not thread-safe. This must be called from the thread that owns the DOM or CSS file. The RewriteContext state machine will only call ResourceSlot::Render() on slots that were optimized successfully, and whose partitions are safely url_relocatable(). (Note that this is different from RewriteContext::Render).

Implements net_instaweb::ResourceSlot.

UrlRelativity net_instaweb::HtmlResourceSlot::url_relativity ( ) const [inline]

How relative the original URL was. If PreserveUrlRelativity is enabled, Render will try to make the final URL just as relative.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines