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

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

Issue 146683002: InspectorController should lazily initialize InspectorAgents which begin instrumenting at later sta… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch after rebase! Created 6 years, 11 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 27 matching lines...) Expand all
38 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class DOMWrapperWorld; 42 class DOMWrapperWorld;
43 class Frame; 43 class Frame;
44 class GraphicsContext; 44 class GraphicsContext;
45 class InjectedScriptManager; 45 class InjectedScriptManager;
46 class InspectorBackendDispatcher; 46 class InspectorBackendDispatcher;
47 class InspectorClient; 47 class InspectorClient;
48 class InspectorDOMAgent;
48 class InspectorFrontend; 49 class InspectorFrontend;
49 class InspectorFrontendChannel; 50 class InspectorFrontendChannel;
50 class InspectorFrontendClient; 51 class InspectorFrontendClient;
51 class InspectorMemoryAgent; 52 class InspectorPageAgent;
52 class InspectorTimelineAgent; 53 class InspectorTimelineAgent;
53 class InspectorOverlay; 54 class InspectorOverlay;
54 class InspectorState; 55 class InspectorState;
55 class InstrumentingAgents; 56 class InstrumentingAgents;
56 class IntPoint; 57 class IntPoint;
57 class IntSize; 58 class IntSize;
58 class Page; 59 class Page;
59 class PlatformGestureEvent; 60 class PlatformGestureEvent;
60 class PlatformKeyboardEvent; 61 class PlatformKeyboardEvent;
61 class PlatformMouseEvent; 62 class PlatformMouseEvent;
62 class PlatformTouchEvent; 63 class PlatformTouchEvent;
63 class Node; 64 class Node;
64 65
65 struct Highlight; 66 struct Highlight;
66 67
67 class InspectorController { 68 class InspectorController {
68 WTF_MAKE_NONCOPYABLE(InspectorController); 69 WTF_MAKE_NONCOPYABLE(InspectorController);
69 WTF_MAKE_FAST_ALLOCATED; 70 WTF_MAKE_FAST_ALLOCATED;
70 public: 71 public:
71 ~InspectorController(); 72 ~InspectorController();
72 73
73 static PassOwnPtr<InspectorController> create(Page*, InspectorClient*); 74 static PassOwnPtr<InspectorController> create(Page*, InspectorClient*);
75
76 void initializeDeferredAgents();
74 void inspectedPageDestroyed(); 77 void inspectedPageDestroyed();
75 78
76 void registerModuleAgent(PassOwnPtr<InspectorAgent>); 79 void registerModuleAgent(PassOwnPtr<InspectorAgent>);
77 80
78 void setInspectorFrontendClient(PassOwnPtr<InspectorFrontendClient>); 81 void setInspectorFrontendClient(PassOwnPtr<InspectorFrontendClient>);
79 void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*); 82 void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*);
80 void setInjectedScriptForOrigin(const String& origin, const String& source); 83 void setInjectedScriptForOrigin(const String& origin, const String& source);
81 84
82 void dispatchMessageFromFrontend(const String& message); 85 void dispatchMessageFromFrontend(const String& message);
83 86
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 private: 126 private:
124 InspectorController(Page*, InspectorClient*); 127 InspectorController(Page*, InspectorClient*);
125 128
126 friend InstrumentingAgents* instrumentationForPage(Page*); 129 friend InstrumentingAgents* instrumentationForPage(Page*);
127 130
128 RefPtr<InstrumentingAgents> m_instrumentingAgents; 131 RefPtr<InstrumentingAgents> m_instrumentingAgents;
129 OwnPtr<InjectedScriptManager> m_injectedScriptManager; 132 OwnPtr<InjectedScriptManager> m_injectedScriptManager;
130 OwnPtr<InspectorCompositeState> m_state; 133 OwnPtr<InspectorCompositeState> m_state;
131 OwnPtr<InspectorOverlay> m_overlay; 134 OwnPtr<InspectorOverlay> m_overlay;
132 135
133 InspectorMemoryAgent* m_memoryAgent; 136 InspectorDOMAgent* m_domAgent;
137 InspectorPageAgent* m_pageAgent;
134 InspectorTimelineAgent* m_timelineAgent; 138 InspectorTimelineAgent* m_timelineAgent;
135 139
136 RefPtr<InspectorBackendDispatcher> m_inspectorBackendDispatcher; 140 RefPtr<InspectorBackendDispatcher> m_inspectorBackendDispatcher;
137 OwnPtr<InspectorFrontendClient> m_inspectorFrontendClient; 141 OwnPtr<InspectorFrontendClient> m_inspectorFrontendClient;
138 OwnPtr<InspectorFrontend> m_inspectorFrontend; 142 OwnPtr<InspectorFrontend> m_inspectorFrontend;
139 Page* m_page; 143 Page* m_page;
140 InspectorClient* m_inspectorClient; 144 InspectorClient* m_inspectorClient;
141 InspectorAgentRegistry m_agents; 145 InspectorAgentRegistry m_agents;
142 bool m_isUnderTest; 146 bool m_isUnderTest;
147 bool m_initializeDeferredAgents;
143 }; 148 };
144 149
145 } 150 }
146 151
147 152
148 #endif // !defined(InspectorController_h) 153 #endif // !defined(InspectorController_h)
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorController.cpp » ('j') | Source/core/inspector/InspectorController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698