| 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 InspectorPageAgent::ResourceType type() const { return m_type; } | 101 InspectorPageAgent::ResourceType type() const { return m_type; } |
| 102 void setType(InspectorPageAgent::ResourceType type) { m_type = type; } | 102 void setType(InspectorPageAgent::ResourceType type) { m_type = type; } |
| 103 | 103 |
| 104 int httpStatusCode() const { return m_httpStatusCode; } | 104 int httpStatusCode() const { return m_httpStatusCode; } |
| 105 void setHTTPStatusCode(int httpStatusCode) { m_httpStatusCode = httpStat
usCode; } | 105 void setHTTPStatusCode(int httpStatusCode) { m_httpStatusCode = httpStat
usCode; } |
| 106 | 106 |
| 107 String textEncodingName() const { return m_textEncodingName; } | 107 String textEncodingName() const { return m_textEncodingName; } |
| 108 void setTextEncodingName(const String& textEncodingName) { m_textEncodin
gName = textEncodingName; } | 108 void setTextEncodingName(const String& textEncodingName) { m_textEncodin
gName = textEncodingName; } |
| 109 | 109 |
| 110 PassRefPtr<TextResourceDecoder> decoder() const { return m_decoder; } | 110 TextResourceDecoder* decoder() const { return m_decoder.get(); } |
| 111 void setDecoder(PassRefPtr<TextResourceDecoder> decoder) { m_decoder = d
ecoder; } | 111 void setDecoder(PassOwnPtr<TextResourceDecoder> decoder) { m_decoder = d
ecoder; } |
| 112 | 112 |
| 113 PassRefPtr<SharedBuffer> buffer() const { return m_buffer; } | 113 PassRefPtr<SharedBuffer> buffer() const { return m_buffer; } |
| 114 void setBuffer(PassRefPtr<SharedBuffer> buffer) { m_buffer = buffer; } | 114 void setBuffer(PassRefPtr<SharedBuffer> buffer) { m_buffer = buffer; } |
| 115 | 115 |
| 116 Resource* cachedResource() const { return m_cachedResource; } | 116 Resource* cachedResource() const { return m_cachedResource; } |
| 117 void setResource(Resource* cachedResource) { m_cachedResource = cachedRe
source; } | 117 void setResource(Resource* cachedResource) { m_cachedResource = cachedRe
source; } |
| 118 | 118 |
| 119 XHRReplayData* xhrReplayData() const { return m_xhrReplayData.get(); } | 119 XHRReplayData* xhrReplayData() const { return m_xhrReplayData.get(); } |
| 120 void setXHRReplayData(XHRReplayData* xhrReplayData) { m_xhrReplayData =
xhrReplayData; } | 120 void setXHRReplayData(XHRReplayData* xhrReplayData) { m_xhrReplayData =
xhrReplayData; } |
| 121 | 121 |
| 122 private: | 122 private: |
| 123 bool hasData() const { return m_dataBuffer; } | 123 bool hasData() const { return m_dataBuffer; } |
| 124 size_t dataLength() const; | 124 size_t dataLength() const; |
| 125 void appendData(const char* data, size_t dataLength); | 125 void appendData(const char* data, size_t dataLength); |
| 126 size_t decodeDataToContent(); | 126 size_t decodeDataToContent(); |
| 127 | 127 |
| 128 String m_requestId; | 128 String m_requestId; |
| 129 String m_loaderId; | 129 String m_loaderId; |
| 130 String m_frameId; | 130 String m_frameId; |
| 131 KURL m_url; | 131 KURL m_url; |
| 132 String m_content; | 132 String m_content; |
| 133 RefPtr<XHRReplayData> m_xhrReplayData; | 133 RefPtr<XHRReplayData> m_xhrReplayData; |
| 134 bool m_base64Encoded; | 134 bool m_base64Encoded; |
| 135 RefPtr<SharedBuffer> m_dataBuffer; | 135 RefPtr<SharedBuffer> m_dataBuffer; |
| 136 bool m_isContentEvicted; | 136 bool m_isContentEvicted; |
| 137 InspectorPageAgent::ResourceType m_type; | 137 InspectorPageAgent::ResourceType m_type; |
| 138 int m_httpStatusCode; | 138 int m_httpStatusCode; |
| 139 | 139 |
| 140 String m_textEncodingName; | 140 String m_textEncodingName; |
| 141 RefPtr<TextResourceDecoder> m_decoder; | 141 OwnPtr<TextResourceDecoder> m_decoder; |
| 142 | 142 |
| 143 RefPtr<SharedBuffer> m_buffer; | 143 RefPtr<SharedBuffer> m_buffer; |
| 144 Resource* m_cachedResource; | 144 Resource* m_cachedResource; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 NetworkResourcesData(); | 147 NetworkResourcesData(); |
| 148 | 148 |
| 149 ~NetworkResourcesData(); | 149 ~NetworkResourcesData(); |
| 150 | 150 |
| 151 void resourceCreated(const String& requestId, const String& loaderId); | 151 void resourceCreated(const String& requestId, const String& loaderId); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 180 ResourceDataMap m_requestIdToResourceDataMap; | 180 ResourceDataMap m_requestIdToResourceDataMap; |
| 181 size_t m_contentSize; | 181 size_t m_contentSize; |
| 182 size_t m_maximumResourcesContentSize; | 182 size_t m_maximumResourcesContentSize; |
| 183 size_t m_maximumSingleResourceContentSize; | 183 size_t m_maximumSingleResourceContentSize; |
| 184 }; | 184 }; |
| 185 | 185 |
| 186 } // namespace WebCore | 186 } // namespace WebCore |
| 187 | 187 |
| 188 | 188 |
| 189 #endif // !defined(NetworkResourcesData_h) | 189 #endif // !defined(NetworkResourcesData_h) |
| OLD | NEW |