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

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) 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/renderer/DEPS ('k') | components/nacl.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9eb68b5b6f9f84437cc5df0b89250faea384c0db..84dd16cf32bce27895cbaf5c0ccd8a4e1bed3d14 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.
@@ -676,12 +678,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) {
@@ -740,6 +743,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
break;
}
}
+#endif // !defined(DISABLE_NACL)
// Delay loading plugins if prerendering.
// TODO(mmenke): In the case of prerendering, feed into
« no previous file with comments | « chrome/renderer/DEPS ('k') | components/nacl.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698