Commit 11b815e9 authored by thestig's avatar thestig Committed by Commit bot

Only build various flash/pnacl/ppapi code when they are enabled. (try 2)

Review URL: https://codereview.chromium.org/494993005

Cr-Commit-Position: refs/heads/master@{#291810}
parent f032b471
...@@ -168,7 +168,6 @@ static_library("browser") { ...@@ -168,7 +168,6 @@ static_library("browser") {
"//mojo/system", "//mojo/system",
"//net:net_with_v8", "//net:net_with_v8",
"//third_party/WebKit/public:resources", "//third_party/WebKit/public:resources",
"//third_party/adobe/flash:flapper_version_h",
"//third_party/expat", "//third_party/expat",
"//third_party/leveldatabase", "//third_party/leveldatabase",
"//third_party/libaddressinput", "//third_party/libaddressinput",
...@@ -306,6 +305,7 @@ static_library("browser") { ...@@ -306,6 +305,7 @@ static_library("browser") {
".", "//chrome") ".", "//chrome")
deps += [ deps += [
"//ppapi:ppapi_ipc", "//ppapi:ppapi_ipc",
"//third_party/adobe/flash:flapper_version_h",
] ]
} }
if (safe_browsing_mode != 0) { if (safe_browsing_mode != 0) {
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/component_updater/chrome_component_updater_configurator.h" #include "chrome/browser/component_updater/chrome_component_updater_configurator.h"
#include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
#include "chrome/browser/defaults.h" #include "chrome/browser/defaults.h"
#include "chrome/browser/devtools/remote_debugging_server.h" #include "chrome/browser/devtools/remote_debugging_server.h"
#include "chrome/browser/download/download_request_limiter.h" #include "chrome/browser/download/download_request_limiter.h"
...@@ -129,6 +128,10 @@ ...@@ -129,6 +128,10 @@
#include "components/storage_monitor/storage_monitor.h" #include "components/storage_monitor/storage_monitor.h"
#endif #endif
#if !defined(DISABLE_NACL)
#include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
#endif
#if defined(ENABLE_PLUGIN_INSTALLATION) #if defined(ENABLE_PLUGIN_INSTALLATION)
#include "chrome/browser/plugins/plugins_resource_service.h" #include "chrome/browser/plugins/plugins_resource_service.h"
#endif #endif
...@@ -901,11 +904,15 @@ CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() { ...@@ -901,11 +904,15 @@ CRLSetFetcher* BrowserProcessImpl::crl_set_fetcher() {
component_updater::PnaclComponentInstaller* component_updater::PnaclComponentInstaller*
BrowserProcessImpl::pnacl_component_installer() { BrowserProcessImpl::pnacl_component_installer() {
#if !defined(DISABLE_NACL)
if (!pnacl_component_installer_.get()) { if (!pnacl_component_installer_.get()) {
pnacl_component_installer_.reset( pnacl_component_installer_.reset(
new component_updater::PnaclComponentInstaller()); new component_updater::PnaclComponentInstaller());
} }
return pnacl_component_installer_.get(); return pnacl_component_installer_.get();
#else
return NULL;
#endif
} }
void BrowserProcessImpl::ResourceDispatcherHostCreated() { void BrowserProcessImpl::ResourceDispatcherHostCreated() {
......
...@@ -276,8 +276,11 @@ class BrowserProcessImpl : public BrowserProcess, ...@@ -276,8 +276,11 @@ class BrowserProcessImpl : public BrowserProcess,
// but some users of component updater only install per-user. // but some users of component updater only install per-user.
scoped_ptr<component_updater::ComponentUpdateService> component_updater_; scoped_ptr<component_updater::ComponentUpdateService> component_updater_;
scoped_refptr<CRLSetFetcher> crl_set_fetcher_; scoped_refptr<CRLSetFetcher> crl_set_fetcher_;
#if !defined(DISABLE_NACL)
scoped_ptr<component_updater::PnaclComponentInstaller> scoped_ptr<component_updater::PnaclComponentInstaller>
pnacl_component_installer_; pnacl_component_installer_;
#endif
#if defined(ENABLE_PLUGIN_INSTALLATION) #if defined(ENABLE_PLUGIN_INSTALLATION)
scoped_refptr<PluginsResourceService> plugins_resource_service_; scoped_refptr<PluginsResourceService> plugins_resource_service_;
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include "chrome/browser/component_updater/cld_component_installer.h" #include "chrome/browser/component_updater/cld_component_installer.h"
#include "chrome/browser/component_updater/ev_whitelist_component_installer.h" #include "chrome/browser/component_updater/ev_whitelist_component_installer.h"
#include "chrome/browser/component_updater/flash_component_installer.h" #include "chrome/browser/component_updater/flash_component_installer.h"
#include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
#include "chrome/browser/component_updater/recovery_component_installer.h" #include "chrome/browser/component_updater/recovery_component_installer.h"
#include "chrome/browser/component_updater/swiftshader_component_installer.h" #include "chrome/browser/component_updater/swiftshader_component_installer.h"
#include "chrome/browser/component_updater/widevine_cdm_component_installer.h" #include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
...@@ -186,6 +185,7 @@ ...@@ -186,6 +185,7 @@
#endif #endif
#if !defined(DISABLE_NACL) #if !defined(DISABLE_NACL)
#include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
#include "components/nacl/browser/nacl_process_host.h" #include "components/nacl/browser/nacl_process_host.h"
#endif #endif
...@@ -394,7 +394,9 @@ void RegisterComponentsForUpdate() { ...@@ -394,7 +394,9 @@ void RegisterComponentsForUpdate() {
RegisterPepperFlashComponent(cus); RegisterPepperFlashComponent(cus);
RegisterSwiftShaderComponent(cus); RegisterSwiftShaderComponent(cus);
RegisterWidevineCdmComponent(cus); RegisterWidevineCdmComponent(cus);
#if !defined(DISABLE_NACL)
g_browser_process->pnacl_component_installer()->RegisterPnaclComponent(cus); g_browser_process->pnacl_component_installer()->RegisterPnaclComponent(cus);
#endif
#endif #endif
if (translate::CldDataSource::ShouldRegisterForComponentUpdates()) { if (translate::CldDataSource::ShouldRegisterForComponentUpdates()) {
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/component_updater/component_updater_resource_throttle.h" #include "chrome/browser/component_updater/component_updater_resource_throttle.h"
#include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
#include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/download/download_request_limiter.h" #include "chrome/browser/download/download_request_limiter.h"
#include "chrome/browser/download/download_resource_throttle.h" #include "chrome/browser/download/download_resource_throttle.h"
...@@ -53,6 +52,10 @@ ...@@ -53,6 +52,10 @@
#include "net/http/http_response_headers.h" #include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h" #include "net/url_request/url_request.h"
#if !defined(DISABLE_NACL)
#include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
#endif
#if defined(ENABLE_CONFIGURATION_POLICY) #if defined(ENABLE_CONFIGURATION_POLICY)
#include "components/policy/core/common/cloud/policy_header_io_helper.h" #include "components/policy/core/common/cloud/policy_header_io_helper.h"
#endif #endif
...@@ -223,6 +226,7 @@ void LaunchURL(const GURL& url, int render_process_id, int render_view_id) { ...@@ -223,6 +226,7 @@ void LaunchURL(const GURL& url, int render_process_id, int render_view_id) {
} }
#endif // !defined(OS_ANDROID) #endif // !defined(OS_ANDROID)
#if !defined(DISABLE_NACL)
void AppendComponentUpdaterThrottles( void AppendComponentUpdaterThrottles(
net::URLRequest* request, net::URLRequest* request,
content::ResourceContext* resource_context, content::ResourceContext* resource_context,
...@@ -251,8 +255,9 @@ void AppendComponentUpdaterThrottles( ...@@ -251,8 +255,9 @@ void AppendComponentUpdaterThrottles(
component_updater::GetOnDemandResourceThrottle(cus, crx_id)); component_updater::GetOnDemandResourceThrottle(cus, crx_id));
} }
} }
#endif // !defined(DISABLE_NACL)
} // end namespace } // namespace
ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate( ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate(
prerender::PrerenderTracker* prerender_tracker) prerender::PrerenderTracker* prerender_tracker)
...@@ -397,12 +402,14 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning( ...@@ -397,12 +402,14 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
resource_context, resource_context,
resource_type, resource_type,
throttles); throttles);
#if !defined(DISABLE_NACL)
if (!is_prerendering) { if (!is_prerendering) {
AppendComponentUpdaterThrottles(request, AppendComponentUpdaterThrottles(request,
resource_context, resource_context,
resource_type, resource_type,
throttles); throttles);
} }
#endif
} }
void ChromeResourceDispatcherHostDelegate::DownloadStarting( void ChromeResourceDispatcherHostDelegate::DownloadStarting(
......
...@@ -209,8 +209,6 @@ ...@@ -209,8 +209,6 @@
'browser/browsing_data/browsing_data_database_helper.h', 'browser/browsing_data/browsing_data_database_helper.h',
'browser/browsing_data/browsing_data_file_system_helper.cc', 'browser/browsing_data/browsing_data_file_system_helper.cc',
'browser/browsing_data/browsing_data_file_system_helper.h', 'browser/browsing_data/browsing_data_file_system_helper.h',
'browser/browsing_data/browsing_data_flash_lso_helper.cc',
'browser/browsing_data/browsing_data_flash_lso_helper.h',
'browser/browsing_data/browsing_data_helper.cc', 'browser/browsing_data/browsing_data_helper.cc',
'browser/browsing_data/browsing_data_helper.h', 'browser/browsing_data/browsing_data_helper.h',
'browser/browsing_data/browsing_data_indexed_db_helper.cc', 'browser/browsing_data/browsing_data_indexed_db_helper.cc',
...@@ -280,12 +278,6 @@ ...@@ -280,12 +278,6 @@
'browser/component_updater/component_updater_resource_throttle.h', 'browser/component_updater/component_updater_resource_throttle.h',
'browser/component_updater/ev_whitelist_component_installer.cc', 'browser/component_updater/ev_whitelist_component_installer.cc',
'browser/component_updater/ev_whitelist_component_installer.h', 'browser/component_updater/ev_whitelist_component_installer.h',
'browser/component_updater/flash_component_installer.h',
'browser/component_updater/pepper_flash_component_installer.cc',
'browser/component_updater/pnacl/pnacl_component_installer.cc',
'browser/component_updater/pnacl/pnacl_component_installer.h',
'browser/component_updater/ppapi_utils.cc',
'browser/component_updater/ppapi_utils.h',
'browser/component_updater/recovery_component_installer.cc', 'browser/component_updater/recovery_component_installer.cc',
'browser/component_updater/recovery_component_installer.h', 'browser/component_updater/recovery_component_installer.h',
'browser/component_updater/sw_reporter_installer_win.cc', 'browser/component_updater/sw_reporter_installer_win.cc',
...@@ -1723,6 +1715,8 @@ ...@@ -1723,6 +1715,8 @@
'browser/spellchecker/word_trimmer.h', 'browser/spellchecker/word_trimmer.h',
], ],
'chrome_browser_nacl_sources': [ 'chrome_browser_nacl_sources': [
'browser/component_updater/pnacl/pnacl_component_installer.cc',
'browser/component_updater/pnacl/pnacl_component_installer.h',
'browser/nacl_host/nacl_browser_delegate_impl.cc', 'browser/nacl_host/nacl_browser_delegate_impl.cc',
'browser/nacl_host/nacl_browser_delegate_impl.h', 'browser/nacl_host/nacl_browser_delegate_impl.h',
'browser/nacl_host/nacl_infobar_delegate.cc', 'browser/nacl_host/nacl_infobar_delegate.cc',
...@@ -1730,6 +1724,12 @@ ...@@ -1730,6 +1724,12 @@
], ],
# See also the plugin_installation_sources list below. # See also the plugin_installation_sources list below.
'chrome_browser_plugins_sources': [ 'chrome_browser_plugins_sources': [
'browser/browsing_data/browsing_data_flash_lso_helper.cc',
'browser/browsing_data/browsing_data_flash_lso_helper.h',
'browser/component_updater/flash_component_installer.h',
'browser/component_updater/pepper_flash_component_installer.cc',
'browser/component_updater/ppapi_utils.cc',
'browser/component_updater/ppapi_utils.h',
'browser/metrics/plugin_metrics_provider.cc', 'browser/metrics/plugin_metrics_provider.cc',
'browser/metrics/plugin_metrics_provider.h', 'browser/metrics/plugin_metrics_provider.h',
'browser/pepper_broker_infobar_delegate.cc', 'browser/pepper_broker_infobar_delegate.cc',
...@@ -2948,7 +2948,6 @@ ...@@ -2948,7 +2948,6 @@
'../net/net.gyp:net_with_v8', '../net/net.gyp:net_with_v8',
# TODO(tonyg): Remove this dependency (crbug.com/280157). # TODO(tonyg): Remove this dependency (crbug.com/280157).
'../testing/perf/perf_test.gyp:*', '../testing/perf/perf_test.gyp:*',
'../third_party/adobe/flash/flash_player.gyp:flapper_version_h',
'../third_party/expat/expat.gyp:expat', '../third_party/expat/expat.gyp:expat',
'../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
'../third_party/libaddressinput/libaddressinput.gyp:libaddressinput', '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput',
...@@ -3099,6 +3098,7 @@ ...@@ -3099,6 +3098,7 @@
['enable_plugins==1', { ['enable_plugins==1', {
'dependencies': [ 'dependencies': [
'../ppapi/ppapi_internal.gyp:ppapi_ipc', '../ppapi/ppapi_internal.gyp:ppapi_ipc',
'../third_party/adobe/flash/flash_player.gyp:flapper_version_h',
], ],
'sources': [ '<@(chrome_browser_plugins_sources)' ], 'sources': [ '<@(chrome_browser_plugins_sources)' ],
}], }],
......
...@@ -1059,8 +1059,6 @@ ...@@ -1059,8 +1059,6 @@
'browser/ui/webui/fileicon_source.h', 'browser/ui/webui/fileicon_source.h',
'browser/ui/webui/flags_ui.cc', 'browser/ui/webui/flags_ui.cc',
'browser/ui/webui/flags_ui.h', 'browser/ui/webui/flags_ui.h',
'browser/ui/webui/flash_ui.cc',
'browser/ui/webui/flash_ui.h',
'browser/ui/webui/gcm_internals_ui.cc', 'browser/ui/webui/gcm_internals_ui.cc',
'browser/ui/webui/gcm_internals_ui.h', 'browser/ui/webui/gcm_internals_ui.h',
'browser/ui/webui/history_ui.cc', 'browser/ui/webui/history_ui.cc',
...@@ -1854,6 +1852,8 @@ ...@@ -1854,6 +1852,8 @@
'chrome_browser_ui_plugin_sources': [ 'chrome_browser_ui_plugin_sources': [
'browser/ui/hung_plugin_tab_helper.cc', 'browser/ui/hung_plugin_tab_helper.cc',
'browser/ui/hung_plugin_tab_helper.h', 'browser/ui/hung_plugin_tab_helper.h',
'browser/ui/webui/flash_ui.cc',
'browser/ui/webui/flash_ui.h',
], ],
'chrome_browser_ui_policy_sources': [ 'chrome_browser_ui_policy_sources': [
'browser/ui/webui/policy_ui.cc', 'browser/ui/webui/policy_ui.cc',
...@@ -2621,7 +2621,6 @@ ...@@ -2621,7 +2621,6 @@
'../media/media.gyp:media', '../media/media.gyp:media',
'../mojo/mojo_base.gyp:mojo_system_impl', '../mojo/mojo_base.gyp:mojo_system_impl',
'../net/net.gyp:net_with_v8', '../net/net.gyp:net_with_v8',
'../third_party/adobe/flash/flash_player.gyp:flapper_version_h',
'../third_party/expat/expat.gyp:expat', '../third_party/expat/expat.gyp:expat',
'../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
'../third_party/libjingle/libjingle.gyp:libjingle', '../third_party/libjingle/libjingle.gyp:libjingle',
...@@ -2680,6 +2679,7 @@ ...@@ -2680,6 +2679,7 @@
'sources': [ '<@(chrome_browser_ui_plugin_sources)' ], 'sources': [ '<@(chrome_browser_ui_plugin_sources)' ],
'dependencies': [ 'dependencies': [
'../ppapi/ppapi_internal.gyp:ppapi_ipc', '../ppapi/ppapi_internal.gyp:ppapi_ipc',
'../third_party/adobe/flash/flash_player.gyp:flapper_version_h',
], ],
}], }],
['safe_browsing==1', { ['safe_browsing==1', {
......
...@@ -149,10 +149,6 @@ ...@@ -149,10 +149,6 @@
'common/omnibox_focus_state.h', 'common/omnibox_focus_state.h',
'common/partial_circular_buffer.cc', 'common/partial_circular_buffer.cc',
'common/partial_circular_buffer.h', 'common/partial_circular_buffer.h',
'common/pepper_flash.cc',
'common/pepper_flash.h',
'common/pepper_permission_util.cc',
'common/pepper_permission_util.h',
'common/pref_names_util.cc', 'common/pref_names_util.cc',
'common/pref_names_util.h', 'common/pref_names_util.h',
'common/prerender_types.h', 'common/prerender_types.h',
...@@ -376,7 +372,6 @@ ...@@ -376,7 +372,6 @@
'<(DEPTH)/extensions/common/api/api.gyp:extensions_api', '<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
'<(DEPTH)/extensions/extensions.gyp:extensions_common', '<(DEPTH)/extensions/extensions.gyp:extensions_common',
'<(DEPTH)/ipc/ipc.gyp:ipc', '<(DEPTH)/ipc/ipc.gyp:ipc',
'<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
'<(DEPTH)/third_party/re2/re2.gyp:re2', '<(DEPTH)/third_party/re2/re2.gyp:re2',
'<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', '<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
], ],
...@@ -395,7 +390,6 @@ ...@@ -395,7 +390,6 @@
['exclude', '^common/logging_chrome\\.'], ['exclude', '^common/logging_chrome\\.'],
['exclude', '^common/media_galleries/'], ['exclude', '^common/media_galleries/'],
['exclude', '^common/multi_process_'], ['exclude', '^common/multi_process_'],
['exclude', '^common/pepper_flash\\.'],
['exclude', '^common/profiling\\.'], ['exclude', '^common/profiling\\.'],
['exclude', '^common/spellcheck_'], ['exclude', '^common/spellcheck_'],
['exclude', '^common/validation_message_'], ['exclude', '^common/validation_message_'],
...@@ -420,6 +414,17 @@ ...@@ -420,6 +414,17 @@
'<(DEPTH)/ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin', '<(DEPTH)/ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
], ],
}], }],
['enable_plugins==1', {
'dependencies': [
'<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h',
],
'sources': [
'common/pepper_flash.cc',
'common/pepper_flash.h',
'common/pepper_permission_util.cc',
'common/pepper_permission_util.h',
],
}],
['enable_printing==0', { ['enable_printing==0', {
'sources!': [ 'sources!': [
'common/print_messages.cc', 'common/print_messages.cc',
......
...@@ -2275,7 +2275,9 @@ ...@@ -2275,7 +2275,9 @@
['exclude', '^browser/plugins/'], ['exclude', '^browser/plugins/'],
], ],
'sources!': [ 'sources!': [
'browser/component_updater/test/component_installers_unittest.cc',
'browser/metrics/plugin_metrics_provider_unittest.cc', 'browser/metrics/plugin_metrics_provider_unittest.cc',
'common/pepper_permission_util_unittest.cc',
], ],
}], }],
['enable_printing!=1', { ['enable_printing!=1', {
......
...@@ -94,7 +94,6 @@ static_library("common") { ...@@ -94,7 +94,6 @@ static_library("common") {
"//extensions/common", "//extensions/common",
"//extensions/common/api", "//extensions/common/api",
"//ipc", "//ipc",
"//third_party/adobe/flash:flapper_version_h",
"//third_party/re2", "//third_party/re2",
"//third_party/widevine/cdm:version_h", "//third_party/widevine/cdm:version_h",
] ]
...@@ -211,7 +210,11 @@ static_library("common") { ...@@ -211,7 +210,11 @@ static_library("common") {
if (enable_remoting) { if (enable_remoting) {
#deps += [ '../remoting/remoting.gyp:remoting_client_plugin' ] TODO(GYP) #deps += [ '../remoting/remoting.gyp:remoting_client_plugin' ] TODO(GYP)
} }
if (!enable_plugins) { if (enable_plugins) {
deps += [
"//third_party/adobe/flash:flapper_version_h",
]
} else {
sources -= [ "pepper_permission_util.cc" ] sources -= [ "pepper_permission_util.cc" ]
} }
if (!enable_webrtc) { if (!enable_webrtc) {
......
...@@ -21,12 +21,10 @@ ...@@ -21,12 +21,10 @@
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h" #include "chrome/common/chrome_version_info.h"
#include "chrome/common/crash_keys.h" #include "chrome/common/crash_keys.h"
#include "chrome/common/pepper_flash.h"
#include "chrome/common/render_messages.h" #include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h" #include "chrome/common/url_constants.h"
#include "chrome/grit/common_resources.h" #include "chrome/grit/common_resources.h"
#include "components/dom_distiller/core/url_constants.h" #include "components/dom_distiller/core/url_constants.h"
#include "components/nacl/common/nacl_process_type.h"
#include "content/public/common/content_constants.h" #include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/common/pepper_plugin_info.h" #include "content/public/common/pepper_plugin_info.h"
...@@ -35,12 +33,10 @@ ...@@ -35,12 +33,10 @@
#include "extensions/common/constants.h" #include "extensions/common/constants.h"
#include "gpu/config/gpu_info.h" #include "gpu/config/gpu_info.h"
#include "net/http/http_util.h" #include "net/http/http_util.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/layout.h" #include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
#if defined(OS_WIN) #if defined(OS_WIN)
...@@ -52,9 +48,16 @@ ...@@ -52,9 +48,16 @@
#if !defined(DISABLE_NACL) #if !defined(DISABLE_NACL)
#include "components/nacl/common/nacl_constants.h" #include "components/nacl/common/nacl_constants.h"
#include "components/nacl/common/nacl_process_type.h"
#include "ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h" #include "ppapi/native_client/src/trusted/plugin/ppapi_entrypoints.h"
#endif #endif
#if defined(ENABLE_PLUGINS)
#include "chrome/common/pepper_flash.h"
#include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
#include "ppapi/shared_impl/ppapi_permissions.h"
#endif
#if defined(ENABLE_REMOTING) #if defined(ENABLE_REMOTING)
#include "remoting/client/plugin/pepper_entrypoints.h" #include "remoting/client/plugin/pepper_entrypoints.h"
#endif #endif
...@@ -66,6 +69,7 @@ ...@@ -66,6 +69,7 @@
namespace { namespace {
#if defined(ENABLE_PLUGINS)
const char kPDFPluginMimeType[] = "application/pdf"; const char kPDFPluginMimeType[] = "application/pdf";
const char kPDFPluginExtension[] = "pdf"; const char kPDFPluginExtension[] = "pdf";
const char kPDFPluginDescription[] = "Portable Document Format"; const char kPDFPluginDescription[] = "Portable Document Format";
...@@ -408,6 +412,7 @@ bool GetBundledPepperFlash(content::PepperPluginInfo* plugin) { ...@@ -408,6 +412,7 @@ bool GetBundledPepperFlash(content::PepperPluginInfo* plugin) {
return false; return false;
#endif // FLAPPER_AVAILABLE #endif // FLAPPER_AVAILABLE
} }
#endif // defined(ENABLE_PLUGINS)
std::string GetProduct() { std::string GetProduct() {
chrome::VersionInfo version_info; chrome::VersionInfo version_info;
...@@ -462,12 +467,14 @@ void ChromeContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) { ...@@ -462,12 +467,14 @@ void ChromeContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) {
void ChromeContentClient::AddPepperPlugins( void ChromeContentClient::AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) { std::vector<content::PepperPluginInfo>* plugins) {
#if defined(ENABLE_PLUGINS)
ComputeBuiltInPlugins(plugins); ComputeBuiltInPlugins(plugins);
AddPepperFlashFromCommandLine(plugins); AddPepperFlashFromCommandLine(plugins);
content::PepperPluginInfo plugin; content::PepperPluginInfo plugin;
if (GetBundledPepperFlash(&plugin)) if (GetBundledPepperFlash(&plugin))
plugins->push_back(plugin); plugins->push_back(plugin);
#endif
} }
void ChromeContentClient::AddAdditionalSchemes( void ChromeContentClient::AddAdditionalSchemes(
...@@ -516,14 +523,16 @@ gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const { ...@@ -516,14 +523,16 @@ gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const {
} }
std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) { std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) {
#if !defined(DISABLE_NACL)
switch (type) { switch (type) {
case PROCESS_TYPE_NACL_LOADER: case PROCESS_TYPE_NACL_LOADER:
return "Native Client module"; return "Native Client module";
case PROCESS_TYPE_NACL_BROKER: case PROCESS_TYPE_NACL_BROKER:
return "Native Client broker"; return "Native Client broker";
} }
#endif
DCHECK(false) << "Unknown child process type!"; NOTREACHED() << "Unknown child process type!";
return "Unknown"; return "Unknown";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment