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

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

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 20 matching lines...) Expand all
31 #ifndef PageDebuggerAgent_h 31 #ifndef PageDebuggerAgent_h
32 #define PageDebuggerAgent_h 32 #define PageDebuggerAgent_h
33 33
34 #include "bindings/core/v8/PageScriptDebugServer.h" 34 #include "bindings/core/v8/PageScriptDebugServer.h"
35 #include "core/inspector/InspectorDebuggerAgent.h" 35 #include "core/inspector/InspectorDebuggerAgent.h"
36 #include "core/inspector/InspectorOverlayHost.h" 36 #include "core/inspector/InspectorOverlayHost.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class DocumentLoader; 40 class DocumentLoader;
41 class EditedResourcesContentManager;
41 class InspectorOverlay; 42 class InspectorOverlay;
42 class InspectorPageAgent; 43 class InspectorPageAgent;
43 class Page; 44 class Page;
44 class PageScriptDebugServer; 45 class PageScriptDebugServer;
45 class ScriptSourceCode; 46 class ScriptSourceCode;
46 47
47 class PageDebuggerAgent FINAL 48 class PageDebuggerAgent FINAL
48 : public InspectorDebuggerAgent 49 : public InspectorDebuggerAgent
49 , public InspectorOverlayHost::Listener { 50 , public InspectorOverlayHost::Listener {
50 WTF_MAKE_NONCOPYABLE(PageDebuggerAgent); 51 WTF_MAKE_NONCOPYABLE(PageDebuggerAgent);
51 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 52 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
52 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PageDebuggerAgent); 53 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PageDebuggerAgent);
53 public: 54 public:
54 static PassOwnPtrWillBeRawPtr<PageDebuggerAgent> create(PageScriptDebugServe r*, InspectorPageAgent*, InjectedScriptManager*, InspectorOverlay*); 55 static PassOwnPtrWillBeRawPtr<PageDebuggerAgent> create(PageScriptDebugServe r*, InspectorPageAgent*, InjectedScriptManager*, EditedResourcesContentManager*, InspectorOverlay*);
55 virtual ~PageDebuggerAgent(); 56 virtual ~PageDebuggerAgent();
56 virtual void trace(Visitor*) OVERRIDE; 57 virtual void trace(Visitor*) OVERRIDE;
57 58
58 void didClearDocumentOfWindowObject(LocalFrame*); 59 void didClearDocumentOfWindowObject(LocalFrame*);
59 String preprocessEventListener(LocalFrame*, const String& source, const Stri ng& url, const String& functionName); 60 String preprocessEventListener(LocalFrame*, const String& source, const Stri ng& url, const String& functionName);
60 PassOwnPtr<ScriptSourceCode> preprocess(LocalFrame*, const ScriptSourceCode& ); 61 PassOwnPtr<ScriptSourceCode> preprocess(LocalFrame*, const ScriptSourceCode& );
61 void didCommitLoad(LocalFrame*, DocumentLoader*); 62 void didCommitLoad(LocalFrame*, DocumentLoader*);
62 63
63 protected: 64 protected:
64 virtual void enable() OVERRIDE; 65 virtual void enable() OVERRIDE;
65 virtual void disable() OVERRIDE; 66 virtual void disable() OVERRIDE;
66 67
67 private: 68 private:
68 virtual void startListeningScriptDebugServer() OVERRIDE; 69 virtual void startListeningScriptDebugServer() OVERRIDE;
69 virtual void stopListeningScriptDebugServer() OVERRIDE; 70 virtual void stopListeningScriptDebugServer() OVERRIDE;
70 virtual PageScriptDebugServer& scriptDebugServer() OVERRIDE; 71 virtual PageScriptDebugServer& scriptDebugServer() OVERRIDE;
71 virtual void muteConsole() OVERRIDE; 72 virtual void muteConsole() OVERRIDE;
72 virtual void unmuteConsole() OVERRIDE; 73 virtual void unmuteConsole() OVERRIDE;
73 74
74 // InspectorOverlayHost::Listener implementation. 75 // InspectorOverlayHost::Listener implementation.
75 virtual void overlayResumed() OVERRIDE; 76 virtual void overlayResumed() OVERRIDE;
76 virtual void overlaySteppedOver() OVERRIDE; 77 virtual void overlaySteppedOver() OVERRIDE;
77 78
78 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut ionContextId) OVERRIDE; 79 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut ionContextId) OVERRIDE;
79 virtual void setOverlayMessage(ErrorString*, const String*) OVERRIDE; 80 virtual void setOverlayMessage(ErrorString*, const String*) OVERRIDE;
80 81
81 PageDebuggerAgent(PageScriptDebugServer*, InspectorPageAgent*, InjectedScrip tManager*, InspectorOverlay*); 82 PageDebuggerAgent(PageScriptDebugServer*, InspectorPageAgent*, InjectedScrip tManager*, EditedResourcesContentManager*, InspectorOverlay*);
82 // FIXME: Oilpan: Move PageScriptDebugServer to heap in follow-up CL. 83 // FIXME: Oilpan: Move PageScriptDebugServer to heap in follow-up CL.
83 PageScriptDebugServer* m_pageScriptDebugServer; 84 PageScriptDebugServer* m_pageScriptDebugServer;
84 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; 85 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent;
85 InspectorOverlay* m_overlay; 86 InspectorOverlay* m_overlay;
86 }; 87 };
87 88
88 } // namespace blink 89 } // namespace blink
89 90
90 91
91 #endif // !defined(PageDebuggerAgent_h) 92 #endif // !defined(PageDebuggerAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698