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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 STACK_ALLOCATED(); | 63 STACK_ALLOCATED(); |
64 | 64 |
65 public: | 65 public: |
66 enum ResourceHasCacheControlNoStoreHeader { | 66 enum ResourceHasCacheControlNoStoreHeader { |
67 kNoCacheControlNoStoreHeader, | 67 kNoCacheControlNoStoreHeader, |
68 kHasCacheControlNoStoreHeader | 68 kHasCacheControlNoStoreHeader |
69 }; | 69 }; |
70 | 70 |
71 class Delegate { | 71 class Delegate { |
72 public: | 72 public: |
| 73 virtual ~Delegate() {} |
| 74 |
73 // Controls whether HTML serialization should skip the given element. | 75 // Controls whether HTML serialization should skip the given element. |
74 virtual bool ShouldIgnoreElement(const Element&) { return false; } | 76 virtual bool ShouldIgnoreElement(const Element&) { return false; } |
75 | 77 |
76 // Controls whether HTML serialization should skip the given attribute. | 78 // Controls whether HTML serialization should skip the given attribute. |
77 virtual bool ShouldIgnoreAttribute(const Element&, const Attribute&) { | 79 virtual bool ShouldIgnoreAttribute(const Element&, const Attribute&) { |
78 return false; | 80 return false; |
79 } | 81 } |
80 | 82 |
81 // Method allowing the Delegate control which URLs are written into the | 83 // Method allowing the Delegate control which URLs are written into the |
82 // generated html document. | 84 // generated html document. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 HashSet<KURL> resource_urls_; | 149 HashSet<KURL> resource_urls_; |
148 | 150 |
149 bool is_serializing_css_; | 151 bool is_serializing_css_; |
150 | 152 |
151 Delegate& delegate_; | 153 Delegate& delegate_; |
152 }; | 154 }; |
153 | 155 |
154 } // namespace blink | 156 } // namespace blink |
155 | 157 |
156 #endif // FrameSerializer_h | 158 #endif // FrameSerializer_h |
OLD | NEW |