Chromium Code Reviews| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 virtual bool shouldIgnoreAttribute(const Attribute&) = 0; | 68 virtual bool shouldIgnoreAttribute(const Attribute&) = 0; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 PageSerializer(Vector<SerializedResource>*, PassOwnPtr<Delegate>); | 71 PageSerializer(Vector<SerializedResource>*, PassOwnPtr<Delegate>); |
| 72 | 72 |
| 73 // Initiates the serialization of the frame's page. All serialized content a nd retrieved | 73 // Initiates the serialization of the frame's page. All serialized content a nd retrieved |
| 74 // resources are added to the Vector passed to the constructor. The first re source in that | 74 // resources are added to the Vector passed to the constructor. The first re source in that |
| 75 // vector is the top frame serialized content. | 75 // vector is the top frame serialized content. |
| 76 void serialize(Page*); | 76 void serialize(Page*); |
| 77 | 77 |
| 78 void registerRewriteURL(const String&, const String&); | |
|
philipj_slow
2015/06/26 09:07:56
It would be nice with argument names here, it's pr
Tiger (Sony Mobile)
2015/06/30 11:31:53
Done.
| |
| 79 void setRewriteURLFolder(const String&); | |
| 80 | |
| 78 KURL urlForBlankFrame(LocalFrame*); | 81 KURL urlForBlankFrame(LocalFrame*); |
| 79 | 82 |
| 80 Delegate* delegate(); | 83 Delegate* delegate(); |
| 81 | 84 |
| 82 private: | 85 private: |
| 83 void serializeFrame(LocalFrame*); | 86 void serializeFrame(LocalFrame*); |
| 84 | 87 |
| 85 // Serializes the stylesheet back to text and adds it to the resources if UR L is not-empty. | 88 // Serializes the stylesheet back to text and adds it to the resources if UR L is not-empty. |
| 86 // It also adds any resources included in that stylesheet (including any imp orted stylesheets and their own resources). | 89 // It also adds any resources included in that stylesheet (including any imp orted stylesheets and their own resources). |
| 87 void serializeCSSStyleSheet(CSSStyleSheet&, const KURL&); | 90 void serializeCSSStyleSheet(CSSStyleSheet&, const KURL&); |
| 88 | 91 |
| 89 bool shouldAddURL(const KURL&); | 92 bool shouldAddURL(const KURL&); |
| 90 | 93 |
| 91 void addToResources(Resource *, PassRefPtr<SharedBuffer>, const KURL&); | 94 void addToResources(Resource *, PassRefPtr<SharedBuffer>, const KURL&); |
| 92 void addImageToResources(ImageResource*, LayoutObject*, const KURL&); | 95 void addImageToResources(ImageResource*, LayoutObject*, const KURL&); |
| 93 void addFontToResources(FontResource*); | 96 void addFontToResources(FontResource*); |
| 94 | 97 |
| 95 void retrieveResourcesForProperties(const StylePropertySet*, Document&); | 98 void retrieveResourcesForProperties(const StylePropertySet*, Document&); |
| 96 void retrieveResourcesForCSSValue(CSSValue*, Document&); | 99 void retrieveResourcesForCSSValue(CSSValue*, Document&); |
| 97 | 100 |
| 98 Vector<SerializedResource>* m_resources; | 101 Vector<SerializedResource>* m_resources; |
| 99 ListHashSet<KURL> m_resourceURLs; | 102 ListHashSet<KURL> m_resourceURLs; |
| 100 | 103 |
| 101 using BlankFrameURLMap = WillBeHeapHashMap<RawPtrWillBeMember<LocalFrame>, K URL>; | 104 using BlankFrameURLMap = WillBeHeapHashMap<RawPtrWillBeMember<LocalFrame>, K URL>; |
| 102 BlankFrameURLMap m_blankFrameURLs; | 105 BlankFrameURLMap m_blankFrameURLs; |
| 106 HashMap<String, String> m_rewriteURLs; | |
| 107 String m_rewriteFolder; | |
| 103 unsigned m_blankFrameCounter; | 108 unsigned m_blankFrameCounter; |
| 104 | 109 |
| 105 OwnPtr<Delegate> m_delegate; | 110 OwnPtr<Delegate> m_delegate; |
| 106 }; | 111 }; |
| 107 | 112 |
| 108 } // namespace blink | 113 } // namespace blink |
| 109 | 114 |
| 110 #endif // PageSerializer_h | 115 #endif // PageSerializer_h |
| OLD | NEW |