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

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: 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
« no previous file with comments | « apps/moterm/moterm_view.h ('k') | examples/content_handler_demo/content_handler_demo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/moterm/moterm_view.cc
diff --git a/apps/moterm/moterm_view.cc b/apps/moterm/moterm_view.cc
index 30b8e9434a172b9e72d468ae2163012baa4dac4c..2c286e4f553403195c3ae94c559cd7c82bcfdff0 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); };
}
« no previous file with comments | « apps/moterm/moterm_view.h ('k') | examples/content_handler_demo/content_handler_demo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698