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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 // Generates an MHTML footer and appends it to |outputBuffer|. | 84 // Generates an MHTML footer and appends it to |outputBuffer|. |
85 // | 85 // |
86 // Same |boundary| needs to used for all generateMHTMLHeader and | 86 // Same |boundary| needs to used for all generateMHTMLHeader and |
87 // generateMHTMLPart and generateMHTMLFooter calls that belong to the same | 87 // generateMHTMLPart and generateMHTMLFooter calls that belong to the same |
88 // MHTML document (see also generateMHTMLBoundary method). | 88 // MHTML document (see also generateMHTMLBoundary method). |
89 static void generateMHTMLFooter( | 89 static void generateMHTMLFooter( |
90 const String& boundary, | 90 const String& boundary, |
91 SharedBuffer& outputBuffer); | 91 SharedBuffer& outputBuffer); |
92 | 92 |
93 // Generates and returns a full MHTML document. | |
94 static PassRefPtr<SharedBuffer> generateMHTMLData( | |
95 const Vector<SerializedResource>&, EncodingPolicy, | |
96 const String& title, const String& mimeType); | |
97 | |
98 typedef WillBeHeapVector<RefPtrWillBeMember<ArchiveResource>> SubArchiveReso
urces; | 93 typedef WillBeHeapVector<RefPtrWillBeMember<ArchiveResource>> SubArchiveReso
urces; |
99 typedef WillBeHeapVector<RefPtrWillBeMember<MHTMLArchive>> SubFrameArchives; | 94 typedef WillBeHeapVector<RefPtrWillBeMember<MHTMLArchive>> SubFrameArchives; |
100 | 95 |
101 ArchiveResource* mainResource() const; | 96 ArchiveResource* mainResource() const; |
102 const SubArchiveResources& subresources() const { return m_subresources; } | 97 const SubArchiveResources& subresources() const { return m_subresources; } |
103 const SubFrameArchives& subframeArchives() const { return m_subframeArchives
; } | 98 const SubFrameArchives& subframeArchives() const { return m_subframeArchives
; } |
104 | 99 |
105 DECLARE_TRACE(); | 100 DECLARE_TRACE(); |
106 | 101 |
107 private: | 102 private: |
(...skipping 10 matching lines...) Expand all Loading... |
118 #endif | 113 #endif |
119 | 114 |
120 RefPtrWillBeMember<ArchiveResource> m_mainResource; | 115 RefPtrWillBeMember<ArchiveResource> m_mainResource; |
121 SubArchiveResources m_subresources; | 116 SubArchiveResources m_subresources; |
122 SubFrameArchives m_subframeArchives; | 117 SubFrameArchives m_subframeArchives; |
123 }; | 118 }; |
124 | 119 |
125 } | 120 } |
126 | 121 |
127 #endif | 122 #endif |
OLD | NEW |