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

Side by Side Diff: chrome/browser/speech/extension_api/tts_engine_extension_observer.h

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Enum class Created 3 years, 7 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EXTENSION_API_TTS_ENGINE_EXTENSION_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_OBSERVER_H_
6 #define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_OBSERVER_H_ 6 #define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_OBSERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/scoped_observer.h" 9 #include "base/scoped_observer.h"
10 #include "components/keyed_service/core/keyed_service.h" 10 #include "components/keyed_service/core/keyed_service.h"
(...skipping 16 matching lines...) Expand all
27 // as loaded immediately if |update| is set to true. 27 // as loaded immediately if |update| is set to true.
28 bool SawExtensionLoad(const std::string& extension_id, bool update); 28 bool SawExtensionLoad(const std::string& extension_id, bool update);
29 29
30 // Implementation of KeyedService. 30 // Implementation of KeyedService.
31 void Shutdown() override; 31 void Shutdown() override;
32 32
33 // Implementation of extensions::EventRouter::Observer. 33 // Implementation of extensions::EventRouter::Observer.
34 void OnListenerAdded(const extensions::EventListenerInfo& details) override; 34 void OnListenerAdded(const extensions::EventListenerInfo& details) override;
35 35
36 // extensions::ExtensionRegistryObserver overrides. 36 // extensions::ExtensionRegistryObserver overrides.
37 void OnExtensionUnloaded( 37 void OnExtensionUnloaded(content::BrowserContext* browser_context,
38 content::BrowserContext* browser_context, 38 const extensions::Extension* extension,
39 const extensions::Extension* extension, 39 extensions::UnloadedExtensionReason reason) override;
40 extensions::UnloadedExtensionInfo::Reason reason) override;
41 40
42 private: 41 private:
43 explicit TtsEngineExtensionObserver(Profile* profile); 42 explicit TtsEngineExtensionObserver(Profile* profile);
44 ~TtsEngineExtensionObserver() override; 43 ~TtsEngineExtensionObserver() override;
45 44
46 bool IsLoadedTtsEngine(const std::string& extension_id); 45 bool IsLoadedTtsEngine(const std::string& extension_id);
47 46
48 ScopedObserver<extensions::ExtensionRegistry, 47 ScopedObserver<extensions::ExtensionRegistry,
49 extensions::ExtensionRegistryObserver> 48 extensions::ExtensionRegistryObserver>
50 extension_registry_observer_; 49 extension_registry_observer_;
51 50
52 Profile* profile_; 51 Profile* profile_;
53 52
54 std::set<std::string> engine_extension_ids_; 53 std::set<std::string> engine_extension_ids_;
55 54
56 friend class TtsEngineExtensionObserverFactory; 55 friend class TtsEngineExtensionObserverFactory;
57 56
58 DISALLOW_COPY_AND_ASSIGN(TtsEngineExtensionObserver); 57 DISALLOW_COPY_AND_ASSIGN(TtsEngineExtensionObserver);
59 }; 58 };
60 59
61 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_OBSERVER_H_ 60 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698