OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 30 matching lines...) Expand all Loading... |
41 #include "public/web/WebDevToolsAgent.h" | 41 #include "public/web/WebDevToolsAgent.h" |
42 #include "wtf/Forward.h" | 42 #include "wtf/Forward.h" |
43 #include "wtf/OwnPtr.h" | 43 #include "wtf/OwnPtr.h" |
44 #include "wtf/Vector.h" | 44 #include "wtf/Vector.h" |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 | 47 |
48 class DebuggerTask; | 48 class DebuggerTask; |
49 class GraphicsLayer; | 49 class GraphicsLayer; |
50 class InspectorInspectorAgent; | 50 class InspectorInspectorAgent; |
51 class InspectorOverlay; | 51 class InspectorOverlayImpl; |
52 class InspectorPageAgent; | 52 class InspectorPageAgent; |
53 class InspectorResourceContentLoader; | 53 class InspectorResourceContentLoader; |
54 class LocalFrame; | 54 class LocalFrame; |
55 class Page; | 55 class Page; |
56 class PageConsoleAgent; | 56 class PageConsoleAgent; |
57 class PlatformGestureEvent; | 57 class PlatformGestureEvent; |
58 class PlatformKeyboardEvent; | 58 class PlatformKeyboardEvent; |
59 class PlatformMouseEvent; | 59 class PlatformMouseEvent; |
60 class PlatformTouchEvent; | 60 class PlatformTouchEvent; |
61 class WebDevToolsAgentClient; | 61 class WebDevToolsAgentClient; |
(...skipping 13 matching lines...) Expand all Loading... |
75 , public InspectorFrontendChannel | 75 , public InspectorFrontendChannel |
76 , private WebThread::TaskObserver { | 76 , private WebThread::TaskObserver { |
77 public: | 77 public: |
78 static PassOwnPtrWillBeRawPtr<WebDevToolsAgentImpl> create(WebLocalFrameImpl
*, WebDevToolsAgentClient*); | 78 static PassOwnPtrWillBeRawPtr<WebDevToolsAgentImpl> create(WebLocalFrameImpl
*, WebDevToolsAgentClient*); |
79 ~WebDevToolsAgentImpl() override; | 79 ~WebDevToolsAgentImpl() override; |
80 void dispose(); | 80 void dispose(); |
81 DECLARE_VIRTUAL_TRACE(); | 81 DECLARE_VIRTUAL_TRACE(); |
82 | 82 |
83 void willBeDestroyed(); | 83 void willBeDestroyed(); |
84 WebDevToolsAgentClient* client() { return m_client; } | 84 WebDevToolsAgentClient* client() { return m_client; } |
85 InspectorOverlay* overlay() const { return m_overlay.get(); } | 85 InspectorOverlayImpl* overlay() const { return m_overlay.get(); } |
86 bool handleInputEvent(const WebInputEvent&); | 86 bool handleInputEvent(const WebInputEvent&); |
87 void flushPendingProtocolNotifications(); | 87 void flushPendingProtocolNotifications(); |
88 void dispatchMessageFromFrontend(const String& message); | 88 void dispatchMessageFromFrontend(const String& message); |
89 void registerAgent(PassOwnPtrWillBeRawPtr<InspectorAgent>); | 89 void registerAgent(PassOwnPtrWillBeRawPtr<InspectorAgent>); |
90 static void webViewImplClosed(WebViewImpl*); | 90 static void webViewImplClosed(WebViewImpl*); |
91 static void webFrameWidgetImplClosed(WebFrameWidgetImpl*); | 91 static void webFrameWidgetImplClosed(WebFrameWidgetImpl*); |
92 | 92 |
93 // Instrumentation from web/ layer. | 93 // Instrumentation from web/ layer. |
94 void didCommitLoadForLocalFrame(LocalFrame*); | 94 void didCommitLoadForLocalFrame(LocalFrame*); |
95 bool screencastEnabled(); | 95 bool screencastEnabled(); |
96 void willAddPageOverlay(const GraphicsLayer*); | 96 void willAddPageOverlay(const GraphicsLayer*); |
97 void didRemovePageOverlay(const GraphicsLayer*); | 97 void didRemovePageOverlay(const GraphicsLayer*); |
98 void layerTreeViewChanged(WebLayerTreeView*); | 98 void layerTreeViewChanged(WebLayerTreeView*); |
99 | 99 |
100 // WebDevToolsAgent implementation. | 100 // WebDevToolsAgent implementation. |
101 void attach(const WebString& hostId) override; | 101 void attach(const WebString& hostId) override; |
102 void reattach(const WebString& hostId, const WebString& savedState) override
; | 102 void reattach(const WebString& hostId, const WebString& savedState) override
; |
103 void detach() override; | 103 void detach() override; |
104 void continueProgram() override; | 104 void continueProgram() override; |
105 void dispatchOnInspectorBackend(const WebString& message) override; | 105 void dispatchOnInspectorBackend(const WebString& message) override; |
106 void inspectElementAt(const WebPoint&) override; | 106 void inspectElementAt(const WebPoint&) override; |
107 void evaluateInWebInspector(long callId, const WebString& script) override; | 107 void evaluateInWebInspector(long callId, const WebString& script) override; |
108 | 108 |
109 private: | 109 private: |
110 WebDevToolsAgentImpl(WebLocalFrameImpl*, WebDevToolsAgentClient*, PassOwnPtr
WillBeRawPtr<InspectorOverlay>); | 110 WebDevToolsAgentImpl(WebLocalFrameImpl*, WebDevToolsAgentClient*, PassOwnPtr
WillBeRawPtr<InspectorOverlayImpl>); |
111 | 111 |
112 // InspectorStateClient implementation. | 112 // InspectorStateClient implementation. |
113 void updateInspectorStateCookie(const WTF::String&) override; | 113 void updateInspectorStateCookie(const WTF::String&) override; |
114 | 114 |
115 // InspectorTracingAgent::Client implementation. | 115 // InspectorTracingAgent::Client implementation. |
116 void enableTracing(const WTF::String& categoryFilter) override; | 116 void enableTracing(const WTF::String& categoryFilter) override; |
117 void disableTracing() override; | 117 void disableTracing() override; |
118 | 118 |
119 // InspectorRuntimeAgent::Client implementation. | 119 // InspectorRuntimeAgent::Client implementation. |
120 void resumeStartup() override; | 120 void resumeStartup() override; |
(...skipping 16 matching lines...) Expand all Loading... |
137 RawPtrWillBeMember<WebLocalFrameImpl> m_webLocalFrameImpl; | 137 RawPtrWillBeMember<WebLocalFrameImpl> m_webLocalFrameImpl; |
138 bool m_attached; | 138 bool m_attached; |
139 #if ENABLE(ASSERT) | 139 #if ENABLE(ASSERT) |
140 bool m_hasBeenDisposed; | 140 bool m_hasBeenDisposed; |
141 #endif | 141 #endif |
142 | 142 |
143 RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; | 143 RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; |
144 OwnPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; | 144 OwnPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; |
145 OwnPtrWillBeMember<InspectorResourceContentLoader> m_resourceContentLoader; | 145 OwnPtrWillBeMember<InspectorResourceContentLoader> m_resourceContentLoader; |
146 OwnPtrWillBeMember<InspectorCompositeState> m_state; | 146 OwnPtrWillBeMember<InspectorCompositeState> m_state; |
147 OwnPtrWillBeMember<InspectorOverlay> m_overlay; | 147 OwnPtrWillBeMember<InspectorOverlayImpl> m_overlay; |
148 | 148 |
149 RawPtrWillBeMember<InspectorInspectorAgent> m_inspectorAgent; | 149 RawPtrWillBeMember<InspectorInspectorAgent> m_inspectorAgent; |
150 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; | 150 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; |
151 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; | 151 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
152 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; | 152 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; |
153 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent; | 153 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent; |
154 RawPtrWillBeMember<InspectorLayerTreeAgent> m_layerTreeAgent; | 154 RawPtrWillBeMember<InspectorLayerTreeAgent> m_layerTreeAgent; |
155 RawPtrWillBeMember<InspectorTracingAgent> m_tracingAgent; | 155 RawPtrWillBeMember<InspectorTracingAgent> m_tracingAgent; |
156 RawPtrWillBeMember<PageRuntimeAgent> m_pageRuntimeAgent; | 156 RawPtrWillBeMember<PageRuntimeAgent> m_pageRuntimeAgent; |
157 RawPtrWillBeMember<PageConsoleAgent> m_pageConsoleAgent; | 157 RawPtrWillBeMember<PageConsoleAgent> m_pageConsoleAgent; |
158 | 158 |
159 RefPtrWillBeMember<InspectorBackendDispatcher> m_inspectorBackendDispatcher; | 159 RefPtrWillBeMember<InspectorBackendDispatcher> m_inspectorBackendDispatcher; |
160 OwnPtr<InspectorFrontend> m_inspectorFrontend; | 160 OwnPtr<InspectorFrontend> m_inspectorFrontend; |
161 InspectorAgentRegistry m_agents; | 161 InspectorAgentRegistry m_agents; |
162 OwnPtrWillBeMember<AsyncCallTracker> m_asyncCallTracker; | 162 OwnPtrWillBeMember<AsyncCallTracker> m_asyncCallTracker; |
163 bool m_deferredAgentsInitialized; | 163 bool m_deferredAgentsInitialized; |
164 | 164 |
165 typedef Vector<RefPtr<JSONObject>> NotificationQueue; | 165 typedef Vector<RefPtr<JSONObject>> NotificationQueue; |
166 NotificationQueue m_notificationQueue; | 166 NotificationQueue m_notificationQueue; |
167 String m_stateCookie; | 167 String m_stateCookie; |
168 | 168 |
169 friend class DebuggerTask; | 169 friend class DebuggerTask; |
170 }; | 170 }; |
171 | 171 |
172 } // namespace blink | 172 } // namespace blink |
173 | 173 |
174 #endif | 174 #endif |
OLD | NEW |