| Index: third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
|
| diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
|
| index b116ed5929fb6b2cd735e76de9e9a9fb61d5ce73..c29e8e8d9e77f71a9c0cfc32b24f4a2de2b27d7f 100644
|
| --- a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
|
| +++ b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
|
| @@ -7,47 +7,54 @@
|
| #ifndef {{class_name}}_h
|
| #define {{class_name}}_h
|
|
|
| -
|
| #include "platform/inspector_protocol/FrontendChannel.h"
|
| #include "platform/inspector_protocol/TypeBuilder.h"
|
|
|
| namespace blink {
|
| namespace protocol {
|
|
|
| -class PLATFORM_EXPORT Frontend {
|
| -public:
|
| - Frontend(FrontendChannel*);
|
| - FrontendChannel* channel() { return m_frontendChannel; }
|
| +class PLATFORM_EXPORT Frontend;
|
|
|
| {% for domain in api.domains %}
|
|
|
| - class PLATFORM_EXPORT {{domain.domain}} {
|
| - public:
|
| - static {{domain.domain}}* from(Frontend* frontend) { return &(frontend->m_{{domain.domain | lower}}) ;}
|
| - {{domain.domain}}(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
|
| +namespace {{domain.domain}} {
|
| +
|
| +class PLATFORM_EXPORT Frontend {
|
| +public:
|
| + static Frontend* from(protocol::Frontend* frontend);
|
| + Frontend(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
|
| {% for event in domain.events %}
|
| {% if "handlers" in event and not ("renderer" in event["handlers"]) %}{% continue %}{% endif %}
|
| - void {{event.name}}(
|
| + void {{event.name}}(
|
| {%- for parameter in event.parameters -%}
|
| {%- if "optional" in parameter -%}
|
| - const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}} = Maybe<{{resolve_type(parameter).raw_type}}>()
|
| + const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}} = Maybe<{{resolve_type(parameter).raw_type}}>()
|
| {%- else -%}
|
| - {{resolve_type(parameter).pass_type}} {{parameter.name}}
|
| + {{resolve_type(parameter).pass_type}} {{parameter.name}}
|
| {%- endif -%}{%- if not loop.last -%}, {% endif -%}
|
| {%- endfor -%}
|
| - );
|
| + );
|
| {% endfor %}
|
|
|
| - void flush() { m_frontendChannel->flushProtocolNotifications(); }
|
| - private:
|
| - FrontendChannel* m_frontendChannel;
|
| - };
|
| + void flush() { m_frontendChannel->flushProtocolNotifications(); }
|
| +private:
|
| + FrontendChannel* m_frontendChannel;
|
| +};
|
| +
|
| +} // namespace {{domain.domain}}
|
| {% endfor %}
|
|
|
| +class PLATFORM_EXPORT Frontend {
|
| +public:
|
| + Frontend(FrontendChannel*);
|
| + FrontendChannel* channel() { return m_frontendChannel; }
|
| +
|
| private:
|
| FrontendChannel* m_frontendChannel;
|
| +
|
| +public:
|
| {% for domain in api.domains %}
|
| - {{domain.domain}} m_{{domain.domain | lower}};
|
| + {{domain.domain}}::Frontend m_{{domain.domain | lower}};
|
| {% endfor %}
|
| };
|
|
|
|
|