Chromium Code Reviews| Index: mojo/public/tools/bindings/generators/cpp_templates/interface_stub_declaration.tmpl |
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/interface_stub_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/interface_stub_declaration.tmpl |
| index afc6504dc81f33bf535546964eafcd06a29d266b..76b6bd78a88621a4b34497060bcd523ce32a1103 100644 |
| --- a/mojo/public/tools/bindings/generators/cpp_templates/interface_stub_declaration.tmpl |
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/interface_stub_declaration.tmpl |
| @@ -1,6 +1,7 @@ |
| class {{interface.name}}Stub : public mojo::MessageReceiverWithResponder { |
| public: |
| {{interface.name}}Stub(); |
| + virtual ~{{interface.name}}Stub() override; |
|
jamesr
2015/03/16 21:05:57
"virtual" and "override" are redundant, you only w
rudominer
2015/03/16 22:57:20
Done.
|
| void set_sink({{interface.name}}* sink) { sink_ = sink; } |
| {{interface.name}}* sink() { return sink_; } |
| @@ -8,6 +9,26 @@ class {{interface.name}}Stub : public mojo::MessageReceiverWithResponder { |
| virtual bool AcceptWithResponder(mojo::Message* message, |
| mojo::MessageReceiver* responder) override; |
| + void OnConnectionError() { |
| + connection_error_occurred_ = true; |
| + } |
| + |
| + bool connection_error_occurred() const { |
| + return connection_error_occurred_; |
| + } |
| + |
| + void Close() { |
| + closed_ = true; |
| + } |
| + |
| + bool closed() { |
| + return closed_; |
| + } |
| + |
| + |
| private: |
| {{interface.name}}* sink_; |
| + ::mojo::internal::SharedData<{{interface.name}}Stub*> weak_self_; |
| + bool connection_error_occurred_; |
| + bool closed_; |
| }; |