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

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

Issue 1677753002: Mojo C++ bindings: InterfacePtr::PassInterface -> PassInterfaceHandle (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « mojo/services/log/cpp/lib/log_client.cc ('k') | services/gfx/compositor/backend/gpu_output.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/files/interfaces/files.mojom.h" 9 #include "mojo/services/files/interfaces/files.mojom.h"
10 #include "mojo/services/network/interfaces/network_service.mojom.h" 10 #include "mojo/services/network/interfaces/network_service.mojom.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 case mojo::dart::DartControllerServiceConnector::kNetworkServiceId: { 47 case mojo::dart::DartControllerServiceConnector::kNetworkServiceId: {
48 std::string application_name = "mojo:network_service"; 48 std::string application_name = "mojo:network_service";
49 // Construct proxy. 49 // Construct proxy.
50 mojo::NetworkServicePtr interface_ptr; 50 mojo::NetworkServicePtr interface_ptr;
51 runner_->PostTask(FROM_HERE, base::Bind( 51 runner_->PostTask(FROM_HERE, base::Bind(
52 &ContentHandlerAppServiceConnector::Connect<mojo::NetworkService>, 52 &ContentHandlerAppServiceConnector::Connect<mojo::NetworkService>,
53 weak_ptr_factory_.GetWeakPtr(), 53 weak_ptr_factory_.GetWeakPtr(),
54 application_name, 54 application_name,
55 base::Passed(GetProxy(&interface_ptr)))); 55 base::Passed(GetProxy(&interface_ptr))));
56 // Return proxy end of pipe to caller. 56 // Return proxy end of pipe to caller.
57 return interface_ptr.PassInterface().PassHandle().release().value(); 57 return interface_ptr.PassInterfaceHandle().PassHandle().release().value();
58 } 58 }
59 case mojo::dart::DartControllerServiceConnector::kFilesServiceId: { 59 case mojo::dart::DartControllerServiceConnector::kFilesServiceId: {
60 std::string application_name = "mojo:files"; 60 std::string application_name = "mojo:files";
61 // Construct proxy. 61 // Construct proxy.
62 mojo::files::FilesPtr interface_ptr; 62 mojo::files::FilesPtr interface_ptr;
63 runner_->PostTask(FROM_HERE, base::Bind( 63 runner_->PostTask(FROM_HERE, base::Bind(
64 &ContentHandlerAppServiceConnector::Connect<mojo::files::Files>, 64 &ContentHandlerAppServiceConnector::Connect<mojo::files::Files>,
65 weak_ptr_factory_.GetWeakPtr(), 65 weak_ptr_factory_.GetWeakPtr(),
66 application_name, 66 application_name,
67 base::Passed(GetProxy(&interface_ptr)))); 67 base::Passed(GetProxy(&interface_ptr))));
68 return interface_ptr.PassInterface().PassHandle().release().value(); 68 return interface_ptr.PassInterfaceHandle().PassHandle().release().value();
69 } 69 }
70 break; 70 break;
71 default: 71 default:
72 return MOJO_HANDLE_INVALID; 72 return MOJO_HANDLE_INVALID;
73 break; 73 break;
74 } 74 }
75 } 75 }
76 76
77 } // namespace dart 77 } // namespace dart
OLDNEW
« no previous file with comments | « mojo/services/log/cpp/lib/log_client.cc ('k') | services/gfx/compositor/backend/gpu_output.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698