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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 public: | 78 public: |
79 static PassOwnPtrWillBeRawPtr<WebDevToolsAgentImpl> create(WebLocalFrameImpl
*, WebDevToolsAgentClient*); | 79 static PassOwnPtrWillBeRawPtr<WebDevToolsAgentImpl> create(WebLocalFrameImpl
*, WebDevToolsAgentClient*); |
80 ~WebDevToolsAgentImpl() override; | 80 ~WebDevToolsAgentImpl() override; |
81 void dispose(); | 81 void dispose(); |
82 DECLARE_VIRTUAL_TRACE(); | 82 DECLARE_VIRTUAL_TRACE(); |
83 | 83 |
84 void willBeDestroyed(); | 84 void willBeDestroyed(); |
85 WebDevToolsAgentClient* client() { return m_client; } | 85 WebDevToolsAgentClient* client() { return m_client; } |
86 InspectorOverlay* overlay() const { return m_overlay.get(); } | 86 InspectorOverlay* overlay() const { return m_overlay.get(); } |
87 void flushPendingProtocolNotifications(); | 87 void flushPendingProtocolNotifications(); |
88 void dispatchMessageFromFrontend(const String& message); | 88 void dispatchMessageFromFrontend(int sessionId, 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, int sessionId) override; |
102 void reattach(const WebString& hostId, const WebString& savedState) override
; | 102 void reattach(const WebString& hostId, int sessionId, const WebString& saved
State) 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(int sessionId, const WebString& message) ove
rride; |
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 WebString evaluateInWebInspectorOverlay(const WebString& script) override; | 108 WebString evaluateInWebInspectorOverlay(const WebString& script) override; |
109 | 109 |
110 private: | 110 private: |
111 WebDevToolsAgentImpl(WebLocalFrameImpl*, WebDevToolsAgentClient*, PassOwnPtr
WillBeRawPtr<InspectorOverlay>); | 111 WebDevToolsAgentImpl(WebLocalFrameImpl*, WebDevToolsAgentClient*, PassOwnPtr
WillBeRawPtr<InspectorOverlay>); |
112 | 112 |
113 // InspectorStateClient implementation. | 113 // InspectorStateClient implementation. |
114 void updateInspectorStateCookie(const WTF::String&) override; | 114 void updateInspectorStateCookie(const WTF::String&) override; |
115 | 115 |
116 // InspectorTracingAgent::Client implementation. | 116 // InspectorTracingAgent::Client implementation. |
117 void enableTracing(const WTF::String& categoryFilter) override; | 117 void enableTracing(const WTF::String& categoryFilter) override; |
118 void disableTracing() override; | 118 void disableTracing() override; |
119 | 119 |
120 // InspectorRuntimeAgent::Client implementation. | 120 // InspectorRuntimeAgent::Client implementation. |
121 void resumeStartup() override; | 121 void resumeStartup() override; |
122 | 122 |
123 // InspectorFrontendChannel implementation. | 123 // InspectorFrontendChannel implementation. |
124 void sendProtocolResponse(int callId, PassRefPtr<JSONObject> message) overri
de; | 124 void sendProtocolResponse(int sessionId, int callId, PassRefPtr<JSONObject>
message) override; |
125 void sendProtocolNotification(PassRefPtr<JSONObject> message) override; | 125 void sendProtocolNotification(PassRefPtr<JSONObject> message) override; |
126 void flush() override; | 126 void flush() override; |
127 | 127 |
128 // WebThread::TaskObserver implementation. | 128 // WebThread::TaskObserver implementation. |
129 void willProcessTask() override; | 129 void willProcessTask() override; |
130 void didProcessTask() override; | 130 void didProcessTask() override; |
131 | 131 |
132 void initializeDeferredAgents(); | 132 void initializeDeferredAgents(); |
133 | 133 |
134 WebDevToolsAgentClient* m_client; | 134 WebDevToolsAgentClient* m_client; |
(...skipping 17 matching lines...) Expand all Loading... |
152 RawPtrWillBeMember<InspectorLayerTreeAgent> m_layerTreeAgent; | 152 RawPtrWillBeMember<InspectorLayerTreeAgent> m_layerTreeAgent; |
153 RawPtrWillBeMember<InspectorTracingAgent> m_tracingAgent; | 153 RawPtrWillBeMember<InspectorTracingAgent> m_tracingAgent; |
154 RawPtrWillBeMember<PageRuntimeAgent> m_pageRuntimeAgent; | 154 RawPtrWillBeMember<PageRuntimeAgent> m_pageRuntimeAgent; |
155 RawPtrWillBeMember<PageConsoleAgent> m_pageConsoleAgent; | 155 RawPtrWillBeMember<PageConsoleAgent> m_pageConsoleAgent; |
156 | 156 |
157 RefPtrWillBeMember<InspectorBackendDispatcher> m_inspectorBackendDispatcher; | 157 RefPtrWillBeMember<InspectorBackendDispatcher> m_inspectorBackendDispatcher; |
158 OwnPtr<InspectorFrontend> m_inspectorFrontend; | 158 OwnPtr<InspectorFrontend> m_inspectorFrontend; |
159 InspectorAgentRegistry m_agents; | 159 InspectorAgentRegistry m_agents; |
160 bool m_deferredAgentsInitialized; | 160 bool m_deferredAgentsInitialized; |
161 | 161 |
162 typedef Vector<RefPtr<JSONObject>> NotificationQueue; | 162 typedef Vector<std::pair<int, RefPtr<JSONObject>>> NotificationQueue; |
163 NotificationQueue m_notificationQueue; | 163 NotificationQueue m_notificationQueue; |
| 164 int m_sessionId; |
164 String m_stateCookie; | 165 String m_stateCookie; |
165 | 166 |
166 friend class DebuggerTask; | 167 friend class DebuggerTask; |
167 }; | 168 }; |
168 | 169 |
169 } // namespace blink | 170 } // namespace blink |
170 | 171 |
171 #endif | 172 #endif |
OLD | NEW |