#ifndef ASH_STYLE_ICON_SWITCH_H_
#define ASH_STYLE_ICON_SWITCH_H_
#include <string>
#include "ash/ash_export.h"
#include "ash/style/icon_button.h"
#include "ui/views/view.h"
namespace ash {
class ASH_EXPORT IconSwitch : public views::View, public IconButton::Delegate {
public:
METADATA_HEADER(IconSwitch);
IconSwitch();
IconSwitch(bool has_background,
const gfx::Insets& inside_border_insets,
int between_child_spacing);
IconSwitch(const IconSwitch&) = delete;
IconSwitch& operator=(const IconSwitch&) = delete;
~IconSwitch() override;
IconButton* AddButton(IconButton::PressedCallback callback,
const gfx::VectorIcon* icon,
const std::u16string& tooltip_text);
void ToggleButtonOnAtIndex(size_t index);
void AddedToWidget() override;
void OnThemeChanged() override;
void OnButtonToggled(IconButton* button) override;
void OnButtonClicked(IconButton* button) override;
private:
void OnEnableChanged();
SkColor GetBackgroundColor() const;
bool has_background_;
std::vector<IconButton*> buttons_;
base::CallbackListSubscription enabled_changed_subscription_;
};
}
#endif