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

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..4b22a0305423b4ea7b2d88135f7c875a0d89db29 100644
--- a/content/browser/devtools/devtools_protocol_handler.h
+++ b/content/browser/devtools/devtools_protocol_handler.h
@@ -14,22 +14,25 @@ class DevToolsAgentHost;
class DevToolsProtocolHandler {
public:
using Response = DevToolsProtocolClient::Response;
- using Notifier = base::Callback<void(const std::string& message)>;
DevToolsProtocolHandler(DevToolsAgentHost* agent_host,
dgozman 2015/11/07 02:28:40 Accept a single DevToolsAgentHostImpl* parameter.
kozy 2015/11/07 03:02:35 Done.
- const Notifier& notifier);
+ DevToolsProtocolDelegate* notifier);
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_;

Powered by Google App Engine
This is Rietveld 408576698