| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 ~MHTMLArchive(); | 53 ~MHTMLArchive(); |
| 54 | 54 |
| 55 enum EncodingPolicy { | 55 enum EncodingPolicy { |
| 56 UseDefaultEncoding, | 56 UseDefaultEncoding, |
| 57 UseBinaryEncoding | 57 UseBinaryEncoding |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 // Binary encoding results in smaller MHTML files but they might not work in
other browsers. | 60 // Binary encoding results in smaller MHTML files but they might not work in
other browsers. |
| 61 static PassRefPtr<SharedBuffer> generateMHTMLData(const Vector<SerializedRes
ource>&, EncodingPolicy, const String& title, const String& mimeType); | 61 static PassRefPtr<SharedBuffer> generateMHTMLData(const Vector<SerializedRes
ource>&, EncodingPolicy, const String& title, const String& mimeType); |
| 62 | 62 |
| 63 typedef WillBeHeapVector<RefPtrWillBeMember<ArchiveResource> > SubArchiveRes
ources; | 63 typedef WillBeHeapVector<RefPtrWillBeMember<ArchiveResource>> SubArchiveReso
urces; |
| 64 typedef WillBeHeapVector<RefPtrWillBeMember<MHTMLArchive> > SubFrameArchives
; | 64 typedef WillBeHeapVector<RefPtrWillBeMember<MHTMLArchive>> SubFrameArchives; |
| 65 | 65 |
| 66 ArchiveResource* mainResource() { return m_mainResource.get(); } | 66 ArchiveResource* mainResource() { return m_mainResource.get(); } |
| 67 const SubArchiveResources& subresources() const { return m_subresources; } | 67 const SubArchiveResources& subresources() const { return m_subresources; } |
| 68 const SubFrameArchives& subframeArchives() const { return m_subframeArchives
; } | 68 const SubFrameArchives& subframeArchives() const { return m_subframeArchives
; } |
| 69 | 69 |
| 70 void trace(Visitor*); | 70 void trace(Visitor*); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 friend class MHTMLParser; | 73 friend class MHTMLParser; |
| 74 MHTMLArchive(); | 74 MHTMLArchive(); |
| 75 | 75 |
| 76 void setMainResource(PassRefPtrWillBeRawPtr<ArchiveResource>); | 76 void setMainResource(PassRefPtrWillBeRawPtr<ArchiveResource>); |
| 77 void addSubresource(PassRefPtrWillBeRawPtr<ArchiveResource>); | 77 void addSubresource(PassRefPtrWillBeRawPtr<ArchiveResource>); |
| 78 void addSubframeArchive(PassRefPtrWillBeRawPtr<MHTMLArchive>); | 78 void addSubframeArchive(PassRefPtrWillBeRawPtr<MHTMLArchive>); |
| 79 | 79 |
| 80 #if !ENABLE(OILPAN) | 80 #if !ENABLE(OILPAN) |
| 81 void clearAllSubframeArchives(); | 81 void clearAllSubframeArchives(); |
| 82 void clearAllSubframeArchivesImpl(SubFrameArchives* clearedArchives); | 82 void clearAllSubframeArchivesImpl(SubFrameArchives* clearedArchives); |
| 83 #endif | 83 #endif |
| 84 | 84 |
| 85 RefPtrWillBeMember<ArchiveResource> m_mainResource; | 85 RefPtrWillBeMember<ArchiveResource> m_mainResource; |
| 86 SubArchiveResources m_subresources; | 86 SubArchiveResources m_subresources; |
| 87 SubFrameArchives m_subframeArchives; | 87 SubFrameArchives m_subframeArchives; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } | 90 } |
| 91 | 91 |
| 92 #endif | 92 #endif |
| OLD | NEW |