OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UTILITY_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 void ElevatePrivileges() override; | 53 void ElevatePrivileges() override; |
54 #endif | 54 #endif |
55 const ChildProcessData& GetData() override; | 55 const ChildProcessData& GetData() override; |
56 #if defined(OS_POSIX) | 56 #if defined(OS_POSIX) |
57 void SetEnv(const base::EnvironmentMap& env) override; | 57 void SetEnv(const base::EnvironmentMap& env) override; |
58 #endif | 58 #endif |
59 bool Start() override; | 59 bool Start() override; |
60 void BindInterface(const std::string& interface_name, | 60 void BindInterface(const std::string& interface_name, |
61 mojo::ScopedMessagePipeHandle interface_pipe) override; | 61 mojo::ScopedMessagePipeHandle interface_pipe) override; |
62 void SetName(const base::string16& name) override; | 62 void SetName(const base::string16& name) override; |
63 void RegisterMojoServices() override; | |
Ken Rockot(use gerrit already)
2017/05/04 17:27:18
Agree with thestig@'s comments. This doesn't need
Wei Li
2017/05/04 18:18:28
Acknowledged.
| |
63 | 64 |
64 void set_child_flags(int flags) { child_flags_ = flags; } | 65 void set_child_flags(int flags) { child_flags_ = flags; } |
65 | 66 |
66 private: | 67 private: |
68 class ConnectionFilterImpl; | |
69 | |
67 // Starts a process if necessary. Returns true if it succeeded or a process | 70 // Starts a process if necessary. Returns true if it succeeded or a process |
68 // has already been started via StartBatchMode(). | 71 // has already been started via StartBatchMode(). |
69 bool StartProcess(); | 72 bool StartProcess(); |
70 | 73 |
71 // BrowserChildProcessHost: | 74 // BrowserChildProcessHost: |
72 bool OnMessageReceived(const IPC::Message& message) override; | 75 bool OnMessageReceived(const IPC::Message& message) override; |
73 void OnProcessLaunchFailed(int error_code) override; | 76 void OnProcessLaunchFailed(int error_code) override; |
74 void OnProcessCrashed(int exit_code) override; | 77 void OnProcessCrashed(int exit_code) override; |
75 | 78 |
76 // Cleans up |this| as a result of a failed Start(). | 79 // Cleans up |this| as a result of a failed Start(). |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 | 117 |
115 // Used to vend weak pointers, and should always be declared last. | 118 // Used to vend weak pointers, and should always be declared last. |
116 base::WeakPtrFactory<UtilityProcessHostImpl> weak_ptr_factory_; | 119 base::WeakPtrFactory<UtilityProcessHostImpl> weak_ptr_factory_; |
117 | 120 |
118 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); | 121 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); |
119 }; | 122 }; |
120 | 123 |
121 } // namespace content | 124 } // namespace content |
122 | 125 |
123 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 126 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ |
OLD | NEW |