#ifndef CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_
#define CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_
#include "components/keyed_service/core/keyed_service.h"
#include "extensions/browser/event_router.h"
class Profile;
class TtsExtensionLoaderChromeOs : public KeyedService,
public extensions::EventRouter::Observer {
public:
static TtsExtensionLoaderChromeOs* GetInstance(Profile* profile);
bool LoadTtsExtension();
virtual void Shutdown() OVERRIDE;
virtual void OnListenerAdded(const extensions::EventListenerInfo& details)
OVERRIDE;
private:
enum TtsState {
TTS_NOT_LOADED,
TTS_LOAD_REQUESTED,
TTS_LOADING,
TTS_LOADED
};
explicit TtsExtensionLoaderChromeOs(Profile* profile);
virtual ~TtsExtensionLoaderChromeOs() {}
bool IsTtsLoadedInThisProfile();
Profile* profile_;
TtsState tts_state_;
friend class TtsExtensionLoaderChromeOsFactory;
DISALLOW_COPY_AND_ASSIGN(TtsExtensionLoaderChromeOs);
};
#endif