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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2367553002: [HBD] Merge two identical ShouldUseJavaScriptSettingForPlugin impls (Closed)
Patch Set: update comment Created 4 years, 3 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/plugin_utils.cc ('k') | no next file » | 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 a8889951a9d9543cd306761ef4ce859acc2be170..087e254a84a411484d54be6848827332b19b7733 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -116,7 +116,6 @@
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/webui/jstemplate_builder.h"
-#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
#if !defined(DISABLE_NACL)
#include "components/nacl/common/nacl_constants.h"
@@ -133,6 +132,7 @@
#endif
#if defined(ENABLE_PLUGINS)
+#include "chrome/common/plugin_utils.h"
#include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
#include "chrome/renderer/plugins/power_saver_info.h"
#endif
@@ -236,30 +236,6 @@ void AppendParams(const std::vector<base::string16>& additional_names,
existing_names->swap(names);
existing_values->swap(values);
}
-
-// For certain sandboxed Pepper plugins, use the JavaScript Content Settings.
-bool ShouldUseJavaScriptSettingForPlugin(const WebPluginInfo& plugin) {
- if (plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS &&
- plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) {
- return false;
- }
-
-#if !defined(DISABLE_NACL)
- // Treat Native Client invocations like JavaScript.
- if (plugin.name == ASCIIToUTF16(nacl::kNaClPluginName))
- return true;
-#endif
-
-#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
- // Treat CDM invocations like JavaScript.
- if (plugin.name == ASCIIToUTF16(kWidevineCdmDisplayName)) {
- DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS);
- return true;
- }
-#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
-
- return false;
-}
#endif // defined(ENABLE_PLUGINS)
#if defined(ENABLE_SPELLCHECK)
« no previous file with comments | « chrome/common/plugin_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698