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 #include "chrome/browser/speech/speech_input_extension_manager.h" | 5 #include "chrome/browser/speech/speech_input_extension_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 private: | 91 private: |
92 friend struct DefaultSingletonTraits<Factory>; | 92 friend struct DefaultSingletonTraits<Factory>; |
93 | 93 |
94 Factory(); | 94 Factory(); |
95 virtual ~Factory(); | 95 virtual ~Factory(); |
96 | 96 |
97 // ProfileKeyedServiceFactory methods: | 97 // ProfileKeyedServiceFactory methods: |
98 virtual ProfileKeyedService* BuildServiceInstanceFor( | 98 virtual ProfileKeyedService* BuildServiceInstanceFor( |
99 Profile* profile) const OVERRIDE; | 99 Profile* profile) const OVERRIDE; |
100 virtual bool ServiceRedirectedInIncognito() OVERRIDE { return false; } | 100 virtual bool ServiceRedirectedInIncognito() const OVERRIDE { return false; } |
101 virtual bool ServiceIsNULLWhileTesting() OVERRIDE { return true; } | 101 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE { return true; } |
102 virtual bool ServiceIsCreatedWithProfile() OVERRIDE { return true; } | 102 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE { return true; } |
103 | 103 |
104 DISALLOW_COPY_AND_ASSIGN(Factory); | 104 DISALLOW_COPY_AND_ASSIGN(Factory); |
105 }; | 105 }; |
106 | 106 |
107 void SpeechInputExtensionManager::Factory::Initialize() { | 107 void SpeechInputExtensionManager::Factory::Initialize() { |
108 GetInstance(); | 108 GetInstance(); |
109 } | 109 } |
110 | 110 |
111 SpeechInputExtensionManager::Factory* | 111 SpeechInputExtensionManager::Factory* |
112 SpeechInputExtensionManager::Factory::GetInstance() { | 112 SpeechInputExtensionManager::Factory::GetInstance() { |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 content::NotificationService::current()->Notify( | 750 content::NotificationService::current()->Notify( |
751 chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STOPPED, | 751 chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STOPPED, |
752 // Guarded by the state_ == kShutdown check. | 752 // Guarded by the state_ == kShutdown check. |
753 content::Source<Profile>(profile_), | 753 content::Source<Profile>(profile_), |
754 content::Details<std::string>(&extension_id)); | 754 content::Details<std::string>(&extension_id)); |
755 } | 755 } |
756 | 756 |
757 void SpeechInputExtensionManager::OnAudioLevelsChange(int session_id, | 757 void SpeechInputExtensionManager::OnAudioLevelsChange(int session_id, |
758 float volume, | 758 float volume, |
759 float noise_volume) {} | 759 float noise_volume) {} |
OLD | NEW |