mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 9cedf753 (#418732)
- Simplify usage of OnBeforePluginLoad (issue #2015) - Switch crash reporting from crashpad to breakpad on Windows and OS X. Adds a new chrome_elf.dll dependency on Windows (issue #1995) - Remove CefTextfield::GetPlaceholderTextColor() method which is no longer supported by Chromium.
This commit is contained in:
@@ -19,9 +19,9 @@
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/plugins/plugin_finder.h"
|
||||
#include "chrome/browser/plugins/plugins_field_trial.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/content_settings/core/browser/content_settings_utils.h"
|
||||
#include "components/content_settings/core/browser/plugins_field_trial.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/plugin_service.h"
|
||||
@@ -310,7 +310,7 @@ void CefPluginInfoMessageFilter::Context::DecidePluginStatus(
|
||||
|
||||
// TODO(tommycli): Remove once we deprecate the plugin ASK policy.
|
||||
bool legacy_ask_user = plugin_setting == CONTENT_SETTING_ASK;
|
||||
plugin_setting = content_settings::PluginsFieldTrial::EffectiveContentSetting(
|
||||
plugin_setting = PluginsFieldTrial::EffectiveContentSetting(
|
||||
CONTENT_SETTINGS_TYPE_PLUGINS, plugin_setting);
|
||||
|
||||
DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT);
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#include "libcef/common/cef_messages.h"
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
#include "extensions/common/constants.h"
|
||||
|
||||
CefPluginServiceFilter::CefPluginServiceFilter() {
|
||||
}
|
||||
|
||||
@@ -22,12 +24,25 @@ bool CefPluginServiceFilter::IsPluginAvailable(
|
||||
const GURL& url,
|
||||
const GURL& policy_url,
|
||||
content::WebPluginInfo* plugin) {
|
||||
CefRefPtr<CefRequestContextHandler> handler =
|
||||
reinterpret_cast<const CefResourceContext*>(context)->GetHandler();
|
||||
CefResourceContext* resource_context = const_cast<CefResourceContext*>(
|
||||
reinterpret_cast<const CefResourceContext*>(context));
|
||||
|
||||
bool allow_load = true;
|
||||
if (resource_context->HasPluginLoadDecision(render_process_id, plugin->path,
|
||||
&allow_load)) {
|
||||
return allow_load;
|
||||
}
|
||||
|
||||
CefRefPtr<CefRequestContextHandler> handler = resource_context->GetHandler();
|
||||
CefViewHostMsg_GetPluginInfo_Status status =
|
||||
CefViewHostMsg_GetPluginInfo_Status::kAllowed;
|
||||
return IsPluginAvailable(handler.get(), url, policy_url, plugin, &status);
|
||||
allow_load = IsPluginAvailable(handler.get(), url, policy_url, plugin,
|
||||
&status);
|
||||
|
||||
resource_context->AddPluginLoadDecision(render_process_id, plugin->path,
|
||||
allow_load);
|
||||
|
||||
return allow_load;
|
||||
}
|
||||
|
||||
bool CefPluginServiceFilter::CanLoadPlugin(int render_process_id,
|
||||
@@ -53,6 +68,15 @@ bool CefPluginServiceFilter::IsPluginAvailable(
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!policy_url.is_empty() &&
|
||||
policy_url.scheme() == extensions::kExtensionScheme) {
|
||||
// Always allow extension origins to load plugins.
|
||||
// TODO(extensions): Revisit this decision once CEF supports more than just
|
||||
// the PDF extension.
|
||||
*status = CefViewHostMsg_GetPluginInfo_Status::kAllowed;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (handler) {
|
||||
CefRefPtr<CefWebPluginInfoImpl> pluginInfo(
|
||||
new CefWebPluginInfoImpl(*plugin));
|
||||
|
@@ -33,6 +33,7 @@ class CefPluginServiceFilter : public content::PluginServiceFilter {
|
||||
|
||||
// Returns false if the plugin is not found or disabled. May call
|
||||
// CefRequestContextHandler::OnBeforePluginLoad if possible/necessary.
|
||||
// See related discussion in issue #2015.
|
||||
bool IsPluginAvailable(CefRequestContextHandler* handler,
|
||||
const GURL& url,
|
||||
const GURL& policy_url,
|
||||
|
Reference in New Issue
Block a user