#include "chrome/browser/device_notifications/device_status_icon_renderer.h"
#include "base/i18n/message_formatter.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/status_icons/status_tray.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "extensions/buildflags/buildflags.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/paint_vector_icon.h"
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "extensions/browser/extension_registry.h"
#include "extensions/common/constants.h"
#endif
namespace {
std::u16string GetProfileUserName(Profile* profile) { … }
std::u16string GetOriginConnectionCountLabel(Profile* profile,
const url::Origin& origin,
int connection_count,
const std::string& name) { … }
}
DeviceStatusIconRenderer::DeviceStatusIconRenderer(
DeviceSystemTrayIcon* device_system_tray_icon,
const chrome::HelpSource help_source,
const int about_device_message_id)
: … { … }
DeviceStatusIconRenderer::~DeviceStatusIconRenderer() { … }
std::u16string DeviceStatusIconRenderer::GetAboutDeviceLabel() { … }
void DeviceStatusIconRenderer::AddProfile(Profile* profile) { … }
void DeviceStatusIconRenderer::RemoveProfile(Profile* profile) { … }
void DeviceStatusIconRenderer::NotifyConnectionUpdated(Profile* profile) { … }
void DeviceStatusIconRenderer::ExecuteCommand(int command_id, int event_flags) { … }
void DeviceStatusIconRenderer::ShowHelpCenterUrl() { … }
void DeviceStatusIconRenderer::ShowContentSettings(
base::WeakPtr<Profile> profile) { … }
void DeviceStatusIconRenderer::ShowSiteSettings(base::WeakPtr<Profile> profile,
const url::Origin& origin) { … }
void DeviceStatusIconRenderer::RefreshIcon() { … }
void DeviceStatusIconRenderer::AddItem(StatusIconMenuModel* menu,
std::u16string label,
base::RepeatingClosure callback) { … }
void DeviceStatusIconRenderer::OnProfileNameChanged(
const base::FilePath& profile_path,
const std::u16string& old_profile_name) { … }