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

Unified Diff: examples/echo_terminal/main.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 years, 10 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: examples/echo_terminal/main.cc
diff --git a/examples/echo_terminal/main.cc b/examples/echo_terminal/main.cc
index ef6b40ecf3ca2614e93a4291c2a8921088b3c2af..f4a0ec1c0143aed58fbdaf23bd4f025fa8b4b83f 100644
--- a/examples/echo_terminal/main.cc
+++ b/examples/echo_terminal/main.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/logging.h"
@@ -118,10 +120,12 @@ class EchoTerminalApp
}
// |mojo::terminal::TerminalClient| implementation:
- void ConnectToTerminal(mojo::files::FilePtr terminal) override {
+ void ConnectToTerminal(
+ mojo::InterfaceHandle<mojo::files::File> terminal) override {
DCHECK(terminal);
// The |TerminalEchoer| will own itself.
- (new TerminalEchoer(terminal.Pass()))->StartReading();
+ (new TerminalEchoer(mojo::files::FilePtr::Create(std::move(terminal))))
+ ->StartReading();
}
mojo::BindingSet<mojo::terminal::TerminalClient> terminal_clients_;

Powered by Google App Engine
This is Rietveld 408576698