| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 void PageDebuggerAgent::muteConsole() | 86 void PageDebuggerAgent::muteConsole() |
| 87 { | 87 { |
| 88 PageConsole::mute(); | 88 PageConsole::mute(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void PageDebuggerAgent::unmuteConsole() | 91 void PageDebuggerAgent::unmuteConsole() |
| 92 { | 92 { |
| 93 PageConsole::unmute(); | 93 PageConsole::unmute(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void PageDebuggerAgent::addConsoleMessage(MessageSource source, MessageLevel lev
el, const String& message, const String& sourceURL) |
| 97 { |
| 98 m_pageAgent->page()->console()->addMessage(source, level, message, sourceURL
, 0); |
| 99 } |
| 100 |
| 96 InjectedScript PageDebuggerAgent::injectedScriptForEval(ErrorString* errorString
, const int* executionContextId) | 101 InjectedScript PageDebuggerAgent::injectedScriptForEval(ErrorString* errorString
, const int* executionContextId) |
| 97 { | 102 { |
| 98 if (!executionContextId) { | 103 if (!executionContextId) { |
| 99 ScriptState* scriptState = mainWorldScriptState(m_pageAgent->mainFrame()
); | 104 ScriptState* scriptState = mainWorldScriptState(m_pageAgent->mainFrame()
); |
| 100 return injectedScriptManager()->injectedScriptFor(scriptState); | 105 return injectedScriptManager()->injectedScriptFor(scriptState); |
| 101 } | 106 } |
| 102 InjectedScript injectedScript = injectedScriptManager()->injectedScriptForId
(*executionContextId); | 107 InjectedScript injectedScript = injectedScriptManager()->injectedScriptForId
(*executionContextId); |
| 103 if (injectedScript.hasNoValue()) | 108 if (injectedScript.hasNoValue()) |
| 104 *errorString = "Execution context with given id not found."; | 109 *errorString = "Execution context with given id not found."; |
| 105 return injectedScript; | 110 return injectedScript; |
| 106 } | 111 } |
| 107 | 112 |
| 108 void PageDebuggerAgent::setOverlayMessage(ErrorString*, const String* message) | 113 void PageDebuggerAgent::setOverlayMessage(ErrorString*, const String* message) |
| 109 { | 114 { |
| 110 m_overlay->setPausedInDebuggerMessage(message); | 115 m_overlay->setPausedInDebuggerMessage(message); |
| 111 } | 116 } |
| 112 | 117 |
| 113 void PageDebuggerAgent::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorl
d* world) | 118 void PageDebuggerAgent::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorl
d* world) |
| 114 { | 119 { |
| 115 if (world != mainThreadNormalWorld() || frame != m_pageAgent->mainFrame()) | 120 if (world != mainThreadNormalWorld() || frame != m_pageAgent->mainFrame()) |
| 116 return; | 121 return; |
| 117 | 122 |
| 118 reset(); | 123 reset(); |
| 119 scriptDebugServer().setScriptPreprocessor(m_pageAgent->scriptPreprocessor())
; | 124 scriptDebugServer().setScriptPreprocessor(m_pageAgent->scriptPreprocessor())
; |
| 120 } | 125 } |
| 121 | 126 |
| 122 } // namespace WebCore | 127 } // namespace WebCore |
| 123 | 128 |
| OLD | NEW |