| Index: third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
|
| diff --git a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
|
| index 8f0412a5f607267b5adf08105555fb797e74c27a..3d2491d647047ef9aca84b07525bf7f2c2520d18 100644
|
| --- a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
|
| +++ b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
|
| @@ -6,8 +6,9 @@
|
|
|
| #include "{{config.protocol.package}}/{{domain.domain}}.h"
|
|
|
| -namespace blink {
|
| -namespace protocol {
|
| +{% for namespace in config.protocol.namespace %}
|
| +namespace {{namespace}} {
|
| +{% endfor %}
|
| namespace {{domain.domain}} {
|
|
|
| // ------------- Enum values from types.
|
| @@ -92,13 +93,13 @@ std::unique_ptr<{{type.id}}> {{type.id}}::clone() const
|
| }
|
| {% if type.exported %}
|
|
|
| -String16 {{type.id}}::toJSONString() const
|
| +String {{type.id}}::toJSONString() const
|
| {
|
| return serialize()->toJSONString();
|
| }
|
|
|
| // static
|
| -std::unique_ptr<API::{{type.id}}> API::{{type.id}}::fromJSONString(const String16& json)
|
| +std::unique_ptr<API::{{type.id}}> API::{{type.id}}::fromJSONString(const String& json)
|
| {
|
| ErrorSupport errors;
|
| std::unique_ptr<Value> value = parseJSON(json);
|
| @@ -182,11 +183,11 @@ public:
|
| {% endfor %}
|
| }
|
| ~DispatcherImpl() override { }
|
| - void dispatch(int callId, const String16& method, std::unique_ptr<protocol::DictionaryValue> messageObject) override;
|
| + void dispatch(int callId, const String& method, std::unique_ptr<protocol::DictionaryValue> messageObject) override;
|
|
|
| protected:
|
| using CallHandler = void (DispatcherImpl::*)(int callId, std::unique_ptr<DictionaryValue> messageObject, ErrorSupport* errors);
|
| - using DispatchMap = protocol::HashMap<String16, CallHandler>;
|
| + using DispatchMap = protocol::HashMap<String, CallHandler>;
|
| DispatchMap m_dispatchMap;
|
|
|
| {% for command in domain.commands %}
|
| @@ -198,9 +199,9 @@ protected:
|
| Backend* m_backend;
|
| };
|
|
|
| -void DispatcherImpl::dispatch(int callId, const String16& method, std::unique_ptr<protocol::DictionaryValue> messageObject)
|
| +void DispatcherImpl::dispatch(int callId, const String& method, std::unique_ptr<protocol::DictionaryValue> messageObject)
|
| {
|
| - protocol::HashMap<String16, CallHandler>::iterator it = m_dispatchMap.find(method);
|
| + protocol::HashMap<String, CallHandler>::iterator it = m_dispatchMap.find(method);
|
| if (it == m_dispatchMap.end()) {
|
| reportProtocolError(callId, MethodNotFound, "'" + method + "' wasn't found", nullptr);
|
| return;
|
| @@ -344,5 +345,6 @@ void Dispatcher::wire(UberDispatcher* dispatcher, Backend* backend)
|
| }
|
|
|
| } // {{domain.domain}}
|
| -} // namespace protocol
|
| -} // namespace blink
|
| +{% for namespace in config.protocol.namespace %}
|
| +} // namespace {{namespace}}
|
| +{% endfor %}
|
|
|