| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 virtual bool ShouldSkipResource(ResourceHasCacheControlNoStoreHeader) { | 101 virtual bool ShouldSkipResource(ResourceHasCacheControlNoStoreHeader) { |
| 102 return false; | 102 return false; |
| 103 } | 103 } |
| 104 | 104 |
| 105 // Returns custom attributes that need to add in order to serialize the | 105 // Returns custom attributes that need to add in order to serialize the |
| 106 // element. | 106 // element. |
| 107 virtual Vector<Attribute> GetCustomAttributes(const Element&) { | 107 virtual Vector<Attribute> GetCustomAttributes(const Element&) { |
| 108 return Vector<Attribute>(); | 108 return Vector<Attribute>(); |
| 109 } | 109 } |
| 110 | 110 |
| 111 // Returns an auxiliary DOM tree, i.e. shadow tree, that needs to be |
| 112 // serialized. |
| 113 virtual std::pair<Node*, Element*> GetAuxiliaryDOMTree( |
| 114 const Element&) const { |
| 115 return std::pair<Node*, Element*>(); |
| 116 } |
| 117 |
| 111 virtual bool ShouldCollectProblemMetric() { return false; } | 118 virtual bool ShouldCollectProblemMetric() { return false; } |
| 112 }; | 119 }; |
| 113 | 120 |
| 114 // Constructs a serializer that will write output to the given deque of | 121 // Constructs a serializer that will write output to the given deque of |
| 115 // SerializedResources and uses the Delegate for controlling some | 122 // SerializedResources and uses the Delegate for controlling some |
| 116 // serialization aspects. Callers need to ensure that both arguments stay | 123 // serialization aspects. Callers need to ensure that both arguments stay |
| 117 // alive until the FrameSerializer gets destroyed. | 124 // alive until the FrameSerializer gets destroyed. |
| 118 FrameSerializer(Deque<SerializedResource>&, Delegate&); | 125 FrameSerializer(Deque<SerializedResource>&, Delegate&); |
| 119 | 126 |
| 120 // Initiates the serialization of the frame. All serialized content and | 127 // Initiates the serialization of the frame. All serialized content and |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 int total_image_count_; | 166 int total_image_count_; |
| 160 int loaded_image_count_; | 167 int loaded_image_count_; |
| 161 int total_css_count_; | 168 int total_css_count_; |
| 162 int loaded_css_count_; | 169 int loaded_css_count_; |
| 163 bool should_collect_problem_metric_; | 170 bool should_collect_problem_metric_; |
| 164 }; | 171 }; |
| 165 | 172 |
| 166 } // namespace blink | 173 } // namespace blink |
| 167 | 174 |
| 168 #endif // FrameSerializer_h | 175 #endif // FrameSerializer_h |
| OLD | NEW |