| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 virtual bool rewriteLink(const Element&, String& rewrittenLink) { | 82 virtual bool rewriteLink(const Element&, String& rewrittenLink) { |
| 83 return false; | 83 return false; |
| 84 } | 84 } |
| 85 | 85 |
| 86 // Tells whether to skip serialization of a subresource or CSSStyleSheet | 86 // Tells whether to skip serialization of a subresource or CSSStyleSheet |
| 87 // with a given URI. Used to deduplicate resources across multiple frames. | 87 // with a given URI. Used to deduplicate resources across multiple frames. |
| 88 virtual bool shouldSkipResourceWithURL(const KURL&) { return false; } | 88 virtual bool shouldSkipResourceWithURL(const KURL&) { return false; } |
| 89 | 89 |
| 90 // Tells whether to skip serialization of a subresource. | 90 // Tells whether to skip serialization of a subresource. |
| 91 virtual bool shouldSkipResource(const Resource&) { return false; } | 91 virtual bool shouldSkipResource(const Resource&) { return false; } |
| 92 |
| 93 // Returns custom attributes that need to add in order to serialize the |
| 94 // element. |
| 95 virtual Vector<Attribute> getCustomAttributes(const Element&) { |
| 96 return Vector<Attribute>(); |
| 97 } |
| 92 }; | 98 }; |
| 93 | 99 |
| 94 // Constructs a serializer that will write output to the given vector of | 100 // Constructs a serializer that will write output to the given vector of |
| 95 // SerializedResources and uses the Delegate for controlling some | 101 // SerializedResources and uses the Delegate for controlling some |
| 96 // serialization aspects. Callers need to ensure that both arguments stay | 102 // serialization aspects. Callers need to ensure that both arguments stay |
| 97 // alive until the FrameSerializer gets destroyed. | 103 // alive until the FrameSerializer gets destroyed. |
| 98 FrameSerializer(Vector<SerializedResource>&, Delegate&); | 104 FrameSerializer(Vector<SerializedResource>&, Delegate&); |
| 99 | 105 |
| 100 // Initiates the serialization of the frame. All serialized content and | 106 // Initiates the serialization of the frame. All serialized content and |
| 101 // retrieved resources are added to the Vector passed to the constructor. | 107 // retrieved resources are added to the Vector passed to the constructor. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 130 HashSet<KURL> m_resourceURLs; | 136 HashSet<KURL> m_resourceURLs; |
| 131 | 137 |
| 132 bool m_isSerializingCss; | 138 bool m_isSerializingCss; |
| 133 | 139 |
| 134 Delegate& m_delegate; | 140 Delegate& m_delegate; |
| 135 }; | 141 }; |
| 136 | 142 |
| 137 } // namespace blink | 143 } // namespace blink |
| 138 | 144 |
| 139 #endif // FrameSerializer_h | 145 #endif // FrameSerializer_h |
| OLD | NEW |