| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |