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

Unified Diff: content/browser/devtools/devtools_protocol_handler.h

Issue 1408363004: [DevTools] Filter any messages from previous sessions in DevToolsAgentHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/devtools/devtools_protocol_handler.h
diff --git a/content/browser/devtools/devtools_protocol_handler.h b/content/browser/devtools/devtools_protocol_handler.h
index 299b3423088457444fe78a3a471316fc16df10fa..32f49287d84631a5e59af577203edb65b455a768 100644
--- a/content/browser/devtools/devtools_protocol_handler.h
+++ b/content/browser/devtools/devtools_protocol_handler.h
@@ -10,26 +10,30 @@
namespace content {
class DevToolsAgentHost;
+class DevToolsAgentHostImpl;
+class DevToolsProtocolDelegate;
class DevToolsProtocolHandler {
public:
using Response = DevToolsProtocolClient::Response;
- using Notifier = base::Callback<void(const std::string& message)>;
- DevToolsProtocolHandler(DevToolsAgentHost* agent_host,
- const Notifier& notifier);
+ explicit DevToolsProtocolHandler(DevToolsAgentHostImpl* agent_host);
virtual ~DevToolsProtocolHandler();
- void HandleMessage(const std::string& message);
- bool HandleOptionalMessage(const std::string& message, int* call_id);
+ void HandleMessage(int session_id, const std::string& message);
+ bool HandleOptionalMessage(int session_id,
+ const std::string& message,
+ int* call_id);
DevToolsProtocolDispatcher* dispatcher() { return &dispatcher_; }
private:
- scoped_ptr<base::DictionaryValue> ParseCommand(const std::string& message);
- bool PassCommandToDelegate(base::DictionaryValue* command);
- void HandleCommand(scoped_ptr<base::DictionaryValue> command);
- bool HandleOptionalCommand(scoped_ptr<base::DictionaryValue> command,
+ scoped_ptr<base::DictionaryValue> ParseCommand(int session_id,
+ const std::string& message);
+ bool PassCommandToDelegate(int session_id, base::DictionaryValue* command);
+ void HandleCommand(int session_id, scoped_ptr<base::DictionaryValue> command);
+ bool HandleOptionalCommand(int session_id,
+ scoped_ptr<base::DictionaryValue> command,
int* call_id);
DevToolsAgentHost* agent_host_;
« no previous file with comments | « content/browser/devtools/devtools_agent_host_impl.cc ('k') | content/browser/devtools/devtools_protocol_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698