| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "core/inspector/MainThreadDebugger.h" | 46 #include "core/inspector/MainThreadDebugger.h" |
| 47 #include "core/loader/DocumentLoader.h" | 47 #include "core/loader/DocumentLoader.h" |
| 48 #include "core/page/Page.h" | 48 #include "core/page/Page.h" |
| 49 | 49 |
| 50 using blink::TypeBuilder::Debugger::ExceptionDetails; | 50 using blink::TypeBuilder::Debugger::ExceptionDetails; |
| 51 using blink::TypeBuilder::Debugger::ScriptId; | 51 using blink::TypeBuilder::Debugger::ScriptId; |
| 52 using blink::TypeBuilder::Runtime::RemoteObject; | 52 using blink::TypeBuilder::Runtime::RemoteObject; |
| 53 | 53 |
| 54 namespace blink { | 54 namespace blink { |
| 55 | 55 |
| 56 PassOwnPtrWillBeRawPtr<PageDebuggerAgent> PageDebuggerAgent::create(MainThreadDe
bugger* MainThreadDebugger, InspectorPageAgent* pageAgent, InjectedScriptManager
* injectedScriptManager, InspectorOverlay* overlay, int debuggerId) | 56 PassOwnPtrWillBeRawPtr<PageDebuggerAgent> PageDebuggerAgent::create(MainThreadDe
bugger* MainThreadDebugger, InspectorPageAgent* pageAgent, InjectedScriptManager
* injectedScriptManager, InspectorOverlay* overlay) |
| 57 { | 57 { |
| 58 return adoptPtrWillBeNoop(new PageDebuggerAgent(MainThreadDebugger, pageAgen
t, injectedScriptManager, overlay, debuggerId)); | 58 return adoptPtrWillBeNoop(new PageDebuggerAgent(MainThreadDebugger, pageAgen
t, injectedScriptManager, overlay)); |
| 59 } | 59 } |
| 60 | 60 |
| 61 PageDebuggerAgent::PageDebuggerAgent(MainThreadDebugger* MainThreadDebugger, Ins
pectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, Inspec
torOverlay* overlay, int debuggerId) | 61 PageDebuggerAgent::PageDebuggerAgent(MainThreadDebugger* MainThreadDebugger, Ins
pectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, Inspec
torOverlay* overlay) |
| 62 : InspectorDebuggerAgent(injectedScriptManager, MainThreadDebugger->debugger
()->isolate()) | 62 : InspectorDebuggerAgent(injectedScriptManager, MainThreadDebugger->debugger
()->isolate()) |
| 63 , m_mainThreadDebugger(MainThreadDebugger) | 63 , m_mainThreadDebugger(MainThreadDebugger) |
| 64 , m_pageAgent(pageAgent) | 64 , m_pageAgent(pageAgent) |
| 65 , m_overlay(overlay) | 65 , m_overlay(overlay) |
| 66 , m_debuggerId(debuggerId) | |
| 67 { | 66 { |
| 68 m_overlay->setListener(this); | 67 m_overlay->setListener(this); |
| 69 } | 68 } |
| 70 | 69 |
| 71 PageDebuggerAgent::~PageDebuggerAgent() | 70 PageDebuggerAgent::~PageDebuggerAgent() |
| 72 { | 71 { |
| 73 } | 72 } |
| 74 | 73 |
| 75 DEFINE_TRACE(PageDebuggerAgent) | 74 DEFINE_TRACE(PageDebuggerAgent) |
| 76 { | 75 { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 109 |
| 111 void PageDebuggerAgent::disable() | 110 void PageDebuggerAgent::disable() |
| 112 { | 111 { |
| 113 InspectorDebuggerAgent::disable(); | 112 InspectorDebuggerAgent::disable(); |
| 114 m_instrumentingAgents->setPageDebuggerAgent(0); | 113 m_instrumentingAgents->setPageDebuggerAgent(0); |
| 115 m_compiledScriptURLs.clear(); | 114 m_compiledScriptURLs.clear(); |
| 116 } | 115 } |
| 117 | 116 |
| 118 void PageDebuggerAgent::startListeningV8Debugger() | 117 void PageDebuggerAgent::startListeningV8Debugger() |
| 119 { | 118 { |
| 120 m_mainThreadDebugger->addListener(this, m_pageAgent->inspectedFrame(), m_deb
uggerId); | 119 m_mainThreadDebugger->addListener(this, m_pageAgent->inspectedFrame()); |
| 121 } | 120 } |
| 122 | 121 |
| 123 void PageDebuggerAgent::stopListeningV8Debugger() | 122 void PageDebuggerAgent::stopListeningV8Debugger() |
| 124 { | 123 { |
| 125 m_mainThreadDebugger->removeListener(this, m_pageAgent->inspectedFrame()); | 124 m_mainThreadDebugger->removeListener(this, m_pageAgent->inspectedFrame()); |
| 126 } | 125 } |
| 127 | 126 |
| 128 V8Debugger& PageDebuggerAgent::debugger() | 127 V8Debugger& PageDebuggerAgent::debugger() |
| 129 { | 128 { |
| 130 return *(m_mainThreadDebugger->debugger()); | 129 return *(m_mainThreadDebugger->debugger()); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 RefPtrWillBeRawPtr<LocalFrame> protect(frame); | 224 RefPtrWillBeRawPtr<LocalFrame> protect(frame); |
| 226 InspectorDebuggerAgent::runScript(errorString, scriptId, executionContextId,
objectGroup, doNotPauseOnExceptionsAndMuteConsole, result, exceptionDetails); | 225 InspectorDebuggerAgent::runScript(errorString, scriptId, executionContextId,
objectGroup, doNotPauseOnExceptionsAndMuteConsole, result, exceptionDetails); |
| 227 | 226 |
| 228 if (frame) | 227 if (frame) |
| 229 InspectorInstrumentation::didEvaluateScript(cookie); | 228 InspectorInstrumentation::didEvaluateScript(cookie); |
| 230 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data(
)); | 229 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data(
)); |
| 231 | 230 |
| 232 } | 231 } |
| 233 | 232 |
| 234 } // namespace blink | 233 } // namespace blink |
| OLD | NEW |