#include "chrome/browser/ui/views/profiles/profile_customization_bubble_sync_controller.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/toolbar_button_provider.h"
#include "chrome/browser/ui/views/profiles/avatar_toolbar_button.h"
#include "chrome/browser/ui/views/profiles/profile_customization_bubble_view.h"
#include "components/sync/service/sync_user_settings.h"
#include "ui/base/mojom/themes.mojom.h"
namespace {
const void* const kBrowserUserDataKey = …;
void ShowBubble(Browser* browser,
views::View* anchor_view,
ProfileCustomizationBubbleSyncController::Outcome outcome) { … }
ProfileCustomizationBubbleSyncController* GetCurrentControllerIfExists(
Browser* browser) { … }
}
void ProfileCustomizationBubbleSyncController::
ApplyColorAndShowBubbleWhenNoValueSynced(Browser* browser,
views::View* anchor_view,
SkColor suggested_profile_color) { … }
void ProfileCustomizationBubbleSyncController::
ApplyColorAndShowBubbleWhenNoValueSyncedForTesting(
Browser* browser,
views::View* anchor_view,
syncer::SyncService* sync_service,
ThemeService* theme_service,
ShowBubbleCallback show_bubble_callback,
SkColor suggested_profile_color) { … }
bool ProfileCustomizationBubbleSyncController::CanThemeSyncStart(
Profile* profile) { … }
void ProfileCustomizationBubbleSyncController::SetCurrentControllerAndInit(
std::unique_ptr<ProfileCustomizationBubbleSyncController> controller) { … }
ProfileCustomizationBubbleSyncController::
ProfileCustomizationBubbleSyncController(
Browser* browser,
views::View* anchor_view,
syncer::SyncService* sync_service,
ThemeService* theme_service,
ShowBubbleCallback show_bubble_callback,
SkColor suggested_profile_color)
: … { … }
ProfileCustomizationBubbleSyncController::
~ProfileCustomizationBubbleSyncController() { … }
void ProfileCustomizationBubbleSyncController::Init() { … }
void ProfileCustomizationBubbleSyncController::OnSyncedThemeReady(
ProfileCustomizationSyncedThemeWaiter::Outcome outcome) { … }
void ProfileCustomizationBubbleSyncController::OnViewIsDeleting(
views::View* observed_view) { … }
void ProfileCustomizationBubbleSyncController::
ApplyDefaultColorAndShowBubble() { … }
void ProfileCustomizationBubbleSyncController::InvokeCallbackAndDeleteItself(
Outcome outcome) { … }
void ApplyProfileColorAndShowCustomizationBubbleWhenNoValueSynced(
Browser* browser,
SkColor suggested_profile_color) { … }
bool IsProfileCustomizationBubbleSyncControllerRunning(Browser* browser) { … }