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

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

Issue 8201030: Introducing the basic functionality to the speech input experimental API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removing media code and dependencies. Addressed in a different patch. 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/extension_speech_input_api.h"
6
7 #include "base/values.h"
8 #include "chrome/browser/extensions/extension_speech_input_manager.h"
9 #include "chrome/browser/profiles/profile.h"
10
11 SpeechInputAsyncFunction::SpeechInputAsyncFunction() {
12 }
13
14 void SpeechInputAsyncFunction::Run() {
15
16 // TODO(leandrogracia): implement the management of the asynchronous
17 // operations involved and the corresponding state transitions.
18 RunImpl();
19
20 SendResponse(true);
21 }
22
23 void SpeechInputAsyncFunction::Observe(int type,
24 const NotificationSource& source,
25 const NotificationDetails& details) {
26 // TODO(leandrogracia): to be implemented.
27 }
28
29 bool StartSpeechInputFunction::RunImpl() {
30 ExtensionSpeechInputManager::GetForProfile(profile())->Start(GetExtension());
31 return true;
32 }
33
34 bool StopSpeechInputFunction::RunImpl() {
35 ExtensionSpeechInputManager::GetForProfile(profile())->Stop(GetExtension());
36 return true;
37 }
38
39 bool IsRecordingSpeechInputFunction::RunImpl() {
40 // TODO(leandrogracia): to be implemented.
41 result_.reset(Value::CreateBooleanValue(false));
42 return true;
43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698