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

Side by Side Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.h

Issue 2860013002: [DevTools] Support multiple sessions in WebDevToolsAgentImpl (Closed)
Patch Set: zero session id fix Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // InspectorSession::Client implementation. 125 // InspectorSession::Client implementation.
126 void SendProtocolMessage(int session_id, 126 void SendProtocolMessage(int session_id,
127 int call_id, 127 int call_id,
128 const String& response, 128 const String& response,
129 const String& state) override; 129 const String& state) override;
130 130
131 // WebThread::TaskObserver implementation. 131 // WebThread::TaskObserver implementation.
132 void WillProcessTask() override; 132 void WillProcessTask() override;
133 void DidProcessTask() override; 133 void DidProcessTask() override;
134 134
135 void InitializeSession(int session_id, const String& host_id, String* state); 135 InspectorSession* InitializeSession(int session_id,
136 void DestroySession(); 136 const String& host_id,
137 String* state);
138 void DestroySession(int session_id);
137 void DispatchMessageFromFrontend(int session_id, 139 void DispatchMessageFromFrontend(int session_id,
138 const String& method, 140 const String& method,
139 const String& message); 141 const String& message);
140 142
141 friend class WebDevToolsAgent; 143 friend class WebDevToolsAgent;
142 static void RunDebuggerTask( 144 static void RunDebuggerTask(
143 int session_id, 145 int session_id,
144 std::unique_ptr<WebDevToolsAgent::MessageDescriptor>); 146 std::unique_ptr<WebDevToolsAgent::MessageDescriptor>);
145 147
146 bool Attached() const { return session_.Get(); } 148 bool Attached() const { return !!sessions_.size(); }
147 149
148 WebDevToolsAgentClient* client_; 150 WebDevToolsAgentClient* client_;
149 Member<WebLocalFrameBase> web_local_frame_impl_; 151 Member<WebLocalFrameBase> web_local_frame_impl_;
150 152
151 Member<CoreProbeSink> probe_sink_; 153 Member<CoreProbeSink> probe_sink_;
152 Member<InspectorResourceContentLoader> resource_content_loader_; 154 Member<InspectorResourceContentLoader> resource_content_loader_;
153 Member<InspectedFrames> inspected_frames_; 155 Member<InspectedFrames> inspected_frames_;
154 Member<InspectorResourceContainer> resource_container_; 156 Member<InspectorResourceContainer> resource_container_;
157 Member<InspectorTraceEvents> trace_events_;
155 158
156 Member<InspectorPageAgent> page_agent_; 159 HeapHashMap<int, Member<InspectorPageAgent>> page_agents_;
157 Member<InspectorNetworkAgent> network_agent_; 160 HeapHashMap<int, Member<InspectorNetworkAgent>> network_agents_;
158 Member<InspectorLayerTreeAgent> layer_tree_agent_; 161 HeapHashMap<int, Member<InspectorLayerTreeAgent>> layer_tree_agents_;
159 Member<InspectorTracingAgent> tracing_agent_; 162 HeapHashMap<int, Member<InspectorTracingAgent>> tracing_agents_;
160 Member<InspectorTraceEvents> trace_events_agent_; 163 HeapHashMap<int, Member<InspectorOverlayAgent>> overlay_agents_;
161 Member<InspectorOverlayAgent> overlay_agent_;
162 164
163 Member<InspectorSession> session_; 165 HeapHashMap<int, Member<InspectorSession>> sessions_;
164 bool include_view_agents_; 166 bool include_view_agents_;
165 int layer_tree_id_; 167 int layer_tree_id_;
166 }; 168 };
167 169
168 } // namespace blink 170 } // namespace blink
169 171
170 #endif 172 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698