OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions/speech_input/extension_speech_input_api.h" | 5 #include "chrome/browser/extensions/speech_input/extension_speech_input_api.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/extensions/speech_input/extension_speech_input_api_cons
tants.h" | 9 #include "chrome/browser/extensions/speech_input/extension_speech_input_api_cons
tants.h" |
10 #include "chrome/browser/extensions/speech_input/extension_speech_input_manager.
h" | 10 #include "chrome/browser/extensions/speech_input/extension_speech_input_manager.
h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
| 13 #include "content/public/browser/notification_details.h" |
| 14 #include "content/public/browser/notification_source.h" |
13 | 15 |
14 namespace constants = extension_speech_input_api_constants; | 16 namespace constants = extension_speech_input_api_constants; |
15 | 17 |
16 SpeechInputAsyncFunction::SpeechInputAsyncFunction( | 18 SpeechInputAsyncFunction::SpeechInputAsyncFunction( |
17 int start_state, | 19 int start_state, |
18 int transition_state, | 20 int transition_state, |
19 int end_state, | 21 int end_state, |
20 int transition_notification) | 22 int transition_notification) |
21 : start_state_(start_state), | 23 : start_state_(start_state), |
22 transition_state_(transition_state), | 24 transition_state_(transition_state), |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 profile())->Stop(extension_id(), &error_); | 155 profile())->Stop(extension_id(), &error_); |
154 } | 156 } |
155 | 157 |
156 bool IsRecordingSpeechInputFunction::RunImpl() { | 158 bool IsRecordingSpeechInputFunction::RunImpl() { |
157 // Do not access the AudioManager directly here to ensure the proper | 159 // Do not access the AudioManager directly here to ensure the proper |
158 // IsRecording behaviour in the API tests. | 160 // IsRecording behaviour in the API tests. |
159 result_.reset(Value::CreateBooleanValue( | 161 result_.reset(Value::CreateBooleanValue( |
160 ExtensionSpeechInputManager::GetForProfile(profile())->IsRecording())); | 162 ExtensionSpeechInputManager::GetForProfile(profile())->IsRecording())); |
161 return true; | 163 return true; |
162 } | 164 } |
OLD | NEW |