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

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
« no previous file with comments | « chrome/service/service_ipc_server_unittest.cc ('k') | chrome/service/service_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
84 bool OnIPCClientDisconnect() override; 87 bool OnIPCClientDisconnect() override;
88 mojo::ScopedMessagePipeHandle CreateChannelMessagePipe() override;
85 89
86 // CloudPrintProxy::Provider implementation. 90 // CloudPrintProxy::Provider implementation.
87 cloud_print::CloudPrintProxy* GetCloudPrintProxy() override; 91 cloud_print::CloudPrintProxy* GetCloudPrintProxy() override;
88 92
89 // CloudPrintProxy::Client implementation. 93 // CloudPrintProxy::Client implementation.
90 void OnCloudPrintProxyEnabled(bool persist_state) override; 94 void OnCloudPrintProxyEnabled(bool persist_state) override;
91 void OnCloudPrintProxyDisabled(bool persist_state) override; 95 void OnCloudPrintProxyDisabled(bool persist_state) override;
92 96
93 ServiceURLRequestContextGetter* GetServiceURLRequestContextGetter(); 97 ServiceURLRequestContextGetter* GetServiceURLRequestContextGetter();
94 98
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 base::MessageLoop* main_message_loop_; 134 base::MessageLoop* main_message_loop_;
131 135
132 // Count of currently enabled services in this process. 136 // Count of currently enabled services in this process.
133 int enabled_services_; 137 int enabled_services_;
134 138
135 // Speficies whether a product update is available. 139 // Speficies whether a product update is available.
136 bool update_available_; 140 bool update_available_;
137 141
138 scoped_refptr<ServiceURLRequestContextGetter> request_context_getter_; 142 scoped_refptr<ServiceURLRequestContextGetter> request_context_getter_;
139 143
144 #if defined(OS_POSIX)
145 mojo::edk::ScopedPlatformHandle server_handle_;
146 #elif defined(OS_WIN)
147 mojo::edk::NamedPlatformHandle server_handle_;
148 #endif
149
140 DISALLOW_COPY_AND_ASSIGN(ServiceProcess); 150 DISALLOW_COPY_AND_ASSIGN(ServiceProcess);
141 }; 151 };
142 152
143 extern ServiceProcess* g_service_process; 153 extern ServiceProcess* g_service_process;
144 154
145 #endif // CHROME_SERVICE_SERVICE_PROCESS_H_ 155 #endif // CHROME_SERVICE_SERVICE_PROCESS_H_
OLDNEW
« no previous file with comments | « chrome/service/service_ipc_server_unittest.cc ('k') | chrome/service/service_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698