| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/event_router.h" | 8 #include "chrome/browser/extensions/event_router.h" |
| 9 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 9 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" |
| 10 | 10 |
| 11 // Profile-keyed class that loads a built-in TTS component extension | 11 // Profile-keyed class that loads a built-in TTS component extension |
| 12 // into a given profile on Chrome OS. | 12 // into a given profile on Chrome OS. |
| 13 class TtsExtensionLoaderChromeOs | 13 class TtsExtensionLoaderChromeOs |
| 14 : public ProfileKeyedService, | 14 : public BrowserContextKeyedService, |
| 15 public extensions::EventRouter::Observer { | 15 public extensions::EventRouter::Observer { |
| 16 public: | 16 public: |
| 17 static TtsExtensionLoaderChromeOs* GetInstance(Profile* profile); | 17 static TtsExtensionLoaderChromeOs* GetInstance(Profile* profile); |
| 18 | 18 |
| 19 // Returns true if the extension was not previously loaded and is now | 19 // Returns true if the extension was not previously loaded and is now |
| 20 // loading. This class will call | 20 // loading. This class will call |
| 21 // ExtensionTtsController::RetrySpeakingQueuedUtterances when the | 21 // ExtensionTtsController::RetrySpeakingQueuedUtterances when the |
| 22 // extension finishes loading. | 22 // extension finishes loading. |
| 23 bool LoadTtsExtension(); | 23 bool LoadTtsExtension(); |
| 24 | 24 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 42 | 42 |
| 43 Profile* profile_; | 43 Profile* profile_; |
| 44 TtsState tts_state_; | 44 TtsState tts_state_; |
| 45 | 45 |
| 46 friend class TtsExtensionLoaderChromeOsFactory; | 46 friend class TtsExtensionLoaderChromeOsFactory; |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(TtsExtensionLoaderChromeOs); | 48 DISALLOW_COPY_AND_ASSIGN(TtsExtensionLoaderChromeOs); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 #endif // CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_ | 51 #endif // CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_ |
| OLD | NEW |