| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROME_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ |
| 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/values.h" | 12 #include "base/values.h" |
| 12 | 13 |
| 13 // Utility class for processing DevTools remote debugging messages. | 14 // Utility class for processing DevTools remote debugging messages. |
| 14 class DevToolsProtocol { | 15 class DevToolsProtocol { |
| 15 public: | 16 public: |
| 16 // Caller maintains ownership of |command|. |*params| is owned by |command|. | 17 // Caller maintains ownership of |command|. |*params| is owned by |command|. |
| 17 static bool ParseCommand(base::DictionaryValue* command, | 18 static bool ParseCommand(base::DictionaryValue* command, |
| 18 int* command_id, | 19 int* command_id, |
| 19 std::string* method, | 20 std::string* method, |
| 20 base::DictionaryValue** params); | 21 base::DictionaryValue** params); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 38 static scoped_ptr<base::DictionaryValue> CreateInvalidParamsResponse( | 39 static scoped_ptr<base::DictionaryValue> CreateInvalidParamsResponse( |
| 39 int command_id, | 40 int command_id, |
| 40 const std::string& param); | 41 const std::string& param); |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 DevToolsProtocol() {} | 44 DevToolsProtocol() {} |
| 44 ~DevToolsProtocol() {} | 45 ~DevToolsProtocol() {} |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ | 48 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ |
| OLD | NEW |