| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "content/public/browser/child_process_data.h" |
| 16 #include "content/public/browser/browser_child_process_host_delegate.h" | 17 #include "content/public/browser/browser_child_process_host_delegate.h" |
| 17 #include "content/public/browser/utility_process_host.h" | 18 #include "content/public/browser/utility_process_host.h" |
| 18 | 19 |
| 19 namespace base { | 20 namespace base { |
| 20 class SequencedTaskRunner; | 21 class SequencedTaskRunner; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace content { | 24 namespace content { |
| 24 class BrowserChildProcessHostImpl; | 25 class BrowserChildProcessHostImpl; |
| 26 class UtilityMainThread; |
| 25 | 27 |
| 26 class CONTENT_EXPORT UtilityProcessHostImpl | 28 class CONTENT_EXPORT UtilityProcessHostImpl |
| 27 : public NON_EXPORTED_BASE(UtilityProcessHost), | 29 : public NON_EXPORTED_BASE(UtilityProcessHost), |
| 28 public BrowserChildProcessHostDelegate { | 30 public BrowserChildProcessHostDelegate { |
| 29 public: | 31 public: |
| 30 UtilityProcessHostImpl(UtilityProcessHostClient* client, | 32 UtilityProcessHostImpl(UtilityProcessHostClient* client, |
| 31 base::SequencedTaskRunner* client_task_runner); | 33 base::SequencedTaskRunner* client_task_runner); |
| 32 virtual ~UtilityProcessHostImpl(); | 34 virtual ~UtilityProcessHostImpl(); |
| 33 | 35 |
| 34 // UtilityProcessHost implementation: | 36 // UtilityProcessHost implementation: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 73 |
| 72 // Launch the utility process from the zygote. Defaults to false. | 74 // Launch the utility process from the zygote. Defaults to false. |
| 73 bool use_linux_zygote_; | 75 bool use_linux_zygote_; |
| 74 | 76 |
| 75 base::EnvironmentVector env_; | 77 base::EnvironmentVector env_; |
| 76 | 78 |
| 77 bool started_; | 79 bool started_; |
| 78 | 80 |
| 79 scoped_ptr<BrowserChildProcessHostImpl> process_; | 81 scoped_ptr<BrowserChildProcessHostImpl> process_; |
| 80 | 82 |
| 83 // Used in single-process mode instead of process_. |
| 84 scoped_ptr<UtilityMainThread> in_process_thread_; |
| 85 ChildProcessData fake_process_data_; |
| 86 |
| 81 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); | 87 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); |
| 82 }; | 88 }; |
| 83 | 89 |
| 84 } // namespace content | 90 } // namespace content |
| 85 | 91 |
| 86 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 92 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |