| 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 { | 745 { |
| 746 String content; | 746 String content; |
| 747 if (getEditedResourceContent(url, &content)) { | 747 if (getEditedResourceContent(url, &content)) { |
| 748 callback->sendSuccess(content, false); | 748 callback->sendSuccess(content, false); |
| 749 return; | 749 return; |
| 750 } | 750 } |
| 751 if (!m_inspectorResourceContentLoader) { | 751 if (!m_inspectorResourceContentLoader) { |
| 752 callback->sendFailure("Agent is not enabled."); | 752 callback->sendFailure("Agent is not enabled."); |
| 753 return; | 753 return; |
| 754 } | 754 } |
| 755 m_inspectorResourceContentLoader->ensureResourcesContentLoaded(adoptPtrWillB
eNoop(new GetResourceContentLoadListener(this, frameId, url, callback))); | 755 m_inspectorResourceContentLoader->ensureResourcesContentLoaded(new GetResour
ceContentLoadListener(this, frameId, url, callback)); |
| 756 } | 756 } |
| 757 | 757 |
| 758 static bool textContentForResource(Resource* cachedResource, String* result) | 758 static bool textContentForResource(Resource* cachedResource, String* result) |
| 759 { | 759 { |
| 760 if (hasTextContent(cachedResource)) { | 760 if (hasTextContent(cachedResource)) { |
| 761 String content; | 761 String content; |
| 762 bool base64Encoded; | 762 bool base64Encoded; |
| 763 if (InspectorPageAgent::cachedResourceContent(cachedResource, result, &b
ase64Encoded)) { | 763 if (InspectorPageAgent::cachedResourceContent(cachedResource, result, &b
ase64Encoded)) { |
| 764 ASSERT(!base64Encoded); | 764 ASSERT(!base64Encoded); |
| 765 return true; | 765 return true; |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1486 void InspectorPageAgent::trace(Visitor* visitor) | 1486 void InspectorPageAgent::trace(Visitor* visitor) |
| 1487 { | 1487 { |
| 1488 visitor->trace(m_page); | 1488 visitor->trace(m_page); |
| 1489 visitor->trace(m_injectedScriptManager); | 1489 visitor->trace(m_injectedScriptManager); |
| 1490 visitor->trace(m_inspectorResourceContentLoader); | 1490 visitor->trace(m_inspectorResourceContentLoader); |
| 1491 InspectorBaseAgent::trace(visitor); | 1491 InspectorBaseAgent::trace(visitor); |
| 1492 } | 1492 } |
| 1493 | 1493 |
| 1494 } // namespace blink | 1494 } // namespace blink |
| 1495 | 1495 |
| OLD | NEW |