#include "chrome/renderer/extensions/chrome_extensions_renderer_client.h"
#include <utility>
#include "base/lazy_instance.h"
#include "base/metrics/histogram_functions.h"
#include "chrome/common/chrome_isolated_world_ids.h"
#include "chrome/renderer/extensions/chrome_resource_request_policy_delegate.h"
#include "chrome/renderer/extensions/renderer_permissions_policy_delegate.h"
#include "chrome/renderer/process_state.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/renderer_extension_registry.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/cookies/site_for_cookies.h"
#include "services/metrics/public/cpp/mojo_ukm_recorder.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_plugin_params.h"
#include "url/origin.h"
#if BUILDFLAG(ENABLE_GUEST_VIEW)
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container_manager.h"
#endif
Extension;
namespace {
enum class GoogleDocsExtensionAvailablity { … };
}
ChromeExtensionsRendererClient::ChromeExtensionsRendererClient() { … }
ChromeExtensionsRendererClient::~ChromeExtensionsRendererClient() { … }
void ChromeExtensionsRendererClient::Create() { … }
bool ChromeExtensionsRendererClient::IsIncognitoProcess() const { … }
int ChromeExtensionsRendererClient::GetLowestIsolatedWorldId() const { … }
void ChromeExtensionsRendererClient::FinishInitialization() { … }
std::unique_ptr<extensions::ResourceRequestPolicy::Delegate>
ChromeExtensionsRendererClient::CreateResourceRequestPolicyDelegate() { … }
void ChromeExtensionsRendererClient::RecordMetricsForURLRequest(
blink::WebLocalFrame* frame,
const blink::WebURL& target_url) { … }
void ChromeExtensionsRendererClient::DidBlockMimeHandlerViewForDisallowedPlugin(
const blink::WebElement& plugin_element) { … }
bool ChromeExtensionsRendererClient::MaybeCreateMimeHandlerView(
const blink::WebElement& plugin_element,
const GURL& resource_url,
const std::string& mime_type,
const content::WebPluginInfo& plugin_info) { … }