| OLD | NEW |
| 1 // This file is generated | 1 // This file is generated |
| 2 | 2 |
| 3 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 3 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 4 // Use of this source code is governed by a BSD-style license that can be | 4 // Use of this source code is governed by a BSD-style license that can be |
| 5 // found in the LICENSE file. | 5 // found in the LICENSE file. |
| 6 | 6 |
| 7 #include "platform/inspector_protocol/{{class_name}}.h" | 7 #include "platform/inspector_protocol/{{class_name}}.h" |
| 8 | 8 |
| 9 #include "platform/inspector_protocol/String16.h" | 9 #include "platform/inspector_protocol/String16.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 {% for parameter in event.parameters %} | 37 {% for parameter in event.parameters %} |
| 38 {% if "optional" in parameter %} | 38 {% if "optional" in parameter %} |
| 39 if ({{parameter.name}}.isJust()) | 39 if ({{parameter.name}}.isJust()) |
| 40 paramsObject->setValue("{{parameter.name}}", toValue({{parameter.name}}.
fromJust())); | 40 paramsObject->setValue("{{parameter.name}}", toValue({{parameter.name}}.
fromJust())); |
| 41 {% else %} | 41 {% else %} |
| 42 paramsObject->setValue("{{parameter.name}}", toValue({{resolve_type(paramete
r).to_raw_type % parameter.name}})); | 42 paramsObject->setValue("{{parameter.name}}", toValue({{resolve_type(paramete
r).to_raw_type % parameter.name}})); |
| 43 {% endif %} | 43 {% endif %} |
| 44 {% endfor %} | 44 {% endfor %} |
| 45 jsonMessage->setObject("params", std::move(paramsObject)); | 45 jsonMessage->setObject("params", std::move(paramsObject)); |
| 46 if (m_frontendChannel) | 46 if (m_frontendChannel) |
| 47 m_frontendChannel->sendProtocolNotification(std::move(jsonMessage)); | 47 m_frontendChannel->sendProtocolNotification(jsonMessage->toJSONString())
; |
| 48 } | 48 } |
| 49 {% endfor %} | 49 {% endfor %} |
| 50 {% endfor %} | 50 {% endfor %} |
| 51 | 51 |
| 52 } // namespace protocol | 52 } // namespace protocol |
| 53 } // namespace blink | 53 } // namespace blink |
| OLD | NEW |