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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 class ArchiveResource; | 44 class ArchiveResource; |
45 class KURL; | 45 class KURL; |
46 class SharedBuffer; | 46 class SharedBuffer; |
47 | 47 |
48 struct SerializedResource; | 48 struct SerializedResource; |
49 | 49 |
50 class PLATFORM_EXPORT MHTMLArchive final : public GarbageCollectedFinalized<MHTM
LArchive> { | 50 class PLATFORM_EXPORT MHTMLArchive final : public GarbageCollectedFinalized<MHTM
LArchive> { |
51 public: | 51 public: |
52 static RawPtr<MHTMLArchive> create(const KURL&, SharedBuffer*); | 52 static MHTMLArchive* create(const KURL&, SharedBuffer*); |
53 ~MHTMLArchive(); | 53 ~MHTMLArchive(); |
54 | 54 |
55 // Binary encoding results in smaller MHTML files but they might not work in
other browsers. | 55 // Binary encoding results in smaller MHTML files but they might not work in
other browsers. |
56 enum EncodingPolicy { | 56 enum EncodingPolicy { |
57 UseDefaultEncoding, | 57 UseDefaultEncoding, |
58 UseBinaryEncoding | 58 UseBinaryEncoding |
59 }; | 59 }; |
60 | 60 |
61 // Generates an MHTML header and appends it to |outputBuffer|. | 61 // Generates an MHTML header and appends it to |outputBuffer|. |
62 // | 62 // |
(...skipping 30 matching lines...) Expand all Loading... |
93 typedef HeapHashMap<String, Member<ArchiveResource>> SubArchiveResources; | 93 typedef HeapHashMap<String, Member<ArchiveResource>> SubArchiveResources; |
94 | 94 |
95 ArchiveResource* mainResource() { return m_mainResource.get(); } | 95 ArchiveResource* mainResource() { return m_mainResource.get(); } |
96 ArchiveResource* subresourceForURL(const KURL&) const; | 96 ArchiveResource* subresourceForURL(const KURL&) const; |
97 | 97 |
98 DECLARE_TRACE(); | 98 DECLARE_TRACE(); |
99 | 99 |
100 private: | 100 private: |
101 MHTMLArchive(); | 101 MHTMLArchive(); |
102 | 102 |
103 void setMainResource(RawPtr<ArchiveResource>); | 103 void setMainResource(ArchiveResource*); |
104 void addSubresource(ArchiveResource*); | 104 void addSubresource(ArchiveResource*); |
105 | 105 |
106 Member<ArchiveResource> m_mainResource; | 106 Member<ArchiveResource> m_mainResource; |
107 SubArchiveResources m_subresources; | 107 SubArchiveResources m_subresources; |
108 }; | 108 }; |
109 | 109 |
110 } // namespace blink | 110 } // namespace blink |
111 | 111 |
112 #endif | 112 #endif |
OLD | NEW |