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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 *base64Encoded = false; | 231 *base64Encoded = false; |
232 | 232 |
233 if (hasZeroSize) { | 233 if (hasZeroSize) { |
234 *result = ""; | 234 *result = ""; |
235 return true; | 235 return true; |
236 } | 236 } |
237 | 237 |
238 if (cachedResource) { | 238 if (cachedResource) { |
239 switch (cachedResource->type()) { | 239 switch (cachedResource->type()) { |
240 case Resource::CSSStyleSheet: | 240 case Resource::CSSStyleSheet: |
241 *result = toCSSStyleSheetResource(cachedResource)->sheetText(false); | 241 *result = toCSSStyleSheetResource(cachedResource)->sheetText(); |
242 return true; | 242 return true; |
243 case Resource::Script: | 243 case Resource::Script: |
244 *result = cachedResource->resourceBuffer() ? toScriptResource(cached
Resource)->decodedText() : toScriptResource(cachedResource)->script(); | 244 *result = cachedResource->resourceBuffer() ? toScriptResource(cached
Resource)->decodedText() : toScriptResource(cachedResource)->script(); |
245 return true; | 245 return true; |
246 case Resource::ImportResource: // Fall through. | 246 case Resource::ImportResource: // Fall through. |
247 case Resource::Raw: { | 247 case Resource::Raw: { |
248 SharedBuffer* buffer = cachedResource->resourceBuffer(); | 248 SharedBuffer* buffer = cachedResource->resourceBuffer(); |
249 if (!buffer) | 249 if (!buffer) |
250 return false; | 250 return false; |
251 OwnPtr<TextResourceDecoder> decoder = InspectorPageAgent::createReso
urceTextDecoder(cachedResource->response().mimeType(), cachedResource->response(
).textEncodingName()); | 251 OwnPtr<TextResourceDecoder> decoder = InspectorPageAgent::createReso
urceTextDecoder(cachedResource->response().mimeType(), cachedResource->response(
).textEncodingName()); |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 { | 873 { |
874 visitor->trace(m_inspectedFrame); | 874 visitor->trace(m_inspectedFrame); |
875 visitor->trace(m_debuggerAgent); | 875 visitor->trace(m_debuggerAgent); |
876 visitor->trace(m_cssAgent); | 876 visitor->trace(m_cssAgent); |
877 visitor->trace(m_overlay); | 877 visitor->trace(m_overlay); |
878 visitor->trace(m_inspectorResourceContentLoader); | 878 visitor->trace(m_inspectorResourceContentLoader); |
879 InspectorBaseAgent::trace(visitor); | 879 InspectorBaseAgent::trace(visitor); |
880 } | 880 } |
881 | 881 |
882 } // namespace blink | 882 } // namespace blink |
OLD | NEW |