| 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 26 matching lines...) Expand all Loading... |
| 37 #include "core/frame/FrameConsole.h" | 37 #include "core/frame/FrameConsole.h" |
| 38 #include "core/frame/LocalFrame.h" | 38 #include "core/frame/LocalFrame.h" |
| 39 #include "core/inspector/InspectorOverlay.h" | 39 #include "core/inspector/InspectorOverlay.h" |
| 40 #include "core/inspector/InspectorPageAgent.h" | 40 #include "core/inspector/InspectorPageAgent.h" |
| 41 #include "core/inspector/InstrumentingAgents.h" | 41 #include "core/inspector/InstrumentingAgents.h" |
| 42 #include "core/loader/DocumentLoader.h" | 42 #include "core/loader/DocumentLoader.h" |
| 43 #include "core/page/Page.h" | 43 #include "core/page/Page.h" |
| 44 | 44 |
| 45 namespace WebCore { | 45 namespace WebCore { |
| 46 | 46 |
| 47 PassOwnPtr<PageDebuggerAgent> PageDebuggerAgent::create(PageScriptDebugServer* p
ageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptManager* inje
ctedScriptManager, InspectorOverlay* overlay) | 47 PassOwnPtrWillBeRawPtr<PageDebuggerAgent> PageDebuggerAgent::create(PageScriptDe
bugServer* pageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptM
anager* injectedScriptManager, InspectorOverlay* overlay) |
| 48 { | 48 { |
| 49 return adoptPtr(new PageDebuggerAgent(pageScriptDebugServer, pageAgent, inje
ctedScriptManager, overlay)); | 49 return adoptPtrWillBeNoop(new PageDebuggerAgent(pageScriptDebugServer, pageA
gent, injectedScriptManager, overlay)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 PageDebuggerAgent::PageDebuggerAgent(PageScriptDebugServer* pageScriptDebugServe
r, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager,
InspectorOverlay* overlay) | 52 PageDebuggerAgent::PageDebuggerAgent(PageScriptDebugServer* pageScriptDebugServe
r, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager,
InspectorOverlay* overlay) |
| 53 : InspectorDebuggerAgent(injectedScriptManager) | 53 : InspectorDebuggerAgent(injectedScriptManager) |
| 54 , m_pageScriptDebugServer(pageScriptDebugServer) | 54 , m_pageScriptDebugServer(pageScriptDebugServer) |
| 55 , m_pageAgent(pageAgent) | 55 , m_pageAgent(pageAgent) |
| 56 , m_overlay(overlay) | 56 , m_overlay(overlay) |
| 57 { | 57 { |
| 58 m_overlay->overlayHost()->setListener(this); | 58 m_overlay->overlayHost()->setListener(this); |
| 59 } | 59 } |
| 60 | 60 |
| 61 PageDebuggerAgent::~PageDebuggerAgent() | 61 PageDebuggerAgent::~PageDebuggerAgent() |
| 62 { | 62 { |
| 63 } | 63 } |
| 64 | 64 |
| 65 void PageDebuggerAgent::trace(Visitor* visitor) |
| 66 { |
| 67 visitor->trace(m_pageAgent); |
| 68 InspectorDebuggerAgent::trace(visitor); |
| 69 } |
| 70 |
| 65 void PageDebuggerAgent::enable() | 71 void PageDebuggerAgent::enable() |
| 66 { | 72 { |
| 67 InspectorDebuggerAgent::enable(); | 73 InspectorDebuggerAgent::enable(); |
| 68 m_instrumentingAgents->setPageDebuggerAgent(this); | 74 m_instrumentingAgents->setPageDebuggerAgent(this); |
| 69 } | 75 } |
| 70 | 76 |
| 71 void PageDebuggerAgent::disable() | 77 void PageDebuggerAgent::disable() |
| 72 { | 78 { |
| 73 InspectorDebuggerAgent::disable(); | 79 InspectorDebuggerAgent::disable(); |
| 74 m_instrumentingAgents->setPageDebuggerAgent(0); | 80 m_instrumentingAgents->setPageDebuggerAgent(0); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 163 |
| 158 void PageDebuggerAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader) | 164 void PageDebuggerAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader) |
| 159 { | 165 { |
| 160 LocalFrame* mainFrame = frame->page()->mainFrame(); | 166 LocalFrame* mainFrame = frame->page()->mainFrame(); |
| 161 if (loader->frame() == mainFrame) | 167 if (loader->frame() == mainFrame) |
| 162 pageDidCommitLoad(); | 168 pageDidCommitLoad(); |
| 163 } | 169 } |
| 164 | 170 |
| 165 } // namespace WebCore | 171 } // namespace WebCore |
| 166 | 172 |
| OLD | NEW |