Removing uses of X11 native key events.
[chromium-blink-merge.git] / content / public / common / main_function_params.h
blobe2756e7c098b7784dc21de0f07fc39face0b6851
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
3 // found in the LICENSE file.
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
7 // (e.g., POSIX doesn't need to pass any sandbox information).
9 #ifndef CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_
10 #define CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_
12 #include "base/callback_forward.h"
13 #include "base/command_line.h"
15 #if defined(OS_WIN)
16 namespace sandbox {
17 struct SandboxInterfaceInfo;
19 #elif defined(OS_MACOSX)
20 namespace base {
21 namespace mac {
22 class ScopedNSAutoreleasePool;
25 #endif
27 namespace content {
29 struct MainFunctionParams {
30 explicit MainFunctionParams(const base::CommandLine& cl)
31 : command_line(cl),
32 #if defined(OS_WIN)
33 sandbox_info(NULL),
34 #elif defined(OS_MACOSX)
35 autorelease_pool(NULL),
36 #elif defined(OS_POSIX) && !defined(OS_ANDROID)
37 zygote_child(false),
38 #endif
39 ui_task(NULL) {
42 const base::CommandLine& command_line;
44 #if defined(OS_WIN)
45 sandbox::SandboxInterfaceInfo* sandbox_info;
46 #elif defined(OS_MACOSX)
47 base::mac::ScopedNSAutoreleasePool* autorelease_pool;
48 #elif defined(OS_POSIX) && !defined(OS_ANDROID)
49 bool zygote_child;
50 #endif
52 // Used by InProcessBrowserTest. If non-null BrowserMain schedules this
53 // task to run on the MessageLoop and BrowserInit is not invoked.
54 base::Closure* ui_task;
57 } // namespace content
59 #endif // CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_