Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: chrome/service/service_process.h

Issue 2139643003: Use ChannelMojo between browser and service processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "mojo/edk/embedder/named_platform_handle.h"
17 #include "mojo/edk/embedder/scoped_platform_handle.h"
18 #include "mojo/public/cpp/system/message_pipe.h"
16 19
17 class ServiceProcessPrefs; 20 class ServiceProcessPrefs;
18 class ServiceURLRequestContextGetter; 21 class ServiceURLRequestContextGetter;
19 class ServiceProcessState; 22 class ServiceProcessState;
20 23
21 namespace base { 24 namespace base {
22 class CommandLine; 25 class CommandLine;
23 class SequencedWorkerPool; 26 class SequencedWorkerPool;
24 class WaitableEvent; 27 class WaitableEvent;
25 } 28 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 base::WaitableEvent* GetShutdownEventForTesting() { 77 base::WaitableEvent* GetShutdownEventForTesting() {
75 return &shutdown_event_; 78 return &shutdown_event_;
76 } 79 }
77 80
78 // Shuts down the service process. 81 // Shuts down the service process.
79 void Shutdown(); 82 void Shutdown();
80 83
81 // ServiceIPCServer::Client implementation. 84 // ServiceIPCServer::Client implementation.
82 void OnShutdown() override; 85 void OnShutdown() override;
83 void OnUpdateAvailable() override; 86 void OnUpdateAvailable() override;
87 void OnStayAliveForTesting() override;
84 bool OnIPCClientDisconnect() override; 88 bool OnIPCClientDisconnect() override;
89 mojo::ScopedMessagePipeHandle CreateChannelMessagePipe() override;
85 90
86 // CloudPrintProxy::Provider implementation. 91 // CloudPrintProxy::Provider implementation.
87 cloud_print::CloudPrintProxy* GetCloudPrintProxy() override; 92 cloud_print::CloudPrintProxy* GetCloudPrintProxy() override;
88 93
89 // CloudPrintProxy::Client implementation. 94 // CloudPrintProxy::Client implementation.
90 void OnCloudPrintProxyEnabled(bool persist_state) override; 95 void OnCloudPrintProxyEnabled(bool persist_state) override;
91 void OnCloudPrintProxyDisabled(bool persist_state) override; 96 void OnCloudPrintProxyDisabled(bool persist_state) override;
92 97
93 ServiceURLRequestContextGetter* GetServiceURLRequestContextGetter(); 98 ServiceURLRequestContextGetter* GetServiceURLRequestContextGetter();
94 99
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 base::MessageLoop* main_message_loop_; 135 base::MessageLoop* main_message_loop_;
131 136
132 // Count of currently enabled services in this process. 137 // Count of currently enabled services in this process.
133 int enabled_services_; 138 int enabled_services_;
134 139
135 // Speficies whether a product update is available. 140 // Speficies whether a product update is available.
136 bool update_available_; 141 bool update_available_;
137 142
138 scoped_refptr<ServiceURLRequestContextGetter> request_context_getter_; 143 scoped_refptr<ServiceURLRequestContextGetter> request_context_getter_;
139 144
145 #if defined(OS_POSIX)
146 mojo::edk::ScopedPlatformHandle server_handle_;
147 #elif defined(OS_WIN)
148 mojo::edk::NamedPlatformHandle server_handle_;
149 #endif
150
140 DISALLOW_COPY_AND_ASSIGN(ServiceProcess); 151 DISALLOW_COPY_AND_ASSIGN(ServiceProcess);
141 }; 152 };
142 153
143 extern ServiceProcess* g_service_process; 154 extern ServiceProcess* g_service_process;
144 155
145 #endif // CHROME_SERVICE_SERVICE_PROCESS_H_ 156 #endif // CHROME_SERVICE_SERVICE_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698