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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 private: | 71 private: |
72 // Starts a process if necessary. Returns true if it succeeded or a process | 72 // Starts a process if necessary. Returns true if it succeeded or a process |
73 // has already been started via StartBatchMode(). | 73 // has already been started via StartBatchMode(). |
74 bool StartProcess(); | 74 bool StartProcess(); |
75 | 75 |
76 // BrowserChildProcessHost: | 76 // BrowserChildProcessHost: |
77 bool OnMessageReceived(const IPC::Message& message) override; | 77 bool OnMessageReceived(const IPC::Message& message) override; |
78 void OnProcessLaunchFailed() override; | 78 void OnProcessLaunchFailed() override; |
79 void OnProcessCrashed(int exit_code) override; | 79 void OnProcessCrashed(int exit_code) override; |
80 void OnProcessLaunched() override; | |
81 | 80 |
82 // Cleans up |this| as a result of a failed Start(). | 81 // Cleans up |this| as a result of a failed Start(). |
83 void NotifyAndDelete(); | 82 void NotifyAndDelete(); |
84 | 83 |
85 // Notifies the client that the launch failed and deletes |host|. | 84 // Notifies the client that the launch failed and deletes |host|. |
86 static void NotifyLaunchFailedAndDelete( | 85 static void NotifyLaunchFailedAndDelete( |
87 base::WeakPtr<UtilityProcessHostImpl> host); | 86 base::WeakPtr<UtilityProcessHostImpl> host); |
88 | 87 |
89 // A pointer to our client interface, who will be informed of progress. | 88 // A pointer to our client interface, who will be informed of progress. |
90 scoped_refptr<UtilityProcessHostClient> client_; | 89 scoped_refptr<UtilityProcessHostClient> client_; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 122 |
124 // Used to vend weak pointers, and should always be declared last. | 123 // Used to vend weak pointers, and should always be declared last. |
125 base::WeakPtrFactory<UtilityProcessHostImpl> weak_ptr_factory_; | 124 base::WeakPtrFactory<UtilityProcessHostImpl> weak_ptr_factory_; |
126 | 125 |
127 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); | 126 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); |
128 }; | 127 }; |
129 | 128 |
130 } // namespace content | 129 } // namespace content |
131 | 130 |
132 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 131 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ |
OLD | NEW |