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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
522 if (!errorString.isEmpty()) { | 522 if (!errorString.isEmpty()) { |
523 callback->sendFailure(errorString); | 523 callback->sendFailure(errorString); |
524 return; | 524 return; |
525 } | 525 } |
526 callback->sendSuccess(content, base64Encoded); | 526 callback->sendSuccess(content, base64Encoded); |
527 } | 527 } |
528 | 528 |
529 void InspectorPageAgent::getResourceContent(ErrorString* errorString, const Stri ng& frameId, const String& url, PassRefPtrWillBeRawPtr<GetResourceContentCallbac k> callback) | 529 void InspectorPageAgent::getResourceContent(ErrorString* errorString, const Stri ng& frameId, const String& url, PassRefPtrWillBeRawPtr<GetResourceContentCallbac k> callback) |
530 { | 530 { |
531 String content; | 531 String content; |
532 if (m_debuggerAgent->getEditedScript(url, &content) || m_cssAgent->getEdited StyleSheet(url, &content)) { | 532 if (m_cssAgent->getEditedStyleSheet(url, &content)) { |
pfeldman
2015/07/22 04:16:14
Could you explain why we would treat CSS and JS di
| |
533 callback->sendSuccess(content, false); | 533 callback->sendSuccess(content, false); |
534 return; | 534 return; |
535 } | 535 } |
536 if (!m_enabled) { | 536 if (!m_enabled) { |
537 callback->sendFailure("Agent is not enabled."); | 537 callback->sendFailure("Agent is not enabled."); |
538 return; | 538 return; |
539 } | 539 } |
540 m_inspectorResourceContentLoader->ensureResourcesContentLoaded(bind(&Inspect orPageAgent::getResourceContentAfterResourcesContentLoaded, this, frameId, url, callback)); | 540 m_inspectorResourceContentLoader->ensureResourcesContentLoaded(bind(&Inspect orPageAgent::getResourceContentAfterResourcesContentLoaded, this, frameId, url, callback)); |
541 } | 541 } |
542 | 542 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
813 { | 813 { |
814 visitor->trace(m_inspectedFrame); | 814 visitor->trace(m_inspectedFrame); |
815 visitor->trace(m_debuggerAgent); | 815 visitor->trace(m_debuggerAgent); |
816 visitor->trace(m_cssAgent); | 816 visitor->trace(m_cssAgent); |
817 visitor->trace(m_overlay); | 817 visitor->trace(m_overlay); |
818 visitor->trace(m_inspectorResourceContentLoader); | 818 visitor->trace(m_inspectorResourceContentLoader); |
819 InspectorBaseAgent::trace(visitor); | 819 InspectorBaseAgent::trace(visitor); |
820 } | 820 } |
821 | 821 |
822 } // namespace blink | 822 } // namespace blink |
OLD | NEW |