| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_ | 5 #ifndef CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_ |
| 6 #define CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_ | 6 #define CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 shell::Connector* connector); | 38 shell::Connector* connector); |
| 39 ~MojoChildConnection(); | 39 ~MojoChildConnection(); |
| 40 | 40 |
| 41 shell::Connection* connection() const { | 41 shell::Connection* connection() const { |
| 42 return connection_.get(); | 42 return connection_.get(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 // A token which must be passed to the child process via | 45 // A token which must be passed to the child process via |
| 46 // |switches::kPrimordialPipeToken| in order for the child to initialize its | 46 // |switches::kPrimordialPipeToken| in order for the child to initialize its |
| 47 // end of the shell connection pipe. | 47 // end of the shell connection pipe. |
| 48 std::string shell_client_token() const { return shell_client_token_; } | 48 std::string service_token() const { return service_token_; } |
| 49 | 49 |
| 50 // Sets the child connection's process handle. This should be called as soon | 50 // Sets the child connection's process handle. This should be called as soon |
| 51 // as the process has been launched, and the connection will not be fully | 51 // as the process has been launched, and the connection will not be fully |
| 52 // functional until this is called. | 52 // functional until this is called. |
| 53 void SetProcessHandle(base::ProcessHandle handle); | 53 void SetProcessHandle(base::ProcessHandle handle); |
| 54 | 54 |
| 55 #if defined(OS_ANDROID) | 55 #if defined(OS_ANDROID) |
| 56 ServiceRegistryAndroid* service_registry_android() { | 56 ServiceRegistryAndroid* service_registry_android() { |
| 57 return service_registry_android_.get(); | 57 return service_registry_android_.get(); |
| 58 } | 58 } |
| 59 #endif | 59 #endif |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 const std::string shell_client_token_; | 62 const std::string service_token_; |
| 63 std::unique_ptr<shell::Connection> connection_; | 63 std::unique_ptr<shell::Connection> connection_; |
| 64 shell::mojom::PIDReceiverPtr pid_receiver_; | 64 shell::mojom::PIDReceiverPtr pid_receiver_; |
| 65 #if defined(OS_ANDROID) | 65 #if defined(OS_ANDROID) |
| 66 std::unique_ptr<ServiceRegistryAndroid> service_registry_android_; | 66 std::unique_ptr<ServiceRegistryAndroid> service_registry_android_; |
| 67 #endif | 67 #endif |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(MojoChildConnection); | 69 DISALLOW_COPY_AND_ASSIGN(MojoChildConnection); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace content | 72 } // namespace content |
| 73 | 73 |
| 74 #endif // CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_ | 74 #endif // CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_ |
| OLD | NEW |