Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
inline_attribute_slot.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_INLINE_ATTRIBUTE_SLOT_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_INLINE_ATTRIBUTE_SLOT_H_
21 
23 
24 namespace net_instaweb {
25 
27  public:
28  InlineAttributeSlot(const ResourcePtr& resource,
30  HtmlElement::Attribute* attribute,
31  StringPiece location);
32  virtual ~InlineAttributeSlot();
33  virtual HtmlElement* element() const { return element_; }
34  virtual GoogleString LocationString() const { return location_; }
35 
36  virtual void Render();
37 
38  const HtmlElement::Attribute* attribute() const { return attribute_; }
39 
40  private:
41  HtmlElement* element_;
42  HtmlElement::Attribute* attribute_;
43  GoogleString location_;
44 
45 
46 };
47 
48 typedef RefCountedPtr<InlineAttributeSlot> InlineAttributeSlotPtr;
49 
51  public:
52  bool operator()(const InlineAttributeSlotPtr& p,
53  const InlineAttributeSlotPtr& q) const;
54 };
55 
56 typedef std::set<InlineAttributeSlotPtr,
57  InlineAttributeSlotComparator> InlineAttributeSlotSet;
58 
59 }
60 
61 #endif
Definition: html_element.h:66
Definition: inline_attribute_slot.h:50
virtual GoogleString LocationString() const
Definition: inline_attribute_slot.h:34
Definition: resource_slot.h:54
Definition: html_element.h:42
Definition: inline_attribute_slot.h:26
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
virtual HtmlElement * element() const
Return HTML element associated with slot, or NULL if none (CSS, IPRO)
Definition: inline_attribute_slot.h:33