blob: 27a8476782d9fa88a13fd484e78ec337a4d67e98 [file] [log] [blame]
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_SHELF_SHELF_PARTY_FEATURE_POD_CONTROLLER_H_
#define ASH_SHELF_SHELF_PARTY_FEATURE_POD_CONTROLLER_H_
#include "ash/ash_export.h"
#include "ash/public/cpp/session/session_observer.h"
#include "ash/public/cpp/shelf_model_observer.h"
#include "ash/system/unified/feature_pod_controller_base.h"
namespace ash {
// Controller of a feature pod button that toggles shelf party mode.
class ASH_EXPORT ShelfPartyFeaturePodController
: public FeaturePodControllerBase,
public SessionObserver,
public ShelfModelObserver {
public:
ShelfPartyFeaturePodController();
ShelfPartyFeaturePodController(const ShelfPartyFeaturePodController&) =
delete;
ShelfPartyFeaturePodController& operator=(
const ShelfPartyFeaturePodController&) = delete;
~ShelfPartyFeaturePodController() override;
// FeaturePodControllerBase:
FeaturePodButton* CreateButton() override;
void OnIconPressed() override;
SystemTrayItemUmaType GetUmaType() const override;
// SessionObserver:
void OnSessionStateChanged(session_manager::SessionState state) override;
// ShelfModelObserver:
void ShelfPartyToggled(bool in_shelf_party) override;
private:
void UpdateButton();
FeaturePodButton* button_ = nullptr;
};
} // namespace ash
#endif // ASH_SHELF_SHELF_PARTY_FEATURE_POD_CONTROLLER_H_