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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 494993005: Only build various flash/pnacl/ppapi code when they are enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index 6bff669396d91b9b6938395fd64d466ed65152ab..efc4b06a332b834663f92ca980f6e0a128fcf7aa 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -21,12 +21,10 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/crash_keys.h"
-#include "chrome/common/pepper_flash.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/common_resources.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_switches.h"
#include "content/public/common/pepper_plugin_info.h"
@@ -35,12 +33,10 @@
#include "extensions/common/constants.h"
#include "gpu/config/gpu_info.h"
#include "net/http/http_util.h"
-#include "ppapi/shared_impl/ppapi_permissions.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/layout.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.
#if defined(OS_WIN)
@@ -52,9 +48,16 @@
#if !defined(DISABLE_NACL)
#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"
#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)
#include "remoting/client/plugin/pepper_entrypoints.h"
#endif
@@ -66,6 +69,7 @@
namespace {
+#if defined(ENABLE_PLUGINS)
const char kPDFPluginMimeType[] = "application/pdf";
const char kPDFPluginExtension[] = "pdf";
const char kPDFPluginDescription[] = "Portable Document Format";
@@ -408,6 +412,7 @@ bool GetBundledPepperFlash(content::PepperPluginInfo* plugin) {
return false;
#endif // FLAPPER_AVAILABLE
}
+#endif // defined(ENABLE_PLUGINS)
std::string GetProduct() {
chrome::VersionInfo version_info;
@@ -462,12 +467,14 @@ void ChromeContentClient::SetGpuInfo(const gpu::GPUInfo& gpu_info) {
void ChromeContentClient::AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) {
+#if defined(ENABLE_PLUGINS)
ComputeBuiltInPlugins(plugins);
AddPepperFlashFromCommandLine(plugins);
content::PepperPluginInfo plugin;
if (GetBundledPepperFlash(&plugin))
plugins->push_back(plugin);
+#endif
}
void ChromeContentClient::AddAdditionalSchemes(
@@ -516,14 +523,16 @@ gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const {
}
std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) {
+#if !defined(DISABLE_NACL)
switch (type) {
case PROCESS_TYPE_NACL_LOADER:
return "Native Client module";
case PROCESS_TYPE_NACL_BROKER:
return "Native Client broker";
}
+#endif
- DCHECK(false) << "Unknown child process type!";
+ NOTREACHED() << "Unknown child process type!";
return "Unknown";
}
« no previous file with comments | « chrome/common/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698