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

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

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 nit and adding application locale as default language. 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SPEECH_INPUT_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SPEECH_INPUT_API_H_
7 #pragma once
8
9 #include "chrome/browser/extensions/extension_function.h"
10 #include "content/common/notification_service.h"
11
12 class ExtensionSpeechInputManager;
13
14 // Handles asynchronous operations such as starting or stopping speech
15 // recognition in the framework of the extension API state machine.
16 class SpeechInputAsyncFunction : public AsyncExtensionFunction,
17 public NotificationObserver {
18 protected:
19 SpeechInputAsyncFunction();
20
21 virtual void Run() OVERRIDE;
22 virtual bool RunImpl() = 0;
23
24 private:
25 // NotificationObserver.
26 virtual void Observe(int type,
27 const NotificationSource& source,
28 const NotificationDetails& details) OVERRIDE;
29
30 NotificationRegistrar registrar_;
31 };
32
33 // Implements experimental.speechInput.start.
34 class StartSpeechInputFunction : public SpeechInputAsyncFunction {
35 protected:
36 virtual bool RunImpl() OVERRIDE;
37 DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.start");
38 };
39
40 // Implements experimental.speechInput.stop.
41 class StopSpeechInputFunction : public SpeechInputAsyncFunction {
42 protected:
43 virtual bool RunImpl() OVERRIDE;
44 DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.stop");
45 };
46
47 // Implements experimental.speechInput.isRecording.
48 class IsRecordingSpeechInputFunction : public SyncIOThreadExtensionFunction {
49 protected:
50 virtual bool RunImpl() OVERRIDE;
51 DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.isRecording");
52 };
53
54 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SPEECH_INPUT_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698