OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PUBLIC_APP_CONTENT_MAIN_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_APP_CONTENT_MAIN_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_APP_CONTENT_MAIN_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_APP_CONTENT_MAIN_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... | |
27 virtual bool BasicStartupComplete(int* exit_code) = 0; | 27 virtual bool BasicStartupComplete(int* exit_code) = 0; |
28 | 28 |
29 // This is where the embedder puts all of its startup code that needs to run | 29 // This is where the embedder puts all of its startup code that needs to run |
30 // before the sandbox is engaged. | 30 // before the sandbox is engaged. |
31 virtual void PreSandboxStartup() = 0; | 31 virtual void PreSandboxStartup() = 0; |
32 | 32 |
33 // This is where the embedder can add startup code to run after the sandbox | 33 // This is where the embedder can add startup code to run after the sandbox |
34 // has been initialized. | 34 // has been initialized. |
35 virtual void SandboxInitialized(const std::string& process_type) = 0; | 35 virtual void SandboxInitialized(const std::string& process_type) = 0; |
36 | 36 |
37 // Asks the embedder to start a process that content doesn't know about. | 37 // Gives the embedder an opportinity to override a known process. Return -1 to |
jam
2012/01/12 18:07:18
these two functions are the same. why not just mak
| |
38 virtual int RunProcess( | 38 // use the default process runner. |
39 virtual int RunKnownProcess( | |
39 const std::string& process_type, | 40 const std::string& process_type, |
40 const content::MainFunctionParams& main_function_params) = 0; | 41 const content::MainFunctionParams& main_function_params) = 0; |
41 | 42 |
43 // Asks the embedder to start a process that content doesn't know about. | |
44 virtual int RunUnknownProcess( | |
45 const std::string& process_type, | |
46 const content::MainFunctionParams& main_function_params) = 0; | |
47 | |
42 // Called right before the process exits. | 48 // Called right before the process exits. |
43 virtual void ProcessExiting(const std::string& process_type) = 0; | 49 virtual void ProcessExiting(const std::string& process_type) = 0; |
44 | 50 |
45 #if defined(OS_MACOSX) | 51 #if defined(OS_MACOSX) |
46 // Returns true if the process registers with the system monitor, so that we | 52 // Returns true if the process registers with the system monitor, so that we |
47 // can allocate an IO port for it before the sandbox is initialized. Embedders | 53 // can allocate an IO port for it before the sandbox is initialized. Embedders |
48 // are called only for process types that content doesn't know about. | 54 // are called only for process types that content doesn't know about. |
49 virtual bool ProcessRegistersWithSystemProcess( | 55 virtual bool ProcessRegistersWithSystemProcess( |
50 const std::string& process_type) = 0; | 56 const std::string& process_type) = 0; |
51 | 57 |
(...skipping 13 matching lines...) Expand all Loading... | |
65 virtual content::ZygoteForkDelegate* ZygoteStarting() = 0; | 71 virtual content::ZygoteForkDelegate* ZygoteStarting() = 0; |
66 | 72 |
67 // Called every time the zygote process forks. | 73 // Called every time the zygote process forks. |
68 virtual void ZygoteForked() = 0; | 74 virtual void ZygoteForked() = 0; |
69 #endif // OS_MACOSX | 75 #endif // OS_MACOSX |
70 }; | 76 }; |
71 | 77 |
72 } // namespace content | 78 } // namespace content |
73 | 79 |
74 #endif // CONTENT_PUBLIC_APP_CONTENT_MAIN_DELEGATE_H_ | 80 #endif // CONTENT_PUBLIC_APP_CONTENT_MAIN_DELEGATE_H_ |
OLD | NEW |