| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  | // Copyright (c) 2015 GitHub, Inc.
 | 
					
						
							|  |  |  | // Use of this source code is governed by the MIT license that can be
 | 
					
						
							|  |  |  | // found in the LICENSE file.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 13:56:58 -07:00
										 |  |  | #ifndef SHELL_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_
 | 
					
						
							|  |  |  | #define SHELL_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_
 | 
					
						
							| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-24 02:23:27 +03:00
										 |  |  | #include <memory>
 | 
					
						
							| 
									
										
										
										
											2019-01-09 16:10:39 -08:00
										 |  |  | #include <string>
 | 
					
						
							| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  | #include <vector>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "base/compiler_specific.h"
 | 
					
						
							|  |  |  | #include "content/public/utility/content_utility_client.h"
 | 
					
						
							| 
									
										
										
										
											2019-12-10 16:22:35 -08:00
										 |  |  | #include "mojo/public/cpp/bindings/binder_map.h"
 | 
					
						
							| 
									
										
										
										
											2018-10-13 03:57:04 +02:00
										 |  |  | #include "printing/buildflags/buildflags.h"
 | 
					
						
							| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-13 03:57:04 +02:00
										 |  |  | #if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)
 | 
					
						
							|  |  |  | #include "chrome/utility/printing_handler.h"
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 14:23:04 -07:00
										 |  |  | namespace electron { | 
					
						
							| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | class AtomContentUtilityClient : public content::ContentUtilityClient { | 
					
						
							|  |  |  |  public: | 
					
						
							|  |  |  |   AtomContentUtilityClient(); | 
					
						
							|  |  |  |   ~AtomContentUtilityClient() override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-10 16:22:35 -08:00
										 |  |  |   void ExposeInterfacesToBrowser(mojo::BinderMap* binders) override; | 
					
						
							| 
									
										
										
										
											2017-04-04 20:40:43 -07:00
										 |  |  |   bool OnMessageReceived(const IPC::Message& message) override; | 
					
						
							| 
									
										
										
										
											2019-08-15 16:50:58 -04:00
										 |  |  |   mojo::ServiceFactory* GetMainThreadServiceFactory() override; | 
					
						
							| 
									
										
										
										
											2019-08-02 16:56:46 -07:00
										 |  |  |   mojo::ServiceFactory* GetIOThreadServiceFactory() override; | 
					
						
							| 
									
										
										
										
											2019-01-09 16:10:39 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  |  private: | 
					
						
							| 
									
										
										
										
											2018-10-13 03:57:04 +02:00
										 |  |  | #if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)
 | 
					
						
							|  |  |  |   std::unique_ptr<printing::PrintingHandler> printing_handler_; | 
					
						
							| 
									
										
										
										
											2017-02-01 13:56:34 +09:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-10 16:22:35 -08:00
										 |  |  |   // True if the utility process runs with elevated privileges.
 | 
					
						
							|  |  |  |   bool utility_process_running_elevated_; | 
					
						
							| 
									
										
										
										
											2018-10-13 03:57:04 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  |   DISALLOW_COPY_AND_ASSIGN(AtomContentUtilityClient); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 14:23:04 -07:00
										 |  |  | }  // namespace electron
 | 
					
						
							| 
									
										
										
										
											2015-04-30 11:31:17 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 13:56:58 -07:00
										 |  |  | #endif  // SHELL_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_
 |