| 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 CHROME_SERVICE_SERVICE_PROCESS_H_ | 5 #ifndef CHROME_SERVICE_SERVICE_PROCESS_H_ |
| 6 #define CHROME_SERVICE_SERVICE_PROCESS_H_ | 6 #define CHROME_SERVICE_SERVICE_PROCESS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 14 #include "chrome/service/cloud_print/cloud_print_proxy.h" | 14 #include "chrome/service/cloud_print/cloud_print_proxy.h" |
| 15 #include "chrome/service/service_ipc_server.h" | 15 #include "chrome/service/service_ipc_server.h" |
| 16 | 16 |
| 17 class ServiceProcessPrefs; | 17 class ServiceProcessPrefs; |
| 18 class ServiceURLRequestContextGetter; | 18 class ServiceURLRequestContextGetter; |
| 19 class ServiceProcessState; | 19 class ServiceProcessState; |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class CommandLine; | 22 class CommandLine; |
| 23 class SequencedWorkerPool; | 23 class SequencedWorkerPool; |
| 24 class WaitableEvent; | 24 class WaitableEvent; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace mojo { |
| 28 namespace edk { |
| 29 class ScopedIPCSupport; |
| 30 } |
| 31 } |
| 32 |
| 27 namespace net { | 33 namespace net { |
| 28 class NetworkChangeNotifier; | 34 class NetworkChangeNotifier; |
| 29 } | 35 } |
| 30 | 36 |
| 31 // The ServiceProcess does not inherit from ChildProcess because this | 37 // The ServiceProcess does not inherit from ChildProcess because this |
| 32 // process can live independently of the browser process. | 38 // process can live independently of the browser process. |
| 33 // ServiceProcess Design Notes | 39 // ServiceProcess Design Notes |
| 34 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/servi
ce-processes | 40 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/servi
ce-processes |
| 35 class ServiceProcess : public ServiceIPCServer::Client, | 41 class ServiceProcess : public ServiceIPCServer::Client, |
| 36 public cloud_print::CloudPrintProxy::Client, | 42 public cloud_print::CloudPrintProxy::Client, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 void Terminate(); | 114 void Terminate(); |
| 109 | 115 |
| 110 std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 116 std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
| 111 std::unique_ptr<base::Thread> io_thread_; | 117 std::unique_ptr<base::Thread> io_thread_; |
| 112 std::unique_ptr<base::Thread> file_thread_; | 118 std::unique_ptr<base::Thread> file_thread_; |
| 113 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; | 119 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 114 std::unique_ptr<cloud_print::CloudPrintProxy> cloud_print_proxy_; | 120 std::unique_ptr<cloud_print::CloudPrintProxy> cloud_print_proxy_; |
| 115 std::unique_ptr<ServiceProcessPrefs> service_prefs_; | 121 std::unique_ptr<ServiceProcessPrefs> service_prefs_; |
| 116 std::unique_ptr<ServiceIPCServer> ipc_server_; | 122 std::unique_ptr<ServiceIPCServer> ipc_server_; |
| 117 std::unique_ptr<ServiceProcessState> service_process_state_; | 123 std::unique_ptr<ServiceProcessState> service_process_state_; |
| 124 std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_; |
| 118 | 125 |
| 119 // An event that will be signalled when we shutdown. | 126 // An event that will be signalled when we shutdown. |
| 120 base::WaitableEvent shutdown_event_; | 127 base::WaitableEvent shutdown_event_; |
| 121 | 128 |
| 122 // Pointer to the main message loop that host this object. | 129 // Pointer to the main message loop that host this object. |
| 123 base::MessageLoop* main_message_loop_; | 130 base::MessageLoop* main_message_loop_; |
| 124 | 131 |
| 125 // Count of currently enabled services in this process. | 132 // Count of currently enabled services in this process. |
| 126 int enabled_services_; | 133 int enabled_services_; |
| 127 | 134 |
| 128 // Speficies whether a product update is available. | 135 // Speficies whether a product update is available. |
| 129 bool update_available_; | 136 bool update_available_; |
| 130 | 137 |
| 131 scoped_refptr<ServiceURLRequestContextGetter> request_context_getter_; | 138 scoped_refptr<ServiceURLRequestContextGetter> request_context_getter_; |
| 132 | 139 |
| 133 DISALLOW_COPY_AND_ASSIGN(ServiceProcess); | 140 DISALLOW_COPY_AND_ASSIGN(ServiceProcess); |
| 134 }; | 141 }; |
| 135 | 142 |
| 136 extern ServiceProcess* g_service_process; | 143 extern ServiceProcess* g_service_process; |
| 137 | 144 |
| 138 #endif // CHROME_SERVICE_SERVICE_PROCESS_H_ | 145 #endif // CHROME_SERVICE_SERVICE_PROCESS_H_ |
| OLD | NEW |