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

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

Issue 14682014: Add chrome_split_dll gyp variable, and duplicate chrome_main_dll target (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ifdef out some code based on chrome_split_dll to get chrome_browser linking Created 7 years, 7 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
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 #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/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/stats_counters.h" 10 #include "base/metrics/stats_counters.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 #include <string.h> 81 #include <string.h>
82 #include "ui/base/x/x11_util.h" 82 #include "ui/base/x/x11_util.h"
83 #endif 83 #endif
84 84
85 #if defined(USE_LINUX_BREAKPAD) 85 #if defined(USE_LINUX_BREAKPAD)
86 #include "chrome/app/breakpad_linux.h" 86 #include "chrome/app/breakpad_linux.h"
87 #endif 87 #endif
88 88
89 base::LazyInstance<chrome::ChromeContentBrowserClient> 89 base::LazyInstance<chrome::ChromeContentBrowserClient>
90 g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER; 90 g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER;
91 // TODO(scottmg): http://crbug.com/237249 This will have to be split out into
92 // browser and child parts.
93 #if !defined(CHROME_SPLIT_DLL)
91 base::LazyInstance<chrome::ChromeContentRendererClient> 94 base::LazyInstance<chrome::ChromeContentRendererClient>
92 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; 95 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER;
96 #endif
93 base::LazyInstance<chrome::ChromeContentUtilityClient> 97 base::LazyInstance<chrome::ChromeContentUtilityClient>
94 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; 98 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER;
95 base::LazyInstance<chrome::ChromeContentPluginClient> 99 base::LazyInstance<chrome::ChromeContentPluginClient>
96 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; 100 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER;
97 101
98 extern int NaClMain(const content::MainFunctionParams&); 102 extern int NaClMain(const content::MainFunctionParams&);
99 extern int ServiceProcessMain(const content::MainFunctionParams&); 103 extern int ServiceProcessMain(const content::MainFunctionParams&);
100 104
101 namespace { 105 namespace {
102 106
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 const content::MainFunctionParams& main_function_params) { 628 const content::MainFunctionParams& main_function_params) {
625 // ANDROID doesn't support "service", so no ServiceProcessMain, and arraysize 629 // ANDROID doesn't support "service", so no ServiceProcessMain, and arraysize
626 // doesn't support empty array. So we comment out the block for Android. 630 // doesn't support empty array. So we comment out the block for Android.
627 #if !defined(OS_ANDROID) 631 #if !defined(OS_ANDROID)
628 static const MainFunction kMainFunctions[] = { 632 static const MainFunction kMainFunctions[] = {
629 { switches::kServiceProcess, ServiceProcessMain }, 633 { switches::kServiceProcess, ServiceProcessMain },
630 #if defined(OS_MACOSX) 634 #if defined(OS_MACOSX)
631 { switches::kRelauncherProcess, 635 { switches::kRelauncherProcess,
632 mac_relauncher::internal::RelauncherMain }, 636 mac_relauncher::internal::RelauncherMain },
633 #endif 637 #endif
634 #if !defined(DISABLE_NACL) 638 // TODO(scottmg): http://crbug.com/237249 NaCl -> child.
639 #if !defined(DISABLE_NACL) && !defined(CHROME_SPLIT_DLL)
635 { switches::kNaClLoaderProcess, NaClMain }, 640 { switches::kNaClLoaderProcess, NaClMain },
636 #endif // DISABLE_NACL 641 #endif // DISABLE_NACL
637 }; 642 };
638 643
639 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { 644 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) {
640 if (process_type == kMainFunctions[i].name) 645 if (process_type == kMainFunctions[i].name)
641 return kMainFunctions[i].function(main_function_params); 646 return kMainFunctions[i].function(main_function_params);
642 } 647 }
643 #endif 648 #endif
644 649
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 ChromeMainDelegate::CreateContentBrowserClient() { 708 ChromeMainDelegate::CreateContentBrowserClient() {
704 return &g_chrome_content_browser_client.Get(); 709 return &g_chrome_content_browser_client.Get();
705 } 710 }
706 711
707 content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() { 712 content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() {
708 return &g_chrome_content_plugin_client.Get(); 713 return &g_chrome_content_plugin_client.Get();
709 } 714 }
710 715
711 content::ContentRendererClient* 716 content::ContentRendererClient*
712 ChromeMainDelegate::CreateContentRendererClient() { 717 ChromeMainDelegate::CreateContentRendererClient() {
718 // TODO(scottmg): http://crbug.com/237249 This will have to be split out into
719 // browser and child parts.
720 #if defined(CHROME_SPLIT_DLL)
721 return NULL;
722 #else
713 return &g_chrome_content_renderer_client.Get(); 723 return &g_chrome_content_renderer_client.Get();
724 #endif
714 } 725 }
715 726
716 content::ContentUtilityClient* 727 content::ContentUtilityClient*
717 ChromeMainDelegate::CreateContentUtilityClient() { 728 ChromeMainDelegate::CreateContentUtilityClient() {
718 return &g_chrome_content_utility_client.Get(); 729 return &g_chrome_content_utility_client.Get();
719 } 730 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | chrome/chrome.gyp » ('j') | chrome/chrome.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698