#include "chrome/browser/metrics/usage_scenario/tab_usage_scenario_tracker.h"
#include "base/containers/contains.h"
#include "base/not_fatal_until.h"
#include "chrome/browser/metrics/usage_scenario/usage_scenario_data_store.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/visibility.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/script_injection_tracker.h"
#include "extensions/common/extension_id.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "ui/display/screen.h"
#include "url/origin.h"
namespace metrics {
namespace {
std::pair<ukm::SourceId, url::Origin> GetNavigationInfoForContents(
content::WebContents* contents) { … }
extensions::ExtensionIdSet GetExtensionsThatRanContentScriptsInWebContents(
content::WebContents* contents) { … }
}
TabUsageScenarioTracker::TabUsageScenarioTracker(
UsageScenarioDataStoreImpl* usage_scenario_data_store)
: … { … }
TabUsageScenarioTracker::~TabUsageScenarioTracker() { … }
void TabUsageScenarioTracker::OnTabAdded(content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnTabRemoved(content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnTabReplaced(
content::WebContents* old_contents,
content::WebContents* new_contents) { … }
void TabUsageScenarioTracker::OnTabVisibilityChanged(
content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnTabInteraction(
content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnTabIsAudibleChanged(
content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnMediaEffectivelyFullscreenChanged(
content::WebContents* web_contents,
bool is_fullscreen) { … }
void TabUsageScenarioTracker::OnMediaDestroyed(
content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnPrimaryMainFrameNavigationCommitted(
content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnVideoStartedPlaying(
content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnVideoStoppedPlaying(
content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnDisplayAdded(const display::Display&) { … }
void TabUsageScenarioTracker::OnDisplaysRemoved(const display::Displays&) { … }
int TabUsageScenarioTracker::GetNumDisplays() { … }
void TabUsageScenarioTracker::OnTabBecameHidden(
VisibleTabsMap::iterator* visible_tab_iter) { … }
void TabUsageScenarioTracker::OnWebContentsRemoved(
content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::InsertContentsInMapOfVisibleTabs(
content::WebContents* web_contents) { … }
void TabUsageScenarioTracker::OnNumDisplaysChanged() { … }
}