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

Side by Side Diff: chrome/browser/extensions/speech_input/extension_speech_input_api.cc

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 (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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698