#include "chrome/browser/ui/views/side_panel/side_panel_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "base/strings/strcat.h"
#include "base/time/time.h"
#include "chrome/browser/companion/core/features.h"
#include "chrome/browser/history_clusters/history_clusters_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window/public/browser_window_features.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/side_panel/bookmarks/bookmarks_side_panel_coordinator.h"
#include "chrome/browser/ui/views/side_panel/companion/companion_utils.h"
#include "chrome/browser/ui/views/side_panel/history_clusters/history_clusters_side_panel_coordinator.h"
#include "chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator.h"
#include "chrome/browser/ui/views/side_panel/reading_list/reading_list_side_panel_coordinator.h"
#include "chrome/browser/ui/views/side_panel/search_companion/search_companion_side_panel_coordinator.h"
#include "chrome/browser/ui/views/side_panel/side_panel_content_proxy.h"
#include "chrome/browser/ui/views/side_panel/side_panel_coordinator.h"
#include "chrome/browser/ui/views/side_panel/side_panel_registry.h"
#include "chrome/browser/ui/views/side_panel/side_panel_ui.h"
#include "components/history_clusters/core/features.h"
#include "components/history_clusters/core/history_clusters_service.h"
#include "components/prefs/pref_service.h"
#include "components/user_notes/user_notes_features.h"
#include "ui/accessibility/accessibility_features.h"
#include "ui/actions/actions.h"
#include "chrome/browser/ui/views/side_panel/extensions/extension_side_panel_manager.h"
#include "extensions/common/extension_features.h"
DEFINE_UI_CLASS_PROPERTY_TYPE(…)
DEFINE_UI_CLASS_PROPERTY_KEY(…)
void SidePanelUtil::PopulateGlobalEntries(Browser* browser,
SidePanelRegistry* window_registry) { … }
SidePanelContentProxy* SidePanelUtil::GetSidePanelContentProxy(
views::View* content_view) { … }
std::unique_ptr<views::View> SidePanelUtil::DeregisterAndReturnView(
SidePanelRegistry* registry,
SidePanelEntry::Key key) { … }
void SidePanelUtil::RecordSidePanelOpen(
std::optional<SidePanelUtil::SidePanelOpenTrigger> trigger) { … }
void SidePanelUtil::RecordSidePanelShowOrChangeEntryTrigger(
std::optional<SidePanelUtil::SidePanelOpenTrigger> trigger) { … }
void SidePanelUtil::RecordSidePanelClosed(base::TimeTicks opened_timestamp) { … }
void SidePanelUtil::RecordSidePanelResizeMetrics(SidePanelEntry::Id id,
int side_panel_contents_width,
int browser_window_width) { … }
void SidePanelUtil::RecordNewTabButtonClicked(SidePanelEntry::Id id) { … }
void SidePanelUtil::RecordEntryShownMetrics(
SidePanelEntry::Id id,
base::TimeTicks load_started_timestamp) { … }
void SidePanelUtil::RecordEntryHiddenMetrics(SidePanelEntry::Id id,
base::TimeTicks shown_timestamp) { … }
void SidePanelUtil::RecordEntryShowTriggeredMetrics(
Browser* browser,
SidePanelEntry::Id id,
std::optional<SidePanelUtil::SidePanelOpenTrigger> trigger) { … }
void SidePanelUtil::RecordComboboxShown() { … }
void SidePanelUtil::RecordPinnedButtonClicked(SidePanelEntry::Id id,
bool is_pinned) { … }
void SidePanelUtil::RecordSidePanelAnimationMetrics(
base::TimeDelta largest_step_time) { … }