| OLD | NEW |
| 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 #include "chrome/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 #if defined(OS_WIN) | 732 #if defined(OS_WIN) |
| 733 SuppressWindowsErrorDialogs(); | 733 SuppressWindowsErrorDialogs(); |
| 734 #endif | 734 #endif |
| 735 } | 735 } |
| 736 | 736 |
| 737 int ChromeMainDelegate::RunProcess( | 737 int ChromeMainDelegate::RunProcess( |
| 738 const std::string& process_type, | 738 const std::string& process_type, |
| 739 const content::MainFunctionParams& main_function_params) { | 739 const content::MainFunctionParams& main_function_params) { |
| 740 // ANDROID doesn't support "service", so no ServiceProcessMain, and arraysize | 740 // ANDROID doesn't support "service", so no ServiceProcessMain, and arraysize |
| 741 // doesn't support empty array. So we comment out the block for Android. | 741 // doesn't support empty array. So we comment out the block for Android. |
| 742 #if !defined(OS_ANDROID) && \ | 742 #if !defined(OS_ANDROID) && !defined(CHROME_MULTIPLE_DLL_CHILD) |
| 743 (!defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_BROWSER)) | |
| 744 static const MainFunction kMainFunctions[] = { | 743 static const MainFunction kMainFunctions[] = { |
| 745 #if defined(ENABLE_FULL_PRINTING) | 744 #if defined(ENABLE_FULL_PRINTING) |
| 746 { switches::kServiceProcess, ServiceProcessMain }, | 745 { switches::kServiceProcess, ServiceProcessMain }, |
| 747 #endif | 746 #endif |
| 748 | 747 |
| 749 #if defined(OS_MACOSX) | 748 #if defined(OS_MACOSX) |
| 750 { switches::kRelauncherProcess, | 749 { switches::kRelauncherProcess, |
| 751 mac_relauncher::internal::RelauncherMain }, | 750 mac_relauncher::internal::RelauncherMain }, |
| 752 #endif | 751 #endif |
| 753 | 752 |
| 754 #if !defined(DISABLE_NACL) && \ | 753 #if !defined(DISABLE_NACL) && !defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 755 (!defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD)) | 754 { switches::kNaClLoaderProcess, NaClMain }, |
| 756 { switches::kNaClLoaderProcess, NaClMain }, | |
| 757 #endif // DISABLE_NACL | 755 #endif // DISABLE_NACL |
| 758 }; | 756 }; |
| 759 | 757 |
| 760 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { | 758 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { |
| 761 if (process_type == kMainFunctions[i].name) | 759 if (process_type == kMainFunctions[i].name) |
| 762 return kMainFunctions[i].function(main_function_params); | 760 return kMainFunctions[i].function(main_function_params); |
| 763 } | 761 } |
| 764 #endif | 762 #endif |
| 765 | 763 |
| 766 return -1; | 764 return -1; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 } | 845 } |
| 848 | 846 |
| 849 content::ContentUtilityClient* | 847 content::ContentUtilityClient* |
| 850 ChromeMainDelegate::CreateContentUtilityClient() { | 848 ChromeMainDelegate::CreateContentUtilityClient() { |
| 851 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 849 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 852 return NULL; | 850 return NULL; |
| 853 #else | 851 #else |
| 854 return &g_chrome_content_utility_client.Get(); | 852 return &g_chrome_content_utility_client.Get(); |
| 855 #endif | 853 #endif |
| 856 } | 854 } |
| OLD | NEW |