OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_HANDLER_H_ |
7 | 7 |
8 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" | 8 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 10 matching lines...) Expand all Loading... |
21 virtual ~DevToolsProtocolHandler(); | 21 virtual ~DevToolsProtocolHandler(); |
22 | 22 |
23 void HandleMessage(int session_id, const std::string& message); | 23 void HandleMessage(int session_id, const std::string& message); |
24 bool HandleOptionalMessage(int session_id, | 24 bool HandleOptionalMessage(int session_id, |
25 const std::string& message, | 25 const std::string& message, |
26 int* call_id); | 26 int* call_id); |
27 | 27 |
28 DevToolsProtocolDispatcher* dispatcher() { return &dispatcher_; } | 28 DevToolsProtocolDispatcher* dispatcher() { return &dispatcher_; } |
29 | 29 |
30 private: | 30 private: |
31 scoped_ptr<base::DictionaryValue> ParseCommand(int session_id, | 31 std::unique_ptr<base::DictionaryValue> ParseCommand( |
32 const std::string& message); | 32 int session_id, |
| 33 const std::string& message); |
33 bool PassCommandToDelegate(int session_id, base::DictionaryValue* command); | 34 bool PassCommandToDelegate(int session_id, base::DictionaryValue* command); |
34 void HandleCommand(int session_id, scoped_ptr<base::DictionaryValue> command); | 35 void HandleCommand(int session_id, |
| 36 std::unique_ptr<base::DictionaryValue> command); |
35 bool HandleOptionalCommand(int session_id, | 37 bool HandleOptionalCommand(int session_id, |
36 scoped_ptr<base::DictionaryValue> command, | 38 std::unique_ptr<base::DictionaryValue> command, |
37 int* call_id); | 39 int* call_id); |
38 | 40 |
39 DevToolsAgentHost* agent_host_; | 41 DevToolsAgentHost* agent_host_; |
40 DevToolsProtocolClient client_; | 42 DevToolsProtocolClient client_; |
41 DevToolsProtocolDispatcher dispatcher_; | 43 DevToolsProtocolDispatcher dispatcher_; |
42 }; | 44 }; |
43 | 45 |
44 } // namespace content | 46 } // namespace content |
45 | 47 |
46 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_HANDLER_H_ | 48 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_HANDLER_H_ |
OLD | NEW |