Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/interface_stub_declaration.tmpl

Issue 2766523002: mojo: MessageReceiver*::AcceptWithResponder() now take a unique_ptr to the responder (Closed)
Patch Set: comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9f01348cdf5fbde97fffc8c3059d2aefe87cf9d0..79ab46f3373e914e64785136f9d5599a1ade5317 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,9 +1,10 @@
class {{export_attribute}} {{interface.name}}StubDispatch {
public:
static bool Accept({{interface.name}}* impl, mojo::Message* message);
- static bool AcceptWithResponder({{interface.name}}* impl,
- mojo::Message* message,
- mojo::MessageReceiverWithStatus* responder);
+ static bool AcceptWithResponder(
+ {{interface.name}}* impl,
+ mojo::Message* message,
+ std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
@@ -28,11 +29,11 @@ class {{interface.name}}Stub
bool AcceptWithResponder(
mojo::Message* message,
- mojo::MessageReceiverWithStatus* responder) override {
+ std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return {{interface.name}}StubDispatch::AcceptWithResponder(
- ImplRefTraits::GetRawPointer(&sink_), message, responder);
+ ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:

Powered by Google App Engine
This is Rietveld 408576698