Commit a56f8324 authored by thestig@chromium.org's avatar thestig@chromium.org

Drop NaCl dependencies on platforms where disable_nacl=1.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283505 0039d316-1c4b-4281-b951-d872f2087c98
parent 5ab138cf
...@@ -101,11 +101,6 @@ ...@@ -101,11 +101,6 @@
#include "components/cdm/browser/cdm_message_filter_android.h" #include "components/cdm/browser/cdm_message_filter_android.h"
#include "components/cloud_devices/common/cloud_devices_switches.h" #include "components/cloud_devices/common/cloud_devices_switches.h"
#include "components/google/core/browser/google_util.h" #include "components/google/core/browser/google_util.h"
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/browser/nacl_host_message_filter.h"
#include "components/nacl/browser/nacl_process_host.h"
#include "components/nacl/common/nacl_process_type.h"
#include "components/nacl/common/nacl_switches.h"
#include "components/pref_registry/pref_registry_syncable.h" #include "components/pref_registry/pref_registry_syncable.h"
#include "components/signin/core/common/profile_management_switches.h" #include "components/signin/core/common/profile_management_switches.h"
#include "components/translate/core/common/translate_switches.h" #include "components/translate/core/common/translate_switches.h"
...@@ -228,6 +223,14 @@ ...@@ -228,6 +223,14 @@
#include "chrome/browser/captive_portal/captive_portal_tab_helper.h" #include "chrome/browser/captive_portal/captive_portal_tab_helper.h"
#endif #endif
#if !defined(DISABLE_NACL)
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/browser/nacl_host_message_filter.h"
#include "components/nacl/browser/nacl_process_host.h"
#include "components/nacl/common/nacl_process_type.h"
#include "components/nacl/common/nacl_switches.h"
#endif
#if defined(ENABLE_EXTENSIONS) #if defined(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/api/web_request/web_request_api.h" #include "chrome/browser/extensions/api/web_request/web_request_api.h"
#include "chrome/browser/guest_view/guest_view_base.h" #include "chrome/browser/guest_view/guest_view_base.h"
...@@ -255,7 +258,6 @@ ...@@ -255,7 +258,6 @@
using base::FileDescriptor; using base::FileDescriptor;
using blink::WebWindowFeatures; using blink::WebWindowFeatures;
using content::AccessTokenStore; using content::AccessTokenStore;
using content::BrowserChildProcessHostIterator;
using content::BrowserThread; using content::BrowserThread;
using content::BrowserURLHandler; using content::BrowserURLHandler;
using content::ChildProcessSecurityPolicy; using content::ChildProcessSecurityPolicy;
...@@ -1654,8 +1656,10 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( ...@@ -1654,8 +1656,10 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kEnableAppWindowControls, switches::kEnableAppWindowControls,
switches::kEnableBenchmarking, switches::kEnableBenchmarking,
switches::kEnableNaCl, switches::kEnableNaCl,
#if !defined(DISABLE_NACL)
switches::kEnableNaClDebug, switches::kEnableNaClDebug,
switches::kEnableNaClNonSfiMode, switches::kEnableNaClNonSfiMode,
#endif
switches::kEnableNetBenchmarking, switches::kEnableNetBenchmarking,
switches::kEnableShowModalDialog, switches::kEnableShowModalDialog,
switches::kEnableStreamlinedHostedApps, switches::kEnableStreamlinedHostedApps,
...@@ -1699,8 +1703,10 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( ...@@ -1699,8 +1703,10 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
static const char* const kSwitchNames[] = { static const char* const kSwitchNames[] = {
// Load (in-process) Pepper plugins in-process in the zygote pre-sandbox. // Load (in-process) Pepper plugins in-process in the zygote pre-sandbox.
switches::kDisableBundledPpapiFlash, switches::kDisableBundledPpapiFlash,
#if !defined(DISABLE_NACL)
switches::kEnableNaClNonSfiMode, switches::kEnableNaClNonSfiMode,
switches::kNaClDangerousNoSandboxNonSfi, switches::kNaClDangerousNoSandboxNonSfi,
#endif
switches::kPpapiFlashPath, switches::kPpapiFlashPath,
switches::kPpapiFlashVersion, switches::kPpapiFlashVersion,
}; };
...@@ -2582,7 +2588,8 @@ void ChromeContentBrowserClient::DidCreatePpapiPlugin( ...@@ -2582,7 +2588,8 @@ void ChromeContentBrowserClient::DidCreatePpapiPlugin(
content::BrowserPpapiHost* content::BrowserPpapiHost*
ChromeContentBrowserClient::GetExternalBrowserPpapiHost( ChromeContentBrowserClient::GetExternalBrowserPpapiHost(
int plugin_process_id) { int plugin_process_id) {
BrowserChildProcessHostIterator iter(PROCESS_TYPE_NACL_LOADER); #if !defined(DISABLE_NACL)
content::BrowserChildProcessHostIterator iter(PROCESS_TYPE_NACL_LOADER);
while (!iter.Done()) { while (!iter.Done()) {
nacl::NaClProcessHost* host = static_cast<nacl::NaClProcessHost*>( nacl::NaClProcessHost* host = static_cast<nacl::NaClProcessHost*>(
iter.GetDelegate()); iter.GetDelegate());
...@@ -2593,6 +2600,7 @@ content::BrowserPpapiHost* ...@@ -2593,6 +2600,7 @@ content::BrowserPpapiHost*
} }
++iter; ++iter;
} }
#endif
return NULL; return NULL;
} }
......
...@@ -103,8 +103,6 @@ ...@@ -103,8 +103,6 @@
'common/extensions/manifest_handlers/mime_types_handler.h', 'common/extensions/manifest_handlers/mime_types_handler.h',
'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc', 'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
'common/extensions/manifest_handlers/minimum_chrome_version_checker.h', 'common/extensions/manifest_handlers/minimum_chrome_version_checker.h',
'common/extensions/manifest_handlers/nacl_modules_handler.cc',
'common/extensions/manifest_handlers/nacl_modules_handler.h',
'common/extensions/manifest_handlers/settings_overrides_handler.cc', 'common/extensions/manifest_handlers/settings_overrides_handler.cc',
'common/extensions/manifest_handlers/settings_overrides_handler.h', 'common/extensions/manifest_handlers/settings_overrides_handler.h',
'common/extensions/manifest_handlers/synthesize_browser_action_handler.cc', 'common/extensions/manifest_handlers/synthesize_browser_action_handler.cc',
...@@ -363,7 +361,6 @@ ...@@ -363,7 +361,6 @@
'<(DEPTH)/components/components.gyp:password_manager_core_common', '<(DEPTH)/components/components.gyp:password_manager_core_common',
'<(DEPTH)/components/components.gyp:signin_core_common', '<(DEPTH)/components/components.gyp:signin_core_common',
'<(DEPTH)/components/components.gyp:translate_content_common', '<(DEPTH)/components/components.gyp:translate_content_common',
'<(DEPTH)/components/nacl.gyp:nacl_common',
'<(DEPTH)/components/components.gyp:visitedlink_common', '<(DEPTH)/components/components.gyp:visitedlink_common',
'<(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',
...@@ -387,7 +384,6 @@ ...@@ -387,7 +384,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/nacl_'],
['exclude', '^common/pepper_flash\\.'], ['exclude', '^common/pepper_flash\\.'],
['exclude', '^common/profiling\\.'], ['exclude', '^common/profiling\\.'],
['exclude', '^common/spellcheck_'], ['exclude', '^common/spellcheck_'],
...@@ -407,6 +403,15 @@ ...@@ -407,6 +403,15 @@
'<(DEPTH)/breakpad/src', '<(DEPTH)/breakpad/src',
], ],
}], }],
['disable_nacl==0', {
'dependencies': [
'<(DEPTH)/components/nacl.gyp:nacl_common',
],
'sources': [
'common/extensions/manifest_handlers/nacl_modules_handler.cc',
'common/extensions/manifest_handlers/nacl_modules_handler.h',
],
}],
['enable_printing==0', { ['enable_printing==0', {
'sources!': [ 'sources!': [
'common/print_messages.cc', 'common/print_messages.cc',
...@@ -439,18 +444,17 @@ ...@@ -439,18 +444,17 @@
}], }],
['OS=="android"', { ['OS=="android"', {
'sources/': [ 'sources/': [
['exclude', '^common/chrome_version_info_posix.cc'],
['exclude', '^common/importer/'], ['exclude', '^common/importer/'],
['exclude', '^common/media_galleries/'], ['exclude', '^common/media_galleries/'],
['exclude', '^common/service_'], ['exclude', '^common/service_'],
], ],
'sources!': [ 'sources!': [
'common/badge_util.cc', 'common/badge_util.cc',
'common/chrome_version_info_posix.cc',
'common/extensions/api/extension_action/browser_action_handler.cc', 'common/extensions/api/extension_action/browser_action_handler.cc',
'common/extensions/api/extension_action/page_action_handler.cc', 'common/extensions/api/extension_action/page_action_handler.cc',
'common/extensions/api/spellcheck/spellcheck_handler.cc', 'common/extensions/api/spellcheck/spellcheck_handler.cc',
'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc', 'common/extensions/manifest_handlers/minimum_chrome_version_checker.cc',
'common/extensions/manifest_handlers/nacl_modules_handler.cc',
'common/icon_with_badge_image_source.cc', 'common/icon_with_badge_image_source.cc',
'common/net/url_util.cc', 'common/net/url_util.cc',
'common/spellcheck_common.cc', 'common/spellcheck_common.cc',
......
...@@ -78,10 +78,21 @@ static_library("common") { ...@@ -78,10 +78,21 @@ static_library("common") {
#'<(DEPTH)/components/components.gyp:password_manager_core_common', TODO(GYP) #'<(DEPTH)/components/components.gyp:password_manager_core_common', TODO(GYP)
#'<(DEPTH)/components/components.gyp:signin_core_common', TODO(GYP) #'<(DEPTH)/components/components.gyp:signin_core_common', TODO(GYP)
#'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP) #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP)
#'<(DEPTH)/extensions/common/api/api.gyp:extensions_api', TODO(GYP)
#'<(DEPTH)/extensions/extensions.gyp:extensions_common', TODO(GYP) #'<(DEPTH)/extensions/extensions.gyp:extensions_common', TODO(GYP)
] ]
} }
if (enable_nacl) {
deps += [
#'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP)
]
sources += [
"extensions/manifest_handlers/nacl_modules_handler.cc",
"extensions/manifest_handlers/nacl_modules_handler.h",
]
}
if (safe_browsing_mode == 1) { if (safe_browsing_mode == 1) {
defines += [ "FULL_SAFE_BROWSING" ] defines += [ "FULL_SAFE_BROWSING" ]
sources += rebase_path( sources += rebase_path(
...@@ -163,8 +174,12 @@ static_library("constants") { ...@@ -163,8 +174,12 @@ static_library("constants") {
"//base", "//base",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//third_party/widevine/cdm:version_h", "//third_party/widevine/cdm:version_h",
# TODO(GYP) #'../components/components.gyp:bookmarks_common', TODO(GYP)
#'../components/components.gyp:bookmarks_common',
#'../components/nacl.gyp:nacl_switches',
] ]
if (enable_nacl) {
deps += [
#'../components/nacl.gyp:nacl_switches', TODO(GYP)
]
}
} }
...@@ -14,4 +14,7 @@ ...@@ -14,4 +14,7 @@
#endif #endif
#include "chrome/common/common_message_generator.h" #include "chrome/common/common_message_generator.h"
#if !defined(DISABLE_NACL)
#include "components/nacl/common/nacl_messages.h" #include "components/nacl/common/nacl_messages.h"
#endif
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
'../base/base.gyp:base', '../base/base.gyp:base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../components/components.gyp:bookmarks_common', '../components/components.gyp:bookmarks_common',
'../components/nacl.gyp:nacl_switches',
'../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
], ],
'target_conditions': [ 'target_conditions': [
...@@ -84,6 +83,13 @@ ...@@ -84,6 +83,13 @@
], ],
}], }],
], ],
'conditions': [
['disable_nacl==0', {
'dependencies': [
'../components/nacl.gyp:nacl_switches',
],
}],
],
}, },
], ],
'conditions': [ 'conditions': [
......
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