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

Unified Diff: examples/content_handler_demo/content_handler_demo.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.cc ('k') | examples/echo_terminal/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/content_handler_demo/content_handler_demo.cc
diff --git a/examples/content_handler_demo/content_handler_demo.cc b/examples/content_handler_demo/content_handler_demo.cc
index aa6012dd8b7c66b513a8e9aa80616efc6a93ac8c..fe885d9797bbb26c815c00e95ceb712db6d9e429 100644
--- a/examples/content_handler_demo/content_handler_demo.cc
+++ b/examples/content_handler_demo/content_handler_demo.cc
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <memory>
+#include <utility>
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_delegate.h"
@@ -23,16 +24,16 @@ class PrintBodyApplication : public Application {
ScopedDataPipeConsumerHandle body)
: binding_(this, request.Pass()), body_(body.Pass()) {}
- void Initialize(ShellPtr shell,
+ void Initialize(InterfaceHandle<Shell> shell,
Array<String> args,
const mojo::String& url) override {
- shell_ = shell.Pass();
+ shell_ = ShellPtr::Create(std::move(shell));
}
void RequestQuit() override {}
void AcceptConnection(const String& requestor_url,
InterfaceRequest<ServiceProvider> services,
- ServiceProviderPtr exported_services,
+ InterfaceHandle<ServiceProvider> exported_services,
const String& url) override {
printf(
"ContentHandler::OnConnect - url:%s - requestor_url:%s - body "
@@ -110,7 +111,6 @@ class ContentHandlerApp : public ApplicationDelegate,
}
private:
-
MOJO_DISALLOW_COPY_AND_ASSIGN(ContentHandlerApp);
};
« no previous file with comments | « apps/moterm/moterm_view.cc ('k') | examples/echo_terminal/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698