| 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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 Settings* settings = mainFrame()->settings(); | 975 Settings* settings = mainFrame()->settings(); |
| 976 if (settings) { | 976 if (settings) { |
| 977 m_ignoreScriptsEnabledNotification = true; | 977 m_ignoreScriptsEnabledNotification = true; |
| 978 settings->setScriptEnabled(!value); | 978 settings->setScriptEnabled(!value); |
| 979 m_ignoreScriptsEnabledNotification = false; | 979 m_ignoreScriptsEnabledNotification = false; |
| 980 } | 980 } |
| 981 } | 981 } |
| 982 | 982 |
| 983 void InspectorPageAgent::didClearDocumentOfWindowObject(LocalFrame* frame) | 983 void InspectorPageAgent::didClearDocumentOfWindowObject(LocalFrame* frame) |
| 984 { | 984 { |
| 985 if (frame == m_page->mainFrame()) | |
| 986 m_injectedScriptManager->discardInjectedScripts(); | |
| 987 | |
| 988 if (!m_frontend) | 985 if (!m_frontend) |
| 989 return; | 986 return; |
| 990 | 987 |
| 991 RefPtr<JSONObject> scripts = m_state->getObject(PageAgentState::pageAgentScr
iptsToEvaluateOnLoad); | 988 RefPtr<JSONObject> scripts = m_state->getObject(PageAgentState::pageAgentScr
iptsToEvaluateOnLoad); |
| 992 if (scripts) { | 989 if (scripts) { |
| 993 JSONObject::const_iterator end = scripts->end(); | 990 JSONObject::const_iterator end = scripts->end(); |
| 994 for (JSONObject::const_iterator it = scripts->begin(); it != end; ++it)
{ | 991 for (JSONObject::const_iterator it = scripts->begin(); it != end; ++it)
{ |
| 995 String scriptText; | 992 String scriptText; |
| 996 if (it->value->asString(&scriptText)) | 993 if (it->value->asString(&scriptText)) |
| 997 frame->script().executeScriptInMainWorld(scriptText); | 994 frame->script().executeScriptInMainWorld(scriptText); |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1496 void InspectorPageAgent::trace(Visitor* visitor) | 1493 void InspectorPageAgent::trace(Visitor* visitor) |
| 1497 { | 1494 { |
| 1498 visitor->trace(m_page); | 1495 visitor->trace(m_page); |
| 1499 visitor->trace(m_injectedScriptManager); | 1496 visitor->trace(m_injectedScriptManager); |
| 1500 visitor->trace(m_inspectorResourceContentLoader); | 1497 visitor->trace(m_inspectorResourceContentLoader); |
| 1501 InspectorBaseAgent::trace(visitor); | 1498 InspectorBaseAgent::trace(visitor); |
| 1502 } | 1499 } |
| 1503 | 1500 |
| 1504 } // namespace blink | 1501 } // namespace blink |
| 1505 | 1502 |
| OLD | NEW |