#include "chrome/browser/background/background_contents.h"
#include <utility>
#include "chrome/browser/background/background_contents_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/task_manager/web_contents_tags.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/session_storage_namespace.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extension_host_delegate.h"
#include "extensions/browser/extension_host_queue.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/mojom/view_type.mojom.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "ui/gfx/geometry/rect.h"
SiteInstance;
WebContents;
BackgroundContents::BackgroundContents(
scoped_refptr<SiteInstance> site_instance,
content::RenderFrameHost* opener,
bool is_new_browsing_instance,
Delegate* delegate,
const content::StoragePartitionConfig& partition_config,
content::SessionStorageNamespace* session_storage_namespace)
: … { … }
BackgroundContents::BackgroundContents() = default;
BackgroundContents::~BackgroundContents() { … }
const GURL& BackgroundContents::GetURL() const { … }
void BackgroundContents::CreateRendererSoon(const GURL& url) { … }
void BackgroundContents::CloseContents(WebContents* source) { … }
bool BackgroundContents::ShouldSuppressDialogs(WebContents* source) { … }
void BackgroundContents::PrimaryPageChanged(content::Page& page) { … }
WebContents* BackgroundContents::AddNewContents(
WebContents* source,
std::unique_ptr<WebContents> new_contents,
const GURL& target_url,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& window_features,
bool user_gesture,
bool* was_blocked) { … }
bool BackgroundContents::IsNeverComposited(content::WebContents* web_contents) { … }
void BackgroundContents::PrimaryMainFrameRenderProcessGone(
base::TerminationStatus status) { … }
void BackgroundContents::CreateRendererNow() { … }