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

Unified Diff: examples/forwarding_content_handler/forwarding_content_handler.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 | « examples/echo_terminal/main.cc ('k') | examples/indirect_service/indirect_integer_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/forwarding_content_handler/forwarding_content_handler.cc
diff --git a/examples/forwarding_content_handler/forwarding_content_handler.cc b/examples/forwarding_content_handler/forwarding_content_handler.cc
index 045132efab06feebc634239acdfebd71462425bf..25b02694b7d7ae9896af6d5cb30e9fddd15f4930 100644
--- a/examples/forwarding_content_handler/forwarding_content_handler.cc
+++ b/examples/forwarding_content_handler/forwarding_content_handler.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/macros.h"
#include "base/memory/scoped_ptr.h"
#include "mojo/application/application_runner_chromium.h"
@@ -29,14 +31,14 @@ class ForwardingApplicationImpl : public Application {
private:
// Application:
- 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 AcceptConnection(const String& requestor_url,
InterfaceRequest<ServiceProvider> services,
- ServiceProviderPtr exposed_services,
+ InterfaceHandle<ServiceProvider> exposed_services,
const String& requested_url) override {
shell_->ConnectToApplication(target_url_, services.Pass(),
exposed_services.Pass());
@@ -69,7 +71,7 @@ class ForwardingContentHandler : public ApplicationDelegate,
CHECK(!response.is_null());
const std::string requestor_url(response->url);
std::string target_url;
- if(!common::BlockingCopyToString(response->body.Pass(), &target_url)) {
+ if (!common::BlockingCopyToString(response->body.Pass(), &target_url)) {
LOG(WARNING) << "unable to read target URL from " << requestor_url;
return nullptr;
}
« no previous file with comments | « examples/echo_terminal/main.cc ('k') | examples/indirect_service/indirect_integer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698