#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
#include <utility>
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/plugins/plugin_prefs.h"
#include "chrome/browser/plugins/plugin_utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_render_frame.mojom.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_constants.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
BrowserThread;
PluginService;
struct ChromePluginServiceFilter::ContextInfo { … };
ChromePluginServiceFilter::ContextInfo::ContextInfo(
scoped_refptr<PluginPrefs> pp,
scoped_refptr<HostContentSettingsMap> hcsm,
Profile* profile)
: … { … }
ChromePluginServiceFilter::ContextInfo::~ContextInfo() = default;
ChromePluginServiceFilter::ProcessDetails::ProcessDetails() = default;
ChromePluginServiceFilter::ProcessDetails::ProcessDetails(
const ProcessDetails& other) = default;
ChromePluginServiceFilter::ProcessDetails::~ProcessDetails() = default;
ChromePluginServiceFilter* ChromePluginServiceFilter::GetInstance() { … }
void ChromePluginServiceFilter::RegisterProfile(Profile* profile) { … }
void ChromePluginServiceFilter::UnregisterProfile(Profile* profile) { … }
void ChromePluginServiceFilter::AuthorizePlugin(
int render_process_id,
const base::FilePath& plugin_path) { … }
void ChromePluginServiceFilter::AuthorizeAllPlugins(
content::WebContents* web_contents,
bool load_blocked,
const std::string& identifier) { … }
bool ChromePluginServiceFilter::IsPluginAvailable(
content::BrowserContext* browser_context,
const content::WebPluginInfo& plugin) { … }
bool ChromePluginServiceFilter::CanLoadPlugin(int render_process_id,
const base::FilePath& path) { … }
void ChromePluginServiceFilter::RenderProcessExited(
content::RenderProcessHost* host,
const content::ChildProcessTerminationInfo& info) { … }
void ChromePluginServiceFilter::NotifyIfObserverAddedForTesting(
base::RepeatingClosure observer_added_callback_for_testing) { … }
ChromePluginServiceFilter::ChromePluginServiceFilter() { … }
ChromePluginServiceFilter::~ChromePluginServiceFilter() = default;
ChromePluginServiceFilter::ProcessDetails*
ChromePluginServiceFilter::GetOrRegisterProcess(
int render_process_id) { … }
const ChromePluginServiceFilter::ProcessDetails*
ChromePluginServiceFilter::GetProcess(
int render_process_id) const { … }
void ChromePluginServiceFilter::ObserveRenderProcessHost(
int render_process_id) { … }