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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.h

Issue 2951913002: [DevTools] Support multiple sessions in Target domain (Closed)
Patch Set: simplify Created 3 years, 5 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 // Probes 59 // Probes
60 void ShouldWaitForDebuggerOnWorkerStart(bool* result); 60 void ShouldWaitForDebuggerOnWorkerStart(bool* result);
61 void DidStartWorker(WorkerInspectorProxy*, bool waiting_for_debugger); 61 void DidStartWorker(WorkerInspectorProxy*, bool waiting_for_debugger);
62 void WorkerTerminated(WorkerInspectorProxy*); 62 void WorkerTerminated(WorkerInspectorProxy*);
63 63
64 // Called from Dispatcher 64 // Called from Dispatcher
65 protocol::Response setAutoAttach(bool auto_attach, 65 protocol::Response setAutoAttach(bool auto_attach,
66 bool wait_for_debugger_on_start) override; 66 bool wait_for_debugger_on_start) override;
67 protocol::Response setAttachToFrames(bool attach) override; 67 protocol::Response setAttachToFrames(bool attach) override;
68 protocol::Response sendMessageToTarget(const String& target_id, 68 protocol::Response sendMessageToTarget(const String& session_id,
69 const String& message) override; 69 const String& message) override;
70 70
71 void SetTracingSessionId(const String&); 71 void SetTracingSessionId(const String&);
72 72
73 private: 73 private:
74 bool AutoAttachEnabled(); 74 bool AutoAttachEnabled();
75 void ConnectToAllProxies(); 75 void ConnectToAllProxies();
76 void DisconnectFromAllProxies(bool report_to_frontend); 76 void DisconnectFromAllProxies(bool report_to_frontend);
77 void ConnectToProxy(WorkerInspectorProxy*, bool waiting_for_debugger); 77 void ConnectToProxy(WorkerInspectorProxy*, bool waiting_for_debugger);
78 protocol::DictionaryValue* AttachedWorkerIds(); 78 protocol::DictionaryValue* AttachedProtocolIds();
79 79
80 // WorkerInspectorProxy::PageInspector implementation. 80 // WorkerInspectorProxy::PageInspector implementation.
81 void DispatchMessageFromWorker(WorkerInspectorProxy*, 81 void DispatchMessageFromWorker(WorkerInspectorProxy*,
82 int session_id, 82 int session_id,
83 const String& message) override; 83 const String& message) override;
84 84
85 Member<InspectedFrames> inspected_frames_; 85 Member<InspectedFrames> inspected_frames_;
86 HeapHashMap<String, Member<WorkerInspectorProxy>> connected_proxies_; 86 HeapHashMap<int, Member<WorkerInspectorProxy>> connected_proxies_;
87 HashMap<String, int> protocol_to_session_id_;
88 HashMap<int, String> session_to_protocol_id_;
87 String tracing_session_id_; 89 String tracing_session_id_;
90 static int last_session_id_;
88 }; 91 };
89 92
90 } // namespace blink 93 } // namespace blink
91 94
92 #endif // !defined(InspectorWorkerAgent_h) 95 #endif // !defined(InspectorWorkerAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698