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

Unified Diff: apps/moterm/moterm_view.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: delay InterfacePtr::Create() until you actually need an InterfacePtr. GetProxy() and ConnectToAppl… 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: apps/moterm/moterm_view.cc
diff --git a/apps/moterm/moterm_view.cc b/apps/moterm/moterm_view.cc
index 4f992cc983e5fafbecb2a80e6306767de7729293..ee7ecbeebcfe57261fb29048a5a294c79ab2a1c6 100644
--- a/apps/moterm/moterm_view.cc
+++ b/apps/moterm/moterm_view.cc
@@ -13,6 +13,7 @@
#include <algorithm>
#include <string>
+#include <utility>
#include "apps/moterm/key_util.h"
#include "base/bind.h"
@@ -162,7 +163,7 @@ void MotermView::Connect(
}
void MotermView::ConnectToClient(
- mojo::terminal::TerminalClientPtr terminal_client,
+ mojo::InterfaceHandle<mojo::terminal::TerminalClient> terminal_client,
bool force,
const ConnectToClientCallback& callback) {
if (driver_) {
@@ -176,9 +177,10 @@ void MotermView::ConnectToClient(
}
}
- mojo::files::FilePtr file;
+ mojo::InterfaceHandle<mojo::files::File> file;
driver_ = MotermDriver::Create(this, GetProxy(&file));
- terminal_client->ConnectToTerminal(file.Pass());
+ mojo::terminal::TerminalClientPtr::Create(std::move(terminal_client))
+ ->ConnectToTerminal(std::move(file));
DCHECK(on_closed_callback_.is_null());
on_closed_callback_ = [callback] { callback.Run(mojo::files::Error::OK); };
}

Powered by Google App Engine
This is Rietveld 408576698