| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 class WebLayerTreeView; | 62 class WebLayerTreeView; |
| 63 class WebLocalFrameImpl; | 63 class WebLocalFrameImpl; |
| 64 class WebString; | 64 class WebString; |
| 65 class WebViewImpl; | 65 class WebViewImpl; |
| 66 | 66 |
| 67 namespace protocol { | 67 namespace protocol { |
| 68 class Value; | 68 class Value; |
| 69 } | 69 } |
| 70 | 70 |
| 71 class WebDevToolsAgentImpl final | 71 class WebDevToolsAgentImpl final |
| 72 : public NoBaseWillBeGarbageCollectedFinalized<WebDevToolsAgentImpl> | 72 : public GarbageCollectedFinalized<WebDevToolsAgentImpl> |
| 73 , public WebDevToolsAgent | 73 , public WebDevToolsAgent |
| 74 , public InspectorEmulationAgent::Client | 74 , public InspectorEmulationAgent::Client |
| 75 , public InspectorTracingAgent::Client | 75 , public InspectorTracingAgent::Client |
| 76 , public InspectorPageAgent::Client | 76 , public InspectorPageAgent::Client |
| 77 , public InspectorRuntimeAgent::Client | 77 , public InspectorRuntimeAgent::Client |
| 78 , public protocol::FrontendChannel | 78 , public protocol::FrontendChannel |
| 79 , private WebThread::TaskObserver { | 79 , private WebThread::TaskObserver { |
| 80 public: | 80 public: |
| 81 static PassOwnPtrWillBeRawPtr<WebDevToolsAgentImpl> create(WebLocalFrameImpl
*, WebDevToolsAgentClient*); | 81 static RawPtr<WebDevToolsAgentImpl> create(WebLocalFrameImpl*, WebDevToolsAg
entClient*); |
| 82 ~WebDevToolsAgentImpl() override; | 82 ~WebDevToolsAgentImpl() override; |
| 83 void dispose(); | 83 void dispose(); |
| 84 DECLARE_VIRTUAL_TRACE(); | 84 DECLARE_VIRTUAL_TRACE(); |
| 85 | 85 |
| 86 void willBeDestroyed(); | 86 void willBeDestroyed(); |
| 87 WebDevToolsAgentClient* client() { return m_client; } | 87 WebDevToolsAgentClient* client() { return m_client; } |
| 88 InspectorOverlay* overlay() const { return m_overlay.get(); } | 88 InspectorOverlay* overlay() const { return m_overlay.get(); } |
| 89 void flushPendingProtocolNotifications(); | 89 void flushPendingProtocolNotifications(); |
| 90 void dispatchMessageFromFrontend(int sessionId, const String& message); | 90 void dispatchMessageFromFrontend(int sessionId, const String& message); |
| 91 static void webViewImplClosed(WebViewImpl*); | 91 static void webViewImplClosed(WebViewImpl*); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 102 void attach(const WebString& hostId, int sessionId) override; | 102 void attach(const WebString& hostId, int sessionId) override; |
| 103 void reattach(const WebString& hostId, int sessionId, const WebString& saved
State) override; | 103 void reattach(const WebString& hostId, int sessionId, const WebString& saved
State) override; |
| 104 void detach() override; | 104 void detach() override; |
| 105 void continueProgram() override; | 105 void continueProgram() override; |
| 106 void dispatchOnInspectorBackend(int sessionId, const WebString& message) ove
rride; | 106 void dispatchOnInspectorBackend(int sessionId, const WebString& message) ove
rride; |
| 107 void inspectElementAt(const WebPoint&) override; | 107 void inspectElementAt(const WebPoint&) override; |
| 108 void failedToRequestDevTools() override; | 108 void failedToRequestDevTools() override; |
| 109 WebString evaluateInWebInspectorOverlay(const WebString& script) override; | 109 WebString evaluateInWebInspectorOverlay(const WebString& script) override; |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 WebDevToolsAgentImpl(WebLocalFrameImpl*, WebDevToolsAgentClient*, PassOwnPtr
WillBeRawPtr<InspectorOverlay>); | 112 WebDevToolsAgentImpl(WebLocalFrameImpl*, WebDevToolsAgentClient*, RawPtr<Ins
pectorOverlay>); |
| 113 | 113 |
| 114 // InspectorTracingAgent::Client implementation. | 114 // InspectorTracingAgent::Client implementation. |
| 115 void enableTracing(const WTF::String& categoryFilter) override; | 115 void enableTracing(const WTF::String& categoryFilter) override; |
| 116 void disableTracing() override; | 116 void disableTracing() override; |
| 117 | 117 |
| 118 // InspectorEmulationAgent::Client implementation. | 118 // InspectorEmulationAgent::Client implementation. |
| 119 void setCPUThrottlingRate(double) override; | 119 void setCPUThrottlingRate(double) override; |
| 120 | 120 |
| 121 // InspectorRuntimeAgent::Client implementation. | 121 // InspectorRuntimeAgent::Client implementation. |
| 122 void resumeStartup() override; | 122 void resumeStartup() override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 134 // WebThread::TaskObserver implementation. | 134 // WebThread::TaskObserver implementation. |
| 135 void willProcessTask() override; | 135 void willProcessTask() override; |
| 136 void didProcessTask() override; | 136 void didProcessTask() override; |
| 137 | 137 |
| 138 void initializeDeferredAgents(); | 138 void initializeDeferredAgents(); |
| 139 | 139 |
| 140 friend class WebDevToolsAgent; | 140 friend class WebDevToolsAgent; |
| 141 static void runDebuggerTask(int sessionId, PassOwnPtr<WebDevToolsAgent::Mess
ageDescriptor>); | 141 static void runDebuggerTask(int sessionId, PassOwnPtr<WebDevToolsAgent::Mess
ageDescriptor>); |
| 142 | 142 |
| 143 WebDevToolsAgentClient* m_client; | 143 WebDevToolsAgentClient* m_client; |
| 144 RawPtrWillBeMember<WebLocalFrameImpl> m_webLocalFrameImpl; | 144 Member<WebLocalFrameImpl> m_webLocalFrameImpl; |
| 145 bool m_attached; | 145 bool m_attached; |
| 146 #if ENABLE(ASSERT) | 146 #if ENABLE(ASSERT) |
| 147 bool m_hasBeenDisposed; | 147 bool m_hasBeenDisposed; |
| 148 #endif | 148 #endif |
| 149 | 149 |
| 150 RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; | 150 Member<InstrumentingAgents> m_instrumentingAgents; |
| 151 OwnPtrWillBeMember<InspectorResourceContentLoader> m_resourceContentLoader; | 151 Member<InspectorResourceContentLoader> m_resourceContentLoader; |
| 152 OwnPtrWillBeMember<InspectorOverlay> m_overlay; | 152 Member<InspectorOverlay> m_overlay; |
| 153 OwnPtrWillBeMember<InspectedFrames> m_inspectedFrames; | 153 Member<InspectedFrames> m_inspectedFrames; |
| 154 | 154 |
| 155 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; | 155 Member<InspectorDOMAgent> m_domAgent; |
| 156 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; | 156 Member<InspectorPageAgent> m_pageAgent; |
| 157 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent; | 157 Member<InspectorResourceAgent> m_resourceAgent; |
| 158 RawPtrWillBeMember<InspectorLayerTreeAgent> m_layerTreeAgent; | 158 Member<InspectorLayerTreeAgent> m_layerTreeAgent; |
| 159 RawPtrWillBeMember<InspectorTracingAgent> m_tracingAgent; | 159 Member<InspectorTracingAgent> m_tracingAgent; |
| 160 | 160 |
| 161 OwnPtr<protocol::Dispatcher> m_inspectorBackendDispatcher; | 161 OwnPtr<protocol::Dispatcher> m_inspectorBackendDispatcher; |
| 162 OwnPtr<protocol::Frontend> m_inspectorFrontend; | 162 OwnPtr<protocol::Frontend> m_inspectorFrontend; |
| 163 InspectorAgentRegistry m_agents; | 163 InspectorAgentRegistry m_agents; |
| 164 bool m_deferredAgentsInitialized; | 164 bool m_deferredAgentsInitialized; |
| 165 | 165 |
| 166 typedef Vector<std::pair<int, OwnPtr<protocol::Value>>> NotificationQueue; | 166 typedef Vector<std::pair<int, OwnPtr<protocol::Value>>> NotificationQueue; |
| 167 NotificationQueue m_notificationQueue; | 167 NotificationQueue m_notificationQueue; |
| 168 int m_sessionId; | 168 int m_sessionId; |
| 169 String m_stateCookie; | 169 String m_stateCookie; |
| 170 bool m_stateMuted; | 170 bool m_stateMuted; |
| 171 int m_layerTreeId; | 171 int m_layerTreeId; |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| 175 | 175 |
| 176 #endif | 176 #endif |
| OLD | NEW |