Add plugin placeholder and policy support (issue #1708)

- Default plugin loading policy can be specified using the new
  `--plugin-policy=[allow|block|detect]` command-line flag.
- Move CefRequestHandler::OnBeforePluginLoad to
  CefRequestContextHandler and add a new policy argument that
  supports different actions (allow, block, detect, disable) on a
  per-plugin-instance basis.
- Add CefContextMenuHandler::RunContextMenu for providing a custom
  context menu implementation.
- Add CefResourceBundleHandler::GetDataResourceForScale for
  returning scaled resources (issue #1272).
- Add CefResourceBundle for retrieving resources from the resource
  bundle (*.pak) files loaded by CEF during startup or via the
  CefResourceBundleHandler.
- Linux: Fix Debug build IO access warning with CefGetMimeType.
- cef_unittests: Move the refcounting implementation from TestHandler
  to subclasses in order to support interface inheritance from
  subclasses.
This commit is contained in:
Marshall Greenblatt
2015-09-09 16:05:39 +02:00
parent 846107b291
commit dc3aae19e8
114 changed files with 4007 additions and 559 deletions

View File

@@ -17,6 +17,7 @@
#include "chrome/browser/prefs/command_line_pref_store.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "extensions/browser/extension_prefs.h"
@@ -84,13 +85,14 @@ scoped_ptr<PrefService> CefBrowserPrefStore::CreateService() {
new CommandLinePrefStore(command_line));
factory.set_user_prefs(this);
scoped_refptr< user_prefs::PrefRegistrySyncable> registry(
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable());
// Default settings.
CefMediaCaptureDevicesDispatcher::RegisterPrefs(registry.get());
PrefProxyConfigTrackerImpl::RegisterPrefs(registry.get());
extensions::ExtensionPrefs::RegisterProfilePrefs(registry.get());
HostContentSettingsMap::RegisterProfilePrefs(registry.get());
// Print settings.
registry->RegisterBooleanPref(prefs::kPrintingEnabled, true);
@@ -122,6 +124,11 @@ scoped_ptr<PrefService> CefBrowserPrefStore::CreateService() {
registry->RegisterBooleanPref(prefs::kEnableDRM, false);
registry->RegisterStringPref(prefs::kDRMSalt, "");
// Plugin settings.
// Based on chrome::RegisterBrowserUserPrefs.
registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false);
registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false);
return factory.Create(registry.get());
}