Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: content/public/common/main_function_params.h

Issue 2567113002: Adds ability to specify how aura::Env is created in content (Closed)
Patch Set: more ifdef Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/public/common/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // 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 CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_ 9 #ifndef CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_
10 #define CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_ 10 #define CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_
11 11
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 15
16 #if defined(OS_WIN) 16 #if defined(OS_WIN)
17 namespace sandbox { 17 namespace sandbox {
18 struct SandboxInterfaceInfo; 18 struct SandboxInterfaceInfo;
19 } 19 }
20 #elif defined(OS_MACOSX) 20 #elif defined(OS_MACOSX)
21 namespace base { 21 namespace base {
22 namespace mac { 22 namespace mac {
23 class ScopedNSAutoreleasePool; 23 class ScopedNSAutoreleasePool;
24 } 24 }
25 } 25 }
26 #endif 26 #endif
27 27
28 #if defined(USE_AURA)
29 #include "ui/aura/env.h"
30 #endif
31
28 namespace content { 32 namespace content {
29 33
30 struct MainFunctionParams { 34 struct MainFunctionParams {
31 explicit MainFunctionParams(const base::CommandLine& cl) 35 explicit MainFunctionParams(const base::CommandLine& cl)
32 : command_line(cl), 36 : command_line(cl),
33 #if defined(OS_WIN) 37 #if defined(OS_WIN)
34 sandbox_info(NULL), 38 sandbox_info(NULL),
35 #elif defined(OS_MACOSX) 39 #elif defined(OS_MACOSX)
36 autorelease_pool(NULL), 40 autorelease_pool(NULL),
37 #elif defined(OS_POSIX) && !defined(OS_ANDROID) 41 #elif defined(OS_POSIX) && !defined(OS_ANDROID)
38 zygote_child(false), 42 zygote_child(false),
39 #endif 43 #endif
40 ui_task(NULL) { 44 ui_task(NULL) {
41 } 45 }
42 46
43 const base::CommandLine& command_line; 47 const base::CommandLine& command_line;
44 48
45 #if defined(OS_WIN) 49 #if defined(OS_WIN)
46 sandbox::SandboxInterfaceInfo* sandbox_info; 50 sandbox::SandboxInterfaceInfo* sandbox_info;
47 #elif defined(OS_MACOSX) 51 #elif defined(OS_MACOSX)
48 base::mac::ScopedNSAutoreleasePool* autorelease_pool; 52 base::mac::ScopedNSAutoreleasePool* autorelease_pool;
49 #elif defined(OS_POSIX) && !defined(OS_ANDROID) 53 #elif defined(OS_POSIX) && !defined(OS_ANDROID)
50 bool zygote_child; 54 bool zygote_child;
51 #endif 55 #endif
52 56
57 #if defined(USE_AURA)
58 aura::Env::Mode env_mode = aura::Env::Mode::LOCAL;
59 #endif
60
53 // Used by InProcessBrowserTest. If non-null BrowserMain schedules this 61 // Used by InProcessBrowserTest. If non-null BrowserMain schedules this
54 // task to run on the MessageLoop and BrowserInit is not invoked. 62 // task to run on the MessageLoop and BrowserInit is not invoked.
55 base::Closure* ui_task; 63 base::Closure* ui_task;
56 }; 64 };
57 65
58 } // namespace content 66 } // namespace content
59 67
60 #endif // CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_ 68 #endif // CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_
OLDNEW
« no previous file with comments | « content/public/common/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698