#include "chrome/browser/performance_manager/decorators/helpers/page_live_state_decorator_helper.h"
#include "base/memory/raw_ptr.h"
#include "base/scoped_observation.h"
#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
#include "components/performance_manager/public/decorators/page_live_state_decorator.h"
#include "components/performance_manager/public/performance_manager.h"
#include "components/permissions/permissions_client.h"
#include "content/public/browser/web_contents_observer.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
#endif
namespace performance_manager {
namespace {
#if !BUILDFLAG(IS_ANDROID)
class ActiveTabObserver : public TabStripModelObserver,
public BrowserListObserver { … };
#endif
}
class PageLiveStateDecoratorHelper::WebContentsObserver
: public content::WebContentsObserver { … };
PageLiveStateDecoratorHelper::PageLiveStateDecoratorHelper() { … }
PageLiveStateDecoratorHelper::~PageLiveStateDecoratorHelper() { … }
void PageLiveStateDecoratorHelper::OnIsCapturingVideoChanged(
content::WebContents* contents,
bool is_capturing_video) { … }
void PageLiveStateDecoratorHelper::OnIsCapturingAudioChanged(
content::WebContents* contents,
bool is_capturing_audio) { … }
void PageLiveStateDecoratorHelper::OnIsBeingMirroredChanged(
content::WebContents* contents,
bool is_being_mirrored) { … }
void PageLiveStateDecoratorHelper::OnIsCapturingWindowChanged(
content::WebContents* contents,
bool is_capturing_window) { … }
void PageLiveStateDecoratorHelper::OnIsCapturingDisplayChanged(
content::WebContents* contents,
bool is_capturing_display) { … }
void PageLiveStateDecoratorHelper::DevToolsAgentHostAttached(
content::DevToolsAgentHost* agent_host) { … }
void PageLiveStateDecoratorHelper::DevToolsAgentHostDetached(
content::DevToolsAgentHost* agent_host) { … }
void PageLiveStateDecoratorHelper::OnPageNodeCreatedForWebContents(
content::WebContents* web_contents) { … }
}