| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 visitor->trace(m_workerGlobalScope); | 53 visitor->trace(m_workerGlobalScope); |
| 54 InspectorRuntimeAgent::trace(visitor); | 54 InspectorRuntimeAgent::trace(visitor); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void WorkerRuntimeAgent::enable(ErrorString* errorString) | 57 void WorkerRuntimeAgent::enable(ErrorString* errorString) |
| 58 { | 58 { |
| 59 if (m_enabled) | 59 if (m_enabled) |
| 60 return; | 60 return; |
| 61 | 61 |
| 62 InspectorRuntimeAgent::enable(errorString); | 62 InspectorRuntimeAgent::enable(errorString); |
| 63 addExecutionContextToFrontend(m_workerGlobalScope->script()->scriptState(),
true, m_workerGlobalScope->url(), ""); | 63 addExecutionContextToFrontend(m_workerGlobalScope->scriptController()->scrip
tState(), true, m_workerGlobalScope->url(), ""); |
| 64 } | 64 } |
| 65 | 65 |
| 66 InjectedScript WorkerRuntimeAgent::injectedScriptForEval(ErrorString* error, con
st int* executionContextId) | 66 InjectedScript WorkerRuntimeAgent::injectedScriptForEval(ErrorString* error, con
st int* executionContextId) |
| 67 { | 67 { |
| 68 if (!executionContextId) | 68 if (!executionContextId) |
| 69 return injectedScriptManager()->injectedScriptFor(m_workerGlobalScope->s
cript()->scriptState()); | 69 return injectedScriptManager()->injectedScriptFor(m_workerGlobalScope->s
criptController()->scriptState()); |
| 70 | 70 |
| 71 InjectedScript injectedScript = injectedScriptManager()->injectedScriptForId
(*executionContextId); | 71 InjectedScript injectedScript = injectedScriptManager()->injectedScriptForId
(*executionContextId); |
| 72 if (injectedScript.isEmpty()) | 72 if (injectedScript.isEmpty()) |
| 73 *error = "Execution context with given id not found."; | 73 *error = "Execution context with given id not found."; |
| 74 return injectedScript; | 74 return injectedScript; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void WorkerRuntimeAgent::muteConsole() | 77 void WorkerRuntimeAgent::muteConsole() |
| 78 { | 78 { |
| 79 // We don't need to mute console for workers. | 79 // We don't need to mute console for workers. |
| 80 } | 80 } |
| 81 | 81 |
| 82 void WorkerRuntimeAgent::unmuteConsole() | 82 void WorkerRuntimeAgent::unmuteConsole() |
| 83 { | 83 { |
| 84 // We don't need to mute console for workers. | 84 // We don't need to mute console for workers. |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace blink | 87 } // namespace blink |
| OLD | NEW |