| 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 | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50   void DisableSandbox() override; | 50   void DisableSandbox() override; | 
| 51 #if defined(OS_WIN) | 51 #if defined(OS_WIN) | 
| 52   void ElevatePrivileges() override; | 52   void ElevatePrivileges() override; | 
| 53 #endif | 53 #endif | 
| 54   const ChildProcessData& GetData() override; | 54   const ChildProcessData& GetData() override; | 
| 55 #if defined(OS_POSIX) | 55 #if defined(OS_POSIX) | 
| 56   void SetEnv(const base::EnvironmentMap& env) override; | 56   void SetEnv(const base::EnvironmentMap& env) override; | 
| 57 #endif | 57 #endif | 
| 58   bool StartMojoMode() override; | 58   bool StartMojoMode() override; | 
| 59   ServiceRegistry* GetServiceRegistry() override; | 59   ServiceRegistry* GetServiceRegistry() override; | 
|  | 60   void SetName(const std::string& name) override; | 
| 60 | 61 | 
| 61   void set_child_flags(int flags) { child_flags_ = flags; } | 62   void set_child_flags(int flags) { child_flags_ = flags; } | 
| 62 | 63 | 
| 63  private: | 64  private: | 
| 64   // Starts a process if necessary.  Returns true if it succeeded or a process | 65   // Starts a process if necessary.  Returns true if it succeeded or a process | 
| 65   // has already been started via StartBatchMode(). | 66   // has already been started via StartBatchMode(). | 
| 66   bool StartProcess(); | 67   bool StartProcess(); | 
| 67 | 68 | 
| 68   // BrowserChildProcessHost: | 69   // BrowserChildProcessHost: | 
| 69   bool OnMessageReceived(const IPC::Message& message) override; | 70   bool OnMessageReceived(const IPC::Message& message) override; | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 90   // Whether to launch the process with elevated privileges. | 91   // Whether to launch the process with elevated privileges. | 
| 91   bool run_elevated_; | 92   bool run_elevated_; | 
| 92 | 93 | 
| 93   // Flags defined in ChildProcessHost with which to start the process. | 94   // Flags defined in ChildProcessHost with which to start the process. | 
| 94   int child_flags_; | 95   int child_flags_; | 
| 95 | 96 | 
| 96   base::EnvironmentMap env_; | 97   base::EnvironmentMap env_; | 
| 97 | 98 | 
| 98   bool started_; | 99   bool started_; | 
| 99 | 100 | 
|  | 101   // A user-visible name identifying this process. Used to indentify this | 
|  | 102   // process in the task manager. | 
|  | 103   std::string name_; | 
|  | 104 | 
| 100   scoped_ptr<BrowserChildProcessHostImpl> process_; | 105   scoped_ptr<BrowserChildProcessHostImpl> process_; | 
| 101 | 106 | 
| 102   // Used in single-process mode instead of process_. | 107   // Used in single-process mode instead of process_. | 
| 103   scoped_ptr<base::Thread> in_process_thread_; | 108   scoped_ptr<base::Thread> in_process_thread_; | 
| 104 | 109 | 
| 105   // Browser-side Mojo endpoint which sets up a Mojo channel with the child | 110   // Browser-side Mojo endpoint which sets up a Mojo channel with the child | 
| 106   // process and contains the browser's ServiceRegistry. | 111   // process and contains the browser's ServiceRegistry. | 
| 107   scoped_ptr<MojoApplicationHost> mojo_application_host_; | 112   scoped_ptr<MojoApplicationHost> mojo_application_host_; | 
| 108 | 113 | 
| 109   DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); | 114   DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); | 
| 110 }; | 115 }; | 
| 111 | 116 | 
| 112 }  // namespace content | 117 }  // namespace content | 
| 113 | 118 | 
| 114 #endif  // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 119 #endif  // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 
| OLD | NEW | 
|---|