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

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

Issue 454583002: Cleanup: Remove unneeded #includes for grit/, ui/base/l10n/l10n_util.h and ui/base/resource/resourc… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Cros some more Created 6 years, 4 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 | Annotate | Revision Log
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 #include "chrome/browser/speech/extension_api/tts_engine_extension_observer.h" 5 #include "chrome/browser/speech/extension_api/tts_engine_extension_observer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_system_factory.h" 10 #include "chrome/browser/extensions/extension_system_factory.h"
11 #include "chrome/browser/profiles/incognito_helpers.h" 11 #include "chrome/browser/profiles/incognito_helpers.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" 13 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h"
14 #include "chrome/browser/speech/tts_controller.h" 14 #include "chrome/browser/speech/tts_controller.h"
15 #include "components/keyed_service/content/browser_context_dependency_manager.h" 15 #include "components/keyed_service/content/browser_context_dependency_manager.h"
16 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 16 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
17 #include "components/keyed_service/core/keyed_service.h" 17 #include "components/keyed_service/core/keyed_service.h"
18 #include "extensions/browser/event_router.h" 18 #include "extensions/browser/event_router.h"
19 #include "extensions/browser/extension_system.h" 19 #include "extensions/browser/extension_system.h"
20 #include "grit/browser_resources.h"
21 20
22 // Factory to load one instance of TtsExtensionLoaderChromeOs per profile. 21 // Factory to load one instance of TtsExtensionLoaderChromeOs per profile.
23 class TtsEngineExtensionObserverFactory 22 class TtsEngineExtensionObserverFactory
24 : public BrowserContextKeyedServiceFactory { 23 : public BrowserContextKeyedServiceFactory {
25 public: 24 public:
26 static TtsEngineExtensionObserver* GetForProfile(Profile* profile) { 25 static TtsEngineExtensionObserver* GetForProfile(Profile* profile) {
27 return static_cast<TtsEngineExtensionObserver*>( 26 return static_cast<TtsEngineExtensionObserver*>(
28 GetInstance()->GetServiceForBrowserContext(profile, true)); 27 GetInstance()->GetServiceForBrowserContext(profile, true));
29 } 28 }
30 29
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void TtsEngineExtensionObserver::OnExtensionUnloaded( 124 void TtsEngineExtensionObserver::OnExtensionUnloaded(
126 content::BrowserContext* browser_context, 125 content::BrowserContext* browser_context,
127 const extensions::Extension* extension, 126 const extensions::Extension* extension,
128 extensions::UnloadedExtensionInfo::Reason reason) { 127 extensions::UnloadedExtensionInfo::Reason reason) {
129 if (engine_extension_ids_.find(extension->id()) != 128 if (engine_extension_ids_.find(extension->id()) !=
130 engine_extension_ids_.end()) { 129 engine_extension_ids_.end()) {
131 engine_extension_ids_.erase(extension->id()); 130 engine_extension_ids_.erase(extension->id());
132 TtsController::GetInstance()->VoicesChanged(); 131 TtsController::GetInstance()->VoicesChanged();
133 } 132 }
134 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_promo.cc ('k') | chrome/browser/status_icons/status_icon_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698