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

Side by Side Diff: chrome/app/chrome_dll_main.cc

Issue 3915002: Out of process Pepper (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « base/scoped_native_library.cc ('k') | chrome/app/dummy_main_functions.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // TODO(port): the ifdefs in here are a first step towards trying to determine 5 // TODO(port): the ifdefs in here are a first step towards trying to determine
6 // the correct abstraction for all the OS functionality required at this 6 // the correct abstraction for all the OS functionality required at this
7 // stage of process initialization. It should not be taken as a final 7 // stage of process initialization. It should not be taken as a final
8 // abstraction. 8 // abstraction.
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #endif 103 #endif
104 104
105 #if defined(OS_CHROMEOS) 105 #if defined(OS_CHROMEOS)
106 #include "chrome/browser/chromeos/boot_times_loader.h" 106 #include "chrome/browser/chromeos/boot_times_loader.h"
107 #endif 107 #endif
108 108
109 extern int BrowserMain(const MainFunctionParams&); 109 extern int BrowserMain(const MainFunctionParams&);
110 extern int RendererMain(const MainFunctionParams&); 110 extern int RendererMain(const MainFunctionParams&);
111 extern int GpuMain(const MainFunctionParams&); 111 extern int GpuMain(const MainFunctionParams&);
112 extern int PluginMain(const MainFunctionParams&); 112 extern int PluginMain(const MainFunctionParams&);
113 extern int PpapiPluginMain(const MainFunctionParams&);
113 extern int WorkerMain(const MainFunctionParams&); 114 extern int WorkerMain(const MainFunctionParams&);
114 extern int NaClMain(const MainFunctionParams&); 115 extern int NaClMain(const MainFunctionParams&);
115 extern int UtilityMain(const MainFunctionParams&); 116 extern int UtilityMain(const MainFunctionParams&);
116 extern int ProfileImportMain(const MainFunctionParams&); 117 extern int ProfileImportMain(const MainFunctionParams&);
117 extern int ZygoteMain(const MainFunctionParams&); 118 extern int ZygoteMain(const MainFunctionParams&);
118 #if defined(_WIN64) 119 #if defined(_WIN64)
119 extern int NaClBrokerMain(const MainFunctionParams&); 120 extern int NaClBrokerMain(const MainFunctionParams&);
120 #endif 121 #endif
121 extern int ServiceProcessMain(const MainFunctionParams&); 122 extern int ServiceProcessMain(const MainFunctionParams&);
122 123
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 271 }
271 } 272 }
272 #endif // defined(USE_X11) 273 #endif // defined(USE_X11)
273 274
274 #if defined(OS_LINUX) 275 #if defined(OS_LINUX)
275 static void AdjustLinuxOOMScore(const std::string& process_type) { 276 static void AdjustLinuxOOMScore(const std::string& process_type) {
276 const int kMiscScore = 7; 277 const int kMiscScore = 7;
277 const int kPluginScore = 10; 278 const int kPluginScore = 10;
278 int score = -1; 279 int score = -1;
279 280
280 if (process_type == switches::kPluginProcess) { 281 if (process_type == switches::kPluginProcess ||
282 process_type == switches::kPpapiPluginProcess) {
281 score = kPluginScore; 283 score = kPluginScore;
282 } else if (process_type == switches::kUtilityProcess || 284 } else if (process_type == switches::kUtilityProcess ||
283 process_type == switches::kWorkerProcess || 285 process_type == switches::kWorkerProcess ||
284 process_type == switches::kGpuProcess || 286 process_type == switches::kGpuProcess ||
285 process_type == switches::kServiceProcess) { 287 process_type == switches::kServiceProcess) {
286 score = kMiscScore; 288 score = kMiscScore;
287 } else if (process_type == switches::kProfileImportProcess) { 289 } else if (process_type == switches::kProfileImportProcess) {
288 NOTIMPLEMENTED(); 290 NOTIMPLEMENTED();
289 #ifndef DISABLE_NACL 291 #ifndef DISABLE_NACL
290 } else if (process_type == switches::kNaClLoaderProcess) { 292 } else if (process_type == switches::kNaClLoaderProcess) {
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 // TODO(port): turn on these main() functions as they've been de-winified. 838 // TODO(port): turn on these main() functions as they've been de-winified.
837 int rv = -1; 839 int rv = -1;
838 if (process_type == switches::kRendererProcess) { 840 if (process_type == switches::kRendererProcess) {
839 rv = RendererMain(main_params); 841 rv = RendererMain(main_params);
840 } else if (process_type == switches::kExtensionProcess) { 842 } else if (process_type == switches::kExtensionProcess) {
841 // An extension process is just a renderer process. We use a different 843 // An extension process is just a renderer process. We use a different
842 // command line argument to differentiate crash reports. 844 // command line argument to differentiate crash reports.
843 rv = RendererMain(main_params); 845 rv = RendererMain(main_params);
844 } else if (process_type == switches::kPluginProcess) { 846 } else if (process_type == switches::kPluginProcess) {
845 rv = PluginMain(main_params); 847 rv = PluginMain(main_params);
848 } else if (process_type == switches::kPpapiPluginProcess) {
849 rv = PpapiPluginMain(main_params);
846 } else if (process_type == switches::kUtilityProcess) { 850 } else if (process_type == switches::kUtilityProcess) {
847 rv = UtilityMain(main_params); 851 rv = UtilityMain(main_params);
848 } else if (process_type == switches::kGpuProcess) { 852 } else if (process_type == switches::kGpuProcess) {
849 rv = GpuMain(main_params); 853 rv = GpuMain(main_params);
850 } else if (process_type == switches::kProfileImportProcess) { 854 } else if (process_type == switches::kProfileImportProcess) {
851 #if defined(OS_MACOSX) 855 #if defined(OS_MACOSX)
852 rv = ProfileImportMain(main_params); 856 rv = ProfileImportMain(main_params);
853 #else 857 #else
854 // TODO(port): Use OOP profile import - http://crbug.com/22142 . 858 // TODO(port): Use OOP profile import - http://crbug.com/22142 .
855 NOTIMPLEMENTED(); 859 NOTIMPLEMENTED();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 974
971 logging::CleanupChromeLogging(); 975 logging::CleanupChromeLogging();
972 976
973 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) 977 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD)
974 // TODO(mark): See the TODO(mark) above at InitCrashReporter. 978 // TODO(mark): See the TODO(mark) above at InitCrashReporter.
975 DestructCrashReporter(); 979 DestructCrashReporter();
976 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD 980 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD
977 981
978 return rv; 982 return rv;
979 } 983 }
OLDNEW
« no previous file with comments | « base/scoped_native_library.cc ('k') | chrome/app/dummy_main_functions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698