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

Side by Side Diff: mojo/shell/public/cpp/lib/service_connector_registry.cc

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
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
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 "mojo/shell/public/cpp/lib/service_connector_registry.h" 5 #include "mojo/shell/public/cpp/lib/service_connector_registry.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "mojo/shell/public/cpp/service_connector.h" 9 #include "mojo/shell/public/cpp/service_connector.h"
10 10
(...skipping 24 matching lines...) Expand all
35 const std::string& interface_name) { 35 const std::string& interface_name) {
36 NameToServiceConnectorMap::iterator it = 36 NameToServiceConnectorMap::iterator it =
37 name_to_service_connector_.find(interface_name); 37 name_to_service_connector_.find(interface_name);
38 if (it == name_to_service_connector_.end()) 38 if (it == name_to_service_connector_.end())
39 return; 39 return;
40 delete it->second; 40 delete it->second;
41 name_to_service_connector_.erase(it); 41 name_to_service_connector_.erase(it);
42 } 42 }
43 43
44 void ServiceConnectorRegistry::ConnectToService( 44 void ServiceConnectorRegistry::ConnectToService(
45 ApplicationConnection* application_connection, 45 Connection* connection,
46 const std::string& interface_name, 46 const std::string& interface_name,
47 ScopedMessagePipeHandle client_handle) { 47 ScopedMessagePipeHandle client_handle) {
48 auto iter = name_to_service_connector_.find(interface_name); 48 auto iter = name_to_service_connector_.find(interface_name);
49 if (iter != name_to_service_connector_.end()) { 49 if (iter != name_to_service_connector_.end()) {
50 iter->second->ConnectToService(application_connection, interface_name, 50 iter->second->ConnectToService(connection, interface_name,
51 std::move(client_handle)); 51 std::move(client_handle));
52 return; 52 return;
53 } 53 }
54 if (service_connector_) { 54 if (service_connector_) {
55 service_connector_->ConnectToService(application_connection, interface_name, 55 service_connector_->ConnectToService(connection, interface_name,
56 std::move(client_handle)); 56 std::move(client_handle));
57 } 57 }
58 } 58 }
59 59
60 } // namespace internal 60 } // namespace internal
61 } // namespace mojo 61 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/lib/service_connector_registry.h ('k') | mojo/shell/public/cpp/lib/service_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698