Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Side by Side Diff: chrome/browser/speech/tts_extension_loader_chromeos.h

Issue 149233004: Revert "Automatically trigger installation of high-quality speech synthesis extension." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Don't remove WillSpeakUtteranceWithVoice, it is dependent upon by a test now. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_
6 #define CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_
7
8 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
9 #include "extensions/browser/event_router.h"
10
11 class Profile;
12
13 // Profile-keyed class that loads a built-in TTS component extension
14 // into a given profile on Chrome OS.
15 class TtsExtensionLoaderChromeOs
16 : public BrowserContextKeyedService,
17 public extensions::EventRouter::Observer {
18 public:
19 static TtsExtensionLoaderChromeOs* GetInstance(Profile* profile);
20
21 // Returns true if the extension was not previously loaded and is now
22 // loading. This class will call
23 // ExtensionTtsController::RetrySpeakingQueuedUtterances when the
24 // extension finishes loading.
25 bool LoadTtsExtension();
26
27 // Implementation of BrowserContextKeyedService.
28 virtual void Shutdown() OVERRIDE;
29
30 // Implementation of extensions::EventRouter::Observer.
31 virtual void OnListenerAdded(const extensions::EventListenerInfo& details)
32 OVERRIDE;
33
34 private:
35 // The state of TTS for this profile.
36 enum TtsState {
37 TTS_NOT_LOADED,
38 TTS_LOAD_REQUESTED,
39 TTS_LOADING,
40 TTS_LOADED
41 };
42
43 explicit TtsExtensionLoaderChromeOs(Profile* profile);
44 virtual ~TtsExtensionLoaderChromeOs() {}
45
46 bool IsTtsLoadedInThisProfile();
47
48 Profile* profile_;
49 TtsState tts_state_;
50
51 friend class TtsExtensionLoaderChromeOsFactory;
52
53 DISALLOW_COPY_AND_ASSIGN(TtsExtensionLoaderChromeOs);
54 };
55
56 #endif // CHROME_BROWSER_SPEECH_TTS_EXTENSION_LOADER_CHROMEOS_H_
OLDNEW
« no previous file with comments | « chrome/browser/speech/tts_controller.cc ('k') | chrome/browser/speech/tts_extension_loader_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698