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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "chrome/common/chrome_paths_internal.h" | 33 #include "chrome/common/chrome_paths_internal.h" |
34 #include "chrome/common/chrome_result_codes.h" | 34 #include "chrome/common/chrome_result_codes.h" |
35 #include "chrome/common/chrome_switches.h" | 35 #include "chrome/common/chrome_switches.h" |
36 #include "chrome/common/crash_keys.h" | 36 #include "chrome/common/crash_keys.h" |
37 #include "chrome/common/features.h" | 37 #include "chrome/common/features.h" |
38 #include "chrome/common/logging_chrome.h" | 38 #include "chrome/common/logging_chrome.h" |
39 #include "chrome/common/profiling.h" | 39 #include "chrome/common/profiling.h" |
40 #include "chrome/common/switch_utils.h" | 40 #include "chrome/common/switch_utils.h" |
41 #include "chrome/common/trace_event_args_whitelist.h" | 41 #include "chrome/common/trace_event_args_whitelist.h" |
42 #include "chrome/common/url_constants.h" | 42 #include "chrome/common/url_constants.h" |
43 #include "chrome/plugin/chrome_content_plugin_client.h" | |
44 #include "chrome/renderer/chrome_content_renderer_client.h" | 43 #include "chrome/renderer/chrome_content_renderer_client.h" |
45 #include "chrome/utility/chrome_content_utility_client.h" | 44 #include "chrome/utility/chrome_content_utility_client.h" |
46 #include "components/component_updater/component_updater_paths.h" | 45 #include "components/component_updater/component_updater_paths.h" |
47 #include "components/content_settings/core/common/content_settings_pattern.h" | 46 #include "components/content_settings/core/common/content_settings_pattern.h" |
48 #include "components/crash/content/app/crash_reporter_client.h" | 47 #include "components/crash/content/app/crash_reporter_client.h" |
49 #include "components/version_info/version_info.h" | 48 #include "components/version_info/version_info.h" |
50 #include "content/public/common/content_client.h" | 49 #include "content/public/common/content_client.h" |
51 #include "content/public/common/content_paths.h" | 50 #include "content/public/common/content_paths.h" |
52 #include "content/public/common/content_switches.h" | 51 #include "content/public/common/content_switches.h" |
53 #include "extensions/common/constants.h" | 52 #include "extensions/common/constants.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 #include "components/startup_metric_utils/browser/startup_metric_utils.h" | 137 #include "components/startup_metric_utils/browser/startup_metric_utils.h" |
139 #endif | 138 #endif |
140 | 139 |
141 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) | 140 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
142 #include "chrome/child/pdf_child_init.h" | 141 #include "chrome/child/pdf_child_init.h" |
143 | 142 |
144 base::LazyInstance<ChromeContentRendererClient> | 143 base::LazyInstance<ChromeContentRendererClient> |
145 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; | 144 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; |
146 base::LazyInstance<ChromeContentUtilityClient> | 145 base::LazyInstance<ChromeContentUtilityClient> |
147 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; | 146 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; |
148 base::LazyInstance<ChromeContentPluginClient> | |
149 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; | |
150 #endif | 147 #endif |
151 | 148 |
152 #if !defined(CHROME_MULTIPLE_DLL_CHILD) | 149 #if !defined(CHROME_MULTIPLE_DLL_CHILD) |
153 base::LazyInstance<ChromeContentBrowserClient> g_chrome_content_browser_client = | 150 base::LazyInstance<ChromeContentBrowserClient> g_chrome_content_browser_client = |
154 LAZY_INSTANCE_INITIALIZER; | 151 LAZY_INSTANCE_INITIALIZER; |
155 #endif | 152 #endif |
156 | 153 |
157 #if defined(OS_POSIX) | 154 #if defined(OS_POSIX) |
158 base::LazyInstance<ChromeCrashReporterClient>::Leaky g_chrome_crash_client = | 155 base::LazyInstance<ChromeCrashReporterClient>::Leaky g_chrome_crash_client = |
159 LAZY_INSTANCE_INITIALIZER; | 156 LAZY_INSTANCE_INITIALIZER; |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 | 974 |
978 content::ContentBrowserClient* | 975 content::ContentBrowserClient* |
979 ChromeMainDelegate::CreateContentBrowserClient() { | 976 ChromeMainDelegate::CreateContentBrowserClient() { |
980 #if defined(CHROME_MULTIPLE_DLL_CHILD) | 977 #if defined(CHROME_MULTIPLE_DLL_CHILD) |
981 return NULL; | 978 return NULL; |
982 #else | 979 #else |
983 return g_chrome_content_browser_client.Pointer(); | 980 return g_chrome_content_browser_client.Pointer(); |
984 #endif | 981 #endif |
985 } | 982 } |
986 | 983 |
987 content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() { | |
988 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | |
989 return NULL; | |
990 #else | |
991 return g_chrome_content_plugin_client.Pointer(); | |
992 #endif | |
993 } | |
994 | |
995 content::ContentRendererClient* | 984 content::ContentRendererClient* |
996 ChromeMainDelegate::CreateContentRendererClient() { | 985 ChromeMainDelegate::CreateContentRendererClient() { |
997 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 986 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
998 return NULL; | 987 return NULL; |
999 #else | 988 #else |
1000 return g_chrome_content_renderer_client.Pointer(); | 989 return g_chrome_content_renderer_client.Pointer(); |
1001 #endif | 990 #endif |
1002 } | 991 } |
1003 | 992 |
1004 content::ContentUtilityClient* | 993 content::ContentUtilityClient* |
(...skipping 11 matching lines...) Expand all Loading... |
1016 case version_info::Channel::CANARY: | 1005 case version_info::Channel::CANARY: |
1017 return true; | 1006 return true; |
1018 case version_info::Channel::DEV: | 1007 case version_info::Channel::DEV: |
1019 case version_info::Channel::BETA: | 1008 case version_info::Channel::BETA: |
1020 case version_info::Channel::STABLE: | 1009 case version_info::Channel::STABLE: |
1021 default: | 1010 default: |
1022 // Don't enable instrumentation. | 1011 // Don't enable instrumentation. |
1023 return false; | 1012 return false; |
1024 } | 1013 } |
1025 } | 1014 } |
OLD | NEW |