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 #ifndef MOJO_SHELL_CONNECT_UTIL_H_ | 5 #ifndef MOJO_SHELL_CONNECT_UTIL_H_ |
6 #define MOJO_SHELL_CONNECT_UTIL_H_ | 6 #define MOJO_SHELL_CONNECT_UTIL_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "mojo/public/cpp/bindings/interface_ptr.h" | 10 #include "mojo/public/cpp/bindings/interface_ptr.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 ptr->Bind(InterfacePtrInfo<Interface>(std::move(service_handle), 0u)); | 37 ptr->Bind(InterfacePtrInfo<Interface>(std::move(service_handle), 0u)); |
38 } | 38 } |
39 | 39 |
40 template <typename Interface> | 40 template <typename Interface> |
41 inline void ConnectToInterface(ApplicationManager* application_manager, | 41 inline void ConnectToInterface(ApplicationManager* application_manager, |
42 const Identity& source, | 42 const Identity& source, |
43 const GURL& application_url, | 43 const GURL& application_url, |
44 InterfacePtr<Interface>* ptr) { | 44 InterfacePtr<Interface>* ptr) { |
45 ScopedMessagePipeHandle service_handle = ConnectToInterfaceByName( | 45 ScopedMessagePipeHandle service_handle = ConnectToInterfaceByName( |
46 application_manager, source, | 46 application_manager, source, |
47 Identity(application_url, std::string(), GetPermissiveCapabilityFilter()), | 47 Identity(application_url, std::string(), mojom::Shell::kUserInherit, |
| 48 GetPermissiveCapabilityFilter()), |
48 Interface::Name_); | 49 Interface::Name_); |
49 ptr->Bind(InterfacePtrInfo<Interface>(std::move(service_handle), 0u)); | 50 ptr->Bind(InterfacePtrInfo<Interface>(std::move(service_handle), 0u)); |
50 } | 51 } |
51 | 52 |
52 } // namespace shell | 53 } // namespace shell |
53 } // namespace mojo | 54 } // namespace mojo |
54 | 55 |
55 | 56 |
56 #endif // MOJO_SHELL_CONNECT_UTIL_H_ | 57 #endif // MOJO_SHELL_CONNECT_UTIL_H_ |
OLD | NEW |