Fix build break
[chromium-blink-merge.git] / chrome / browser / speech / tts_extension_loader_chromeos.h
blob3757c054476a5526ed3bf518b81207830dd5eabf
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_
6 #define CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_
8 #include "chrome/browser/extensions/event_router.h"
9 #include "chrome/browser/profiles/profile_keyed_service.h"
11 // Profile-keyed class that loads a built-in TTS component extension
12 // into a given profile on Chrome OS.
13 class TtsExtensionLoaderChromeOs
14 : public ProfileKeyedService,
15 public extensions::EventRouter::Observer {
16 public:
17 static TtsExtensionLoaderChromeOs* GetInstance(Profile* profile);
19 // Returns true if the extension was not previously loaded and is now
20 // loading. This class will call
21 // ExtensionTtsController::RetrySpeakingQueuedUtterances when the
22 // extension finishes loading.
23 bool LoadTtsExtension();
25 // Implementation of extensions::EventRouter::Observer.
26 virtual void OnListenerAdded(const extensions::EventListenerInfo& details)
27 OVERRIDE;
29 private:
30 // The state of TTS for this profile.
31 enum TtsState {
32 TTS_NOT_LOADED,
33 TTS_LOAD_REQUESTED,
34 TTS_LOADING,
35 TTS_LOADED
38 explicit TtsExtensionLoaderChromeOs(Profile* profile);
39 virtual ~TtsExtensionLoaderChromeOs() {}
41 bool IsTtsLoadedInThisProfile();
43 Profile* profile_;
44 TtsState tts_state_;
46 friend class TtsExtensionLoaderChromeOsFactory;
48 DISALLOW_COPY_AND_ASSIGN(TtsExtensionLoaderChromeOs);
51 #endif // CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_