#include "chrome/browser/ui/webui/media/media_engagement_ui.h"
#include <memory>
#include <utility>
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/media/media_engagement_score.h"
#include "chrome/browser/media/media_engagement_score_details.mojom.h"
#include "chrome/browser/media/media_engagement_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/media_resources.h"
#include "components/component_updater/component_updater_service.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/browser/web_ui_data_source.h"
#include "media/base/media_switches.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "third_party/blink/public/mojom/webpreferences/web_preferences.mojom.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#endif
namespace {
namespace {
const char kPreloadComponentID[] = …;
}
class MediaEngagementScoreDetailsProviderImpl
: public media::mojom::MediaEngagementScoreDetailsProvider { … };
}
MediaEngagementUI::MediaEngagementUI(content::WebUI* web_ui)
: … { … }
WEB_UI_CONTROLLER_TYPE_IMPL(MediaEngagementUI)
MediaEngagementUI::~MediaEngagementUI() = default;
void MediaEngagementUI::BindInterface(
mojo::PendingReceiver<media::mojom::MediaEngagementScoreDetailsProvider>
receiver) { … }