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/gpu/chrome_content_gpu_client.h" | |
43 #include "chrome/plugin/chrome_content_plugin_client.h" | 44 #include "chrome/plugin/chrome_content_plugin_client.h" |
44 #include "chrome/renderer/chrome_content_renderer_client.h" | 45 #include "chrome/renderer/chrome_content_renderer_client.h" |
45 #include "chrome/utility/chrome_content_utility_client.h" | 46 #include "chrome/utility/chrome_content_utility_client.h" |
46 #include "components/component_updater/component_updater_paths.h" | 47 #include "components/component_updater/component_updater_paths.h" |
47 #include "components/content_settings/core/common/content_settings_pattern.h" | 48 #include "components/content_settings/core/common/content_settings_pattern.h" |
48 #include "components/crash/content/app/crash_reporter_client.h" | 49 #include "components/crash/content/app/crash_reporter_client.h" |
49 #include "components/version_info/version_info.h" | 50 #include "components/version_info/version_info.h" |
50 #include "content/public/common/content_client.h" | 51 #include "content/public/common/content_client.h" |
51 #include "content/public/common/content_paths.h" | 52 #include "content/public/common/content_paths.h" |
52 #include "content/public/common/content_switches.h" | 53 #include "content/public/common/content_switches.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 #include "pdf/pdf.h" | 135 #include "pdf/pdf.h" |
135 #endif | 136 #endif |
136 | 137 |
137 #if !defined(CHROME_MULTIPLE_DLL_CHILD) | 138 #if !defined(CHROME_MULTIPLE_DLL_CHILD) |
138 #include "components/startup_metric_utils/browser/startup_metric_utils.h" | 139 #include "components/startup_metric_utils/browser/startup_metric_utils.h" |
139 #endif | 140 #endif |
140 | 141 |
141 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) | 142 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
142 #include "chrome/child/pdf_child_init.h" | 143 #include "chrome/child/pdf_child_init.h" |
143 | 144 |
145 base::LazyInstance<ChromeContentGpuClient> g_chrome_content_gpu_client = | |
146 LAZY_INSTANCE_INITIALIZER; | |
144 base::LazyInstance<ChromeContentRendererClient> | 147 base::LazyInstance<ChromeContentRendererClient> |
145 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; | 148 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; |
146 base::LazyInstance<ChromeContentUtilityClient> | 149 base::LazyInstance<ChromeContentUtilityClient> |
147 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; | 150 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; |
148 base::LazyInstance<ChromeContentPluginClient> | 151 base::LazyInstance<ChromeContentPluginClient> |
149 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; | 152 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; |
150 #endif | 153 #endif |
151 | 154 |
152 #if !defined(CHROME_MULTIPLE_DLL_CHILD) | 155 #if !defined(CHROME_MULTIPLE_DLL_CHILD) |
153 base::LazyInstance<ChromeContentBrowserClient> g_chrome_content_browser_client = | 156 base::LazyInstance<ChromeContentBrowserClient> g_chrome_content_browser_client = |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
977 | 980 |
978 content::ContentBrowserClient* | 981 content::ContentBrowserClient* |
979 ChromeMainDelegate::CreateContentBrowserClient() { | 982 ChromeMainDelegate::CreateContentBrowserClient() { |
980 #if defined(CHROME_MULTIPLE_DLL_CHILD) | 983 #if defined(CHROME_MULTIPLE_DLL_CHILD) |
981 return NULL; | 984 return NULL; |
982 #else | 985 #else |
983 return g_chrome_content_browser_client.Pointer(); | 986 return g_chrome_content_browser_client.Pointer(); |
984 #endif | 987 #endif |
985 } | 988 } |
986 | 989 |
990 content::ContentGpuClient* ChromeMainDelegate::CreateContentGpuClient() { | |
991 #if defined(CHROME_MULTIPLE_DLL_CHILD) | |
992 return NULL; | |
dcheng
2016/03/24 20:29:14
nullptr
kcwu
2016/03/28 13:17:34
Done.
| |
993 #else | |
994 return g_chrome_content_gpu_client.Pointer(); | |
995 #endif | |
996 } | |
997 | |
987 content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() { | 998 content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() { |
988 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 999 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
989 return NULL; | 1000 return NULL; |
990 #else | 1001 #else |
991 return g_chrome_content_plugin_client.Pointer(); | 1002 return g_chrome_content_plugin_client.Pointer(); |
992 #endif | 1003 #endif |
993 } | 1004 } |
994 | 1005 |
995 content::ContentRendererClient* | 1006 content::ContentRendererClient* |
996 ChromeMainDelegate::CreateContentRendererClient() { | 1007 ChromeMainDelegate::CreateContentRendererClient() { |
(...skipping 19 matching lines...) Expand all Loading... | |
1016 case version_info::Channel::CANARY: | 1027 case version_info::Channel::CANARY: |
1017 return true; | 1028 return true; |
1018 case version_info::Channel::DEV: | 1029 case version_info::Channel::DEV: |
1019 case version_info::Channel::BETA: | 1030 case version_info::Channel::BETA: |
1020 case version_info::Channel::STABLE: | 1031 case version_info::Channel::STABLE: |
1021 default: | 1032 default: |
1022 // Don't enable instrumentation. | 1033 // Don't enable instrumentation. |
1023 return false; | 1034 return false; |
1024 } | 1035 } |
1025 } | 1036 } |
OLD | NEW |