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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 // return true and populate |rewrittenLink| with a desired value of the | 78 // return true and populate |rewrittenLink| with a desired value of the |
79 // html attribute value to be used in place of the original link. | 79 // html attribute value to be used in place of the original link. |
80 // (i.e. in place of img.src or iframe.src or object.data). | 80 // (i.e. in place of img.src or iframe.src or object.data). |
81 // | 81 // |
82 // If no link rewriting is desired, this method should return false. | 82 // If no link rewriting is desired, this method should return false. |
83 virtual bool rewriteLink(const Element&, String& rewrittenLink) | 83 virtual bool rewriteLink(const Element&, String& rewrittenLink) |
84 { | 84 { |
85 return false; | 85 return false; |
86 } | 86 } |
87 | 87 |
88 // Tells whether to skip serialization of a subresource with a given URI . | 88 // Tells whether to skip serialization of a subresource or CSSStyleSheet |
89 // Used to deduplicate resources across multiple frames. | 89 // with a given URI. Used to deduplicate resources across multiple frame s. |
90 virtual bool shouldSkipResource(const KURL&) | 90 virtual bool shouldSkipResourceWithURL(const KURL&) |
Łukasz Anforowicz
2016/05/19 17:00:13
Nice name change. Long time ago this was also use
dewittj
2016/05/19 18:18:36
Acknowledged.
| |
91 { | 91 { |
92 return false; | 92 return false; |
93 } | 93 } |
94 | |
95 // Tells whether to skip serialization of a subresource. | |
96 virtual bool shouldSkipResource(Resource*) | |
97 { | |
98 return false; | |
99 } | |
94 }; | 100 }; |
95 | 101 |
96 // Constructs a serializer that will write output to the given vector of | 102 // Constructs a serializer that will write output to the given vector of |
97 // SerializedResources and uses the Delegate for controlling some | 103 // SerializedResources and uses the Delegate for controlling some |
98 // serialization aspects. Callers need to ensure that both arguments stay | 104 // serialization aspects. Callers need to ensure that both arguments stay |
99 // alive until the FrameSerializer gets destroyed. | 105 // alive until the FrameSerializer gets destroyed. |
100 FrameSerializer(Vector<SerializedResource>&, Delegate&); | 106 FrameSerializer(Vector<SerializedResource>&, Delegate&); |
101 | 107 |
102 // Initiates the serialization of the frame. All serialized content and | 108 // Initiates the serialization of the frame. All serialized content and |
103 // retrieved resources are added to the Vector passed to the constructor. | 109 // retrieved resources are added to the Vector passed to the constructor. |
(...skipping 22 matching lines...) Expand all Loading... | |
126 | 132 |
127 Vector<SerializedResource>* m_resources; | 133 Vector<SerializedResource>* m_resources; |
128 HashSet<KURL> m_resourceURLs; | 134 HashSet<KURL> m_resourceURLs; |
129 | 135 |
130 Delegate& m_delegate; | 136 Delegate& m_delegate; |
131 }; | 137 }; |
132 | 138 |
133 } // namespace blink | 139 } // namespace blink |
134 | 140 |
135 #endif // FrameSerializer_h | 141 #endif // FrameSerializer_h |
OLD | NEW |