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_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace base { | 24 namespace base { |
25 class CommandLine; | 25 class CommandLine; |
26 } | 26 } |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 class BrowserChildProcessHostIterator; | 30 class BrowserChildProcessHostIterator; |
31 class BrowserChildProcessObserver; | 31 class BrowserChildProcessObserver; |
32 class BrowserMessageFilter; | 32 class BrowserMessageFilter; |
| 33 class ServiceRegistry; |
33 | 34 |
34 // Plugins/workers and other child processes that live on the IO thread use this | 35 // Plugins/workers and other child processes that live on the IO thread use this |
35 // class. RenderProcessHostImpl is the main exception that doesn't use this | 36 // class. RenderProcessHostImpl is the main exception that doesn't use this |
36 /// class because it lives on the UI thread. | 37 /// class because it lives on the UI thread. |
37 class CONTENT_EXPORT BrowserChildProcessHostImpl | 38 class CONTENT_EXPORT BrowserChildProcessHostImpl |
38 : public BrowserChildProcessHost, | 39 : public BrowserChildProcessHost, |
39 public NON_EXPORTED_BASE(ChildProcessHostDelegate), | 40 public NON_EXPORTED_BASE(ChildProcessHostDelegate), |
40 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
41 public base::win::ObjectWatcher::Delegate, | 42 public base::win::ObjectWatcher::Delegate, |
42 #endif | 43 #endif |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Callers can reduce the BrowserChildProcess' priority. | 78 // Callers can reduce the BrowserChildProcess' priority. |
78 void SetBackgrounded(bool backgrounded); | 79 void SetBackgrounded(bool backgrounded); |
79 | 80 |
80 // Controls whether the child process should be terminated on browser | 81 // Controls whether the child process should be terminated on browser |
81 // shutdown. Default is to always terminate. | 82 // shutdown. Default is to always terminate. |
82 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); | 83 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); |
83 | 84 |
84 // Adds an IPC message filter. | 85 // Adds an IPC message filter. |
85 void AddFilter(BrowserMessageFilter* filter); | 86 void AddFilter(BrowserMessageFilter* filter); |
86 | 87 |
| 88 void SetServiceRegistry(ServiceRegistry* registry); |
| 89 |
87 // Called when an instance of a particular child is created in a page. | 90 // Called when an instance of a particular child is created in a page. |
88 static void NotifyProcessInstanceCreated(const ChildProcessData& data); | 91 static void NotifyProcessInstanceCreated(const ChildProcessData& data); |
89 | 92 |
90 static void HistogramBadMessageTerminated(int process_type); | 93 static void HistogramBadMessageTerminated(int process_type); |
91 | 94 |
92 BrowserChildProcessHostDelegate* delegate() const { return delegate_; } | 95 BrowserChildProcessHostDelegate* delegate() const { return delegate_; } |
93 | 96 |
94 typedef std::list<BrowserChildProcessHostImpl*> BrowserChildProcessList; | 97 typedef std::list<BrowserChildProcessHostImpl*> BrowserChildProcessList; |
95 private: | 98 private: |
96 friend class BrowserChildProcessHostIterator; | 99 friend class BrowserChildProcessHostIterator; |
(...skipping 25 matching lines...) Expand all Loading... |
122 // Watches to see if the child process exits before the IPC channel has | 125 // Watches to see if the child process exits before the IPC channel has |
123 // been connected. Thereafter, its exit is determined by an error on the | 126 // been connected. Thereafter, its exit is determined by an error on the |
124 // IPC channel. | 127 // IPC channel. |
125 base::win::ObjectWatcher early_exit_watcher_; | 128 base::win::ObjectWatcher early_exit_watcher_; |
126 #endif | 129 #endif |
127 }; | 130 }; |
128 | 131 |
129 } // namespace content | 132 } // namespace content |
130 | 133 |
131 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 134 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
OLD | NEW |