Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameSerializer.h

Issue 2912213002: Support serializing shadow DOM to MHTML (Closed)
Patch Set: Add .gitattributes Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Tells whether to skip serialization of a subresource. 100 // Tells whether to skip serialization of a subresource.
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
111 // Returns the root of auxiliary DOM tree, i.e. shadow tree, if it needs to
112 // be serialized. The additional element to enclose the serialized
113 // auxiliary DOM tree may be returned.
114 virtual Node* GetAuxiliaryDOMTree(const Element&, Element**) const {
115 return nullptr;
116 }
110 }; 117 };
111 118
112 // Constructs a serializer that will write output to the given deque of 119 // Constructs a serializer that will write output to the given deque of
113 // SerializedResources and uses the Delegate for controlling some 120 // SerializedResources and uses the Delegate for controlling some
114 // serialization aspects. Callers need to ensure that both arguments stay 121 // serialization aspects. Callers need to ensure that both arguments stay
115 // alive until the FrameSerializer gets destroyed. 122 // alive until the FrameSerializer gets destroyed.
116 FrameSerializer(Deque<SerializedResource>&, Delegate&); 123 FrameSerializer(Deque<SerializedResource>&, Delegate&);
117 124
118 // Initiates the serialization of the frame. All serialized content and 125 // Initiates the serialization of the frame. All serialized content and
119 // retrieved resources are added to the Deque passed to the constructor. 126 // retrieved resources are added to the Deque passed to the constructor.
(...skipping 29 matching lines...) Expand all
149 HashSet<KURL> resource_urls_; 156 HashSet<KURL> resource_urls_;
150 157
151 bool is_serializing_css_; 158 bool is_serializing_css_;
152 159
153 Delegate& delegate_; 160 Delegate& delegate_;
154 }; 161 };
155 162
156 } // namespace blink 163 } // namespace blink
157 164
158 #endif // FrameSerializer_h 165 #endif // FrameSerializer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698