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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 437503004: Add NaCl support to app_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (nacl-init) cleanup 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
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index d2a85a59fc0b156f0dd142ea6967843f8ed51c3b..da9c239ebac5607a8047405e679c80b4622b7844 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -15,7 +15,6 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
@@ -115,6 +114,7 @@
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
#if !defined(DISABLE_NACL)
+#include "components/nacl/common/nacl_constants.h"
#include "components/nacl/renderer/nacl_helper.h"
#endif
@@ -230,9 +230,11 @@ bool ShouldUseJavaScriptSettingForPlugin(const WebPluginInfo& plugin) {
return false;
}
+#if !defined(DISABLE_NACL)
// Treat Native Client invocations like JavaScript.
- if (plugin.name == ASCIIToUTF16(ChromeContentClient::kNaClPluginName))
+ if (plugin.name == ASCIIToUTF16(nacl::kNaClPluginName))
return true;
+#endif
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
// Treat CDM invocations like JavaScript.
@@ -675,12 +677,13 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
break;
}
case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: {
+#if !defined(DISABLE_NACL)
const bool is_nacl_plugin =
- plugin.name == ASCIIToUTF16(ChromeContentClient::kNaClPluginName);
+ plugin.name == ASCIIToUTF16(nacl::kNaClPluginName);
const bool is_nacl_mime_type =
- actual_mime_type == "application/x-nacl";
+ actual_mime_type == nacl::kNaClPluginMimeType;
const bool is_pnacl_mime_type =
- actual_mime_type == "application/x-pnacl";
+ actual_mime_type == nacl::kPnaclPluginMimeType;
if (is_nacl_plugin || is_nacl_mime_type || is_pnacl_mime_type) {
bool is_nacl_unrestricted = false;
if (is_nacl_mime_type) {
@@ -739,6 +742,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
break;
}
}
+#endif // !defined(DISABLE_NACL)
// Delay loading plugins if prerendering.
// TODO(mmenke): In the case of prerendering, feed into

Powered by Google App Engine
This is Rietveld 408576698