Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: Source/core/inspector/PageDebuggerAgent.cpp

Issue 445023005: DevTools: reduce ResourceAgent dependency on PageAgent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/inspector/PageDebuggerAgent.h" 32 #include "core/inspector/PageDebuggerAgent.h"
33 33
34 #include "bindings/core/v8/DOMWrapperWorld.h" 34 #include "bindings/core/v8/DOMWrapperWorld.h"
35 #include "bindings/core/v8/ScriptController.h" 35 #include "bindings/core/v8/ScriptController.h"
36 #include "bindings/core/v8/ScriptSourceCode.h" 36 #include "bindings/core/v8/ScriptSourceCode.h"
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/EditedResourcesContentManager.h"
39 #include "core/inspector/InspectorOverlay.h" 40 #include "core/inspector/InspectorOverlay.h"
40 #include "core/inspector/InspectorPageAgent.h" 41 #include "core/inspector/InspectorPageAgent.h"
41 #include "core/inspector/InstrumentingAgents.h" 42 #include "core/inspector/InstrumentingAgents.h"
42 #include "core/loader/DocumentLoader.h" 43 #include "core/loader/DocumentLoader.h"
43 #include "core/page/Page.h" 44 #include "core/page/Page.h"
44 45
45 namespace blink { 46 namespace blink {
46 47
47 PassOwnPtrWillBeRawPtr<PageDebuggerAgent> PageDebuggerAgent::create(PageScriptDe bugServer* pageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptM anager* injectedScriptManager, InspectorOverlay* overlay) 48 PassOwnPtrWillBeRawPtr<PageDebuggerAgent> PageDebuggerAgent::create(PageScriptDe bugServer* pageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptM anager* injectedScriptManager, EditedResourcesContentManager* editedResourcesCon tentManager, InspectorOverlay* overlay)
48 { 49 {
49 return adoptPtrWillBeNoop(new PageDebuggerAgent(pageScriptDebugServer, pageA gent, injectedScriptManager, overlay)); 50 return adoptPtrWillBeNoop(new PageDebuggerAgent(pageScriptDebugServer, pageA gent, injectedScriptManager, editedResourcesContentManager, overlay));
50 } 51 }
51 52
52 PageDebuggerAgent::PageDebuggerAgent(PageScriptDebugServer* pageScriptDebugServe r, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay) 53 PageDebuggerAgent::PageDebuggerAgent(PageScriptDebugServer* pageScriptDebugServe r, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, EditedResourcesContentManager* editedResourcesContentManager, InspectorOverlay* overlay)
53 : InspectorDebuggerAgent(injectedScriptManager) 54 : InspectorDebuggerAgent(injectedScriptManager, editedResourcesContentManage r)
54 , m_pageScriptDebugServer(pageScriptDebugServer) 55 , m_pageScriptDebugServer(pageScriptDebugServer)
55 , m_pageAgent(pageAgent) 56 , m_pageAgent(pageAgent)
56 , m_overlay(overlay) 57 , m_overlay(overlay)
57 { 58 {
58 m_overlay->overlayHost()->setListener(this); 59 m_overlay->overlayHost()->setListener(this);
59 } 60 }
60 61
61 PageDebuggerAgent::~PageDebuggerAgent() 62 PageDebuggerAgent::~PageDebuggerAgent()
62 { 63 {
63 } 64 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 164
164 void PageDebuggerAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader) 165 void PageDebuggerAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader)
165 { 166 {
166 Frame* mainFrame = frame->page()->deprecatedLocalMainFrame(); 167 Frame* mainFrame = frame->page()->deprecatedLocalMainFrame();
167 if (loader->frame() == mainFrame) 168 if (loader->frame() == mainFrame)
168 pageDidCommitLoad(); 169 pageDidCommitLoad();
169 } 170 }
170 171
171 } // namespace blink 172 } // namespace blink
172 173
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698