| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // Wrapper to the parameter list for the "main" entry points (browser, renderer, | 5 // Wrapper to the parameter list for the "main" entry points (browser, renderer, |
| 6 // plugin) to shield the call sites from the differences between platforms | 6 // plugin) to shield the call sites from the differences between platforms |
| 7 // (e.g., POSIX doesn't need to pass any sandbox information). | 7 // (e.g., POSIX doesn't need to pass any sandbox information). |
| 8 | 8 |
| 9 #ifndef CHROME_COMMON_MAIN_FUNCTION_PARAMS_H_ | 9 #ifndef CHROME_COMMON_MAIN_FUNCTION_PARAMS_H_ |
| 10 #define CHROME_COMMON_MAIN_FUNCTION_PARAMS_H_ | 10 #define CHROME_COMMON_MAIN_FUNCTION_PARAMS_H_ |
| 11 #pragma once | 11 #pragma once |
| 12 | 12 |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "chrome/common/sandbox_init_wrapper.h" | 14 #include "chrome/common/sandbox_init_wrapper.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 namespace mac { |
| 17 class ScopedNSAutoreleasePool; | 18 class ScopedNSAutoreleasePool; |
| 18 }; | 19 } |
| 20 } |
| 19 | 21 |
| 20 class Task; | 22 class Task; |
| 21 | 23 |
| 22 struct MainFunctionParams { | 24 struct MainFunctionParams { |
| 23 MainFunctionParams(const CommandLine& cl, const SandboxInitWrapper& sb, | 25 MainFunctionParams(const CommandLine& cl, const SandboxInitWrapper& sb, |
| 24 base::ScopedNSAutoreleasePool* pool) | 26 base::mac::ScopedNSAutoreleasePool* pool) |
| 25 : command_line_(cl), sandbox_info_(sb), autorelease_pool_(pool), | 27 : command_line_(cl), sandbox_info_(sb), autorelease_pool_(pool), |
| 26 ui_task(NULL) { } | 28 ui_task(NULL) { } |
| 27 const CommandLine& command_line_; | 29 const CommandLine& command_line_; |
| 28 const SandboxInitWrapper& sandbox_info_; | 30 const SandboxInitWrapper& sandbox_info_; |
| 29 base::ScopedNSAutoreleasePool* autorelease_pool_; | 31 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; |
| 30 // Used by InProcessBrowserTest. If non-null BrowserMain schedules this | 32 // Used by InProcessBrowserTest. If non-null BrowserMain schedules this |
| 31 // task to run on the MessageLoop and BrowserInit is not invoked. | 33 // task to run on the MessageLoop and BrowserInit is not invoked. |
| 32 Task* ui_task; | 34 Task* ui_task; |
| 33 }; | 35 }; |
| 34 | 36 |
| 35 #endif // CHROME_COMMON_MAIN_FUNCTION_PARAMS_H_ | 37 #endif // CHROME_COMMON_MAIN_FUNCTION_PARAMS_H_ |
| OLD | NEW |