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

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

Issue 207025: NaCl-Chrome integration (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months 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/format_macros.h ('k') | chrome/browser/nacl_process_host.h » ('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) 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 // 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "tools/memory_watcher/memory_watcher.h" 74 #include "tools/memory_watcher/memory_watcher.h"
75 #endif 75 #endif
76 #if defined(OS_MACOSX) 76 #if defined(OS_MACOSX)
77 #include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h" 77 #include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
78 #endif 78 #endif
79 79
80 extern int BrowserMain(const MainFunctionParams&); 80 extern int BrowserMain(const MainFunctionParams&);
81 extern int RendererMain(const MainFunctionParams&); 81 extern int RendererMain(const MainFunctionParams&);
82 extern int PluginMain(const MainFunctionParams&); 82 extern int PluginMain(const MainFunctionParams&);
83 extern int WorkerMain(const MainFunctionParams&); 83 extern int WorkerMain(const MainFunctionParams&);
84 extern int NaClMain(const MainFunctionParams&);
84 extern int UtilityMain(const MainFunctionParams&); 85 extern int UtilityMain(const MainFunctionParams&);
85 extern int ProfileImportMain(const MainFunctionParams&); 86 extern int ProfileImportMain(const MainFunctionParams&);
86 extern int ZygoteMain(const MainFunctionParams&); 87 extern int ZygoteMain(const MainFunctionParams&);
87 88
88 #if defined(OS_WIN) 89 #if defined(OS_WIN)
89 // TODO(erikkay): isn't this already defined somewhere? 90 // TODO(erikkay): isn't this already defined somewhere?
90 #define DLLEXPORT __declspec(dllexport) 91 #define DLLEXPORT __declspec(dllexport)
91 92
92 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. 93 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling.
93 extern "C" { 94 extern "C" {
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 } else if (process_type == switches::kProfileImportProcess) { 573 } else if (process_type == switches::kProfileImportProcess) {
573 #if defined (OS_MACOSX) 574 #if defined (OS_MACOSX)
574 rv = ProfileImportMain(main_params); 575 rv = ProfileImportMain(main_params);
575 #else 576 #else
576 // TODO(port): Use OOP profile import - http://crbug.com/22142 . 577 // TODO(port): Use OOP profile import - http://crbug.com/22142 .
577 NOTIMPLEMENTED(); 578 NOTIMPLEMENTED();
578 rv = -1; 579 rv = -1;
579 #endif 580 #endif
580 } else if (process_type == switches::kWorkerProcess) { 581 } else if (process_type == switches::kWorkerProcess) {
581 rv = WorkerMain(main_params); 582 rv = WorkerMain(main_params);
583 } else if (process_type == switches::kNaClProcess) {
584 rv = NaClMain(main_params);
582 } else if (process_type == switches::kZygoteProcess) { 585 } else if (process_type == switches::kZygoteProcess) {
583 #if defined(OS_LINUX) 586 #if defined(OS_LINUX)
584 if (ZygoteMain(main_params)) { 587 if (ZygoteMain(main_params)) {
585 // Zygote::HandleForkRequest may have reallocated the command 588 // Zygote::HandleForkRequest may have reallocated the command
586 // line so update it here with the new version. 589 // line so update it here with the new version.
587 const CommandLine& parsed_command_line = 590 const CommandLine& parsed_command_line =
588 *CommandLine::ForCurrentProcess(); 591 *CommandLine::ForCurrentProcess();
589 MainFunctionParams main_params(parsed_command_line, sandbox_wrapper, 592 MainFunctionParams main_params(parsed_command_line, sandbox_wrapper,
590 &autorelease_pool); 593 &autorelease_pool);
591 rv = RendererMain(main_params); 594 rv = RendererMain(main_params);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 635
633 logging::CleanupChromeLogging(); 636 logging::CleanupChromeLogging();
634 637
635 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) 638 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD)
636 // TODO(mark): See the TODO(mark) above at InitCrashReporter. 639 // TODO(mark): See the TODO(mark) above at InitCrashReporter.
637 DestructCrashReporter(); 640 DestructCrashReporter();
638 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD 641 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD
639 642
640 return rv; 643 return rv;
641 } 644 }
OLDNEW
« no previous file with comments | « base/format_macros.h ('k') | chrome/browser/nacl_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698