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

Side by Side Diff: services/dart/content_handler_app_service_connector.cc

Issue 1118843003: Remove some InterfacePtr<> methods which directly deal with message pipe handles. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/dart/content_handler_app_service_connector.h" 5 #include "services/dart/content_handler_app_service_connector.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "mojo/public/cpp/bindings/interface_request.h" 8 #include "mojo/public/cpp/bindings/interface_request.h"
9 #include "mojo/services/network/public/interfaces/network_service.mojom.h" 9 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 case mojo::dart::DartControllerServiceConnector::kNetworkServiceId: { 46 case mojo::dart::DartControllerServiceConnector::kNetworkServiceId: {
47 std::string application_name = "mojo:network_service"; 47 std::string application_name = "mojo:network_service";
48 // Construct proxy. 48 // Construct proxy.
49 mojo::NetworkServicePtr interface_ptr; 49 mojo::NetworkServicePtr interface_ptr;
50 runner_->PostTask(FROM_HERE, base::Bind( 50 runner_->PostTask(FROM_HERE, base::Bind(
51 &ContentHandlerAppServiceConnector::Connect<mojo::NetworkService>, 51 &ContentHandlerAppServiceConnector::Connect<mojo::NetworkService>,
52 weak_ptr_factory_.GetWeakPtr(), 52 weak_ptr_factory_.GetWeakPtr(),
53 application_name, 53 application_name,
54 base::Passed(GetProxy(&interface_ptr)))); 54 base::Passed(GetProxy(&interface_ptr))));
55 // Return proxy end of pipe to caller. 55 // Return proxy end of pipe to caller.
56 return interface_ptr.PassMessagePipe().release().value(); 56 return interface_ptr.PassInterface().PassHandle().release().value();
57 } 57 }
58 break; 58 break;
59 default: 59 default:
60 return MOJO_HANDLE_INVALID; 60 return MOJO_HANDLE_INVALID;
61 break; 61 break;
62 } 62 }
63 } 63 }
64 64
65 } // namespace dart 65 } // namespace dart
OLDNEW
« no previous file with comments | « mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc ('k') | services/js/echo_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698