| 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 void InspectorPageAgent::removeScriptToEvaluateOnLoad(ErrorString* error, const
String& identifier) | 577 void InspectorPageAgent::removeScriptToEvaluateOnLoad(ErrorString* error, const
String& identifier) |
| 578 { | 578 { |
| 579 RefPtr<JSONObject> scripts = m_state->getObject(PageAgentState::pageAgentScr
iptsToEvaluateOnLoad); | 579 RefPtr<JSONObject> scripts = m_state->getObject(PageAgentState::pageAgentScr
iptsToEvaluateOnLoad); |
| 580 if (!scripts || scripts->find(identifier) == scripts->end()) { | 580 if (!scripts || scripts->find(identifier) == scripts->end()) { |
| 581 *error = "Script not found"; | 581 *error = "Script not found"; |
| 582 return; | 582 return; |
| 583 } | 583 } |
| 584 scripts->remove(identifier); | 584 scripts->remove(identifier); |
| 585 } | 585 } |
| 586 | 586 |
| 587 void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCa
che, const String* optionalScriptToEvaluateOnLoad, const String* optionalScriptP
reprocessor) | 587 void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCa
che, const String* optionalScriptToEvaluateOnLoad) |
| 588 { | 588 { |
| 589 m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad ? *opti
onalScriptToEvaluateOnLoad : ""; | 589 m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad ? *opti
onalScriptToEvaluateOnLoad : ""; |
| 590 m_pendingScriptPreprocessor = optionalScriptPreprocessor ? *optionalScriptPr
eprocessor : ""; | |
| 591 inspectedFrame()->reload(asBool(optionalIgnoreCache) ? EndToEndReload : Norm
alReload, NotClientRedirect); | 590 inspectedFrame()->reload(asBool(optionalIgnoreCache) ? EndToEndReload : Norm
alReload, NotClientRedirect); |
| 592 } | 591 } |
| 593 | 592 |
| 594 void InspectorPageAgent::navigate(ErrorString*, const String& url, String* outFr
ameId) | 593 void InspectorPageAgent::navigate(ErrorString*, const String& url, String* outFr
ameId) |
| 595 { | 594 { |
| 596 *outFrameId = frameId(inspectedFrame()); | 595 *outFrameId = frameId(inspectedFrame()); |
| 597 } | 596 } |
| 598 | 597 |
| 599 static PassRefPtr<TypeBuilder::Page::Cookie> buildObjectForCookie(const Cookie&
cookie) | 598 static PassRefPtr<TypeBuilder::Page::Cookie> buildObjectForCookie(const Cookie&
cookie) |
| 600 { | 599 { |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 { | 1006 { |
| 1008 if (frame != inspectedFrame()) | 1007 if (frame != inspectedFrame()) |
| 1009 return; | 1008 return; |
| 1010 m_frontend->loadEventFired(currentTime()); | 1009 m_frontend->loadEventFired(currentTime()); |
| 1011 } | 1010 } |
| 1012 | 1011 |
| 1013 void InspectorPageAgent::didCommitLoad(LocalFrame*, DocumentLoader* loader) | 1012 void InspectorPageAgent::didCommitLoad(LocalFrame*, DocumentLoader* loader) |
| 1014 { | 1013 { |
| 1015 if (loader->frame() == inspectedFrame()) { | 1014 if (loader->frame() == inspectedFrame()) { |
| 1016 m_scriptToEvaluateOnLoadOnce = m_pendingScriptToEvaluateOnLoadOnce; | 1015 m_scriptToEvaluateOnLoadOnce = m_pendingScriptToEvaluateOnLoadOnce; |
| 1017 m_scriptPreprocessorSource = m_pendingScriptPreprocessor; | |
| 1018 m_pendingScriptToEvaluateOnLoadOnce = String(); | 1016 m_pendingScriptToEvaluateOnLoadOnce = String(); |
| 1019 m_pendingScriptPreprocessor = String(); | |
| 1020 if (m_inspectorResourceContentLoader) | 1017 if (m_inspectorResourceContentLoader) |
| 1021 m_inspectorResourceContentLoader->stop(); | 1018 m_inspectorResourceContentLoader->stop(); |
| 1022 } | 1019 } |
| 1023 m_frontend->frameNavigated(buildObjectForFrame(loader->frame())); | 1020 m_frontend->frameNavigated(buildObjectForFrame(loader->frame())); |
| 1024 viewportChanged(); | 1021 viewportChanged(); |
| 1025 } | 1022 } |
| 1026 | 1023 |
| 1027 void InspectorPageAgent::frameAttachedToParent(LocalFrame* frame) | 1024 void InspectorPageAgent::frameAttachedToParent(LocalFrame* frame) |
| 1028 { | 1025 { |
| 1029 Frame* parentFrame = frame->tree().parent(); | 1026 Frame* parentFrame = frame->tree().parent(); |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 void InspectorPageAgent::trace(Visitor* visitor) | 1509 void InspectorPageAgent::trace(Visitor* visitor) |
| 1513 { | 1510 { |
| 1514 visitor->trace(m_page); | 1511 visitor->trace(m_page); |
| 1515 visitor->trace(m_injectedScriptManager); | 1512 visitor->trace(m_injectedScriptManager); |
| 1516 visitor->trace(m_inspectorResourceContentLoader); | 1513 visitor->trace(m_inspectorResourceContentLoader); |
| 1517 InspectorBaseAgent::trace(visitor); | 1514 InspectorBaseAgent::trace(visitor); |
| 1518 } | 1515 } |
| 1519 | 1516 |
| 1520 } // namespace blink | 1517 } // namespace blink |
| 1521 | 1518 |
| OLD | NEW |