| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 DEFINE_TRACE(WorkerDebuggerAgent) | 57 DEFINE_TRACE(WorkerDebuggerAgent) |
| 58 { | 58 { |
| 59 visitor->trace(m_inspectedWorkerGlobalScope); | 59 visitor->trace(m_inspectedWorkerGlobalScope); |
| 60 InspectorDebuggerAgent::trace(visitor); | 60 InspectorDebuggerAgent::trace(visitor); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void WorkerDebuggerAgent::startListeningV8Debugger() | 63 void WorkerDebuggerAgent::startListeningV8Debugger() |
| 64 { | 64 { |
| 65 m_workerThreadDebugger->addListener(this); | 65 m_workerThreadDebugger->addListener(this); |
| 66 InspectorDebuggerAgent::startListeningV8Debugger(); |
| 66 } | 67 } |
| 67 | 68 |
| 68 void WorkerDebuggerAgent::stopListeningV8Debugger() | 69 void WorkerDebuggerAgent::stopListeningV8Debugger() |
| 69 { | 70 { |
| 70 m_workerThreadDebugger->removeListener(this); | 71 m_workerThreadDebugger->removeListener(this); |
| 72 InspectorDebuggerAgent::stopListeningV8Debugger(); |
| 71 } | 73 } |
| 72 | 74 |
| 73 InjectedScript WorkerDebuggerAgent::injectedScriptForEval(ErrorString* error, co
nst int* executionContextId) | 75 InjectedScript WorkerDebuggerAgent::defaultInjectedScript() |
| 74 { | 76 { |
| 75 if (!executionContextId) | 77 return injectedScriptManager()->injectedScriptFor(m_inspectedWorkerGlobalSco
pe->script()->scriptState()); |
| 76 return injectedScriptManager()->injectedScriptFor(m_inspectedWorkerGloba
lScope->script()->scriptState()); | |
| 77 | |
| 78 InjectedScript injectedScript = injectedScriptManager()->injectedScriptForId
(*executionContextId); | |
| 79 if (injectedScript.isEmpty()) | |
| 80 *error = "Execution context with given id not found."; | |
| 81 return injectedScript; | |
| 82 } | 78 } |
| 83 | 79 |
| 84 void WorkerDebuggerAgent::muteConsole() | 80 void WorkerDebuggerAgent::muteConsole() |
| 85 { | 81 { |
| 86 // We don't need to mute console for workers. | 82 // We don't need to mute console for workers. |
| 87 } | 83 } |
| 88 | 84 |
| 89 void WorkerDebuggerAgent::unmuteConsole() | 85 void WorkerDebuggerAgent::unmuteConsole() |
| 90 { | 86 { |
| 91 // We don't need to mute console for workers. | 87 // We don't need to mute console for workers. |
| 92 } | 88 } |
| 93 | 89 |
| 94 } // namespace blink | 90 } // namespace blink |
| OLD | NEW |