#ifndef ASH_AMBIENT_MODEL_AMBIENT_WEATHER_MODEL_H_
#define ASH_AMBIENT_MODEL_AMBIENT_WEATHER_MODEL_H_
#include "ash/ash_export.h"
#include "base/observer_list.h"
#include "ui/gfx/image/image_skia.h"
namespace ash {
class AmbientWeatherModelObserver;
class ASH_EXPORT AmbientWeatherModel {
public:
AmbientWeatherModel();
AmbientWeatherModel(const AmbientWeatherModel&) = delete;
AmbientWeatherModel& operator=(AmbientWeatherModel&) = delete;
~AmbientWeatherModel();
void AddObserver(AmbientWeatherModelObserver* observer);
void RemoveObserver(AmbientWeatherModelObserver* observer);
void UpdateWeatherInfo(const gfx::ImageSkia& weather_condition_icon,
float temperature_fahrenheit,
bool show_celsius);
bool IsIncomplete() const { return weather_condition_icon_.isNull(); }
const gfx::ImageSkia& weather_condition_icon() const {
return weather_condition_icon_;
}
float temperature_fahrenheit() const { return temperature_fahrenheit_; }
float GetTemperatureInCelsius() const;
bool show_celsius() const { return show_celsius_; }
private:
void NotifyWeatherInfoUpdated();
gfx::ImageSkia weather_condition_icon_;
float temperature_fahrenheit_ = 0.0f;
bool show_celsius_ = false;
base::ObserverList<AmbientWeatherModelObserver> observers_;
};
}
#endif