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 #ifndef CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_API_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_API_H_ |
6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_API_H_ | 6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
11 | 11 |
12 class SpeechInputExtensionManager; | |
13 | |
14 // Handles asynchronous operations such as starting or stopping speech | 12 // Handles asynchronous operations such as starting or stopping speech |
15 // recognition in the framework of the extension API state machine. | 13 // recognition in the framework of the extension API state machine. |
16 class SpeechInputAsyncFunction : public AsyncExtensionFunction, | 14 class SpeechInputAsyncFunction : public AsyncExtensionFunction, |
17 public content::NotificationObserver { | 15 public content::NotificationObserver { |
18 protected: | 16 protected: |
19 SpeechInputAsyncFunction(int start_state, int transition_state, | 17 SpeechInputAsyncFunction(int start_state, int transition_state, |
20 int end_state, int transition_notification); | 18 int end_state, int transition_notification); |
21 virtual ~SpeechInputAsyncFunction(); | 19 virtual ~SpeechInputAsyncFunction(); |
22 | 20 |
23 virtual void Run() OVERRIDE; | 21 virtual void Run() OVERRIDE; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 }; | 61 }; |
64 | 62 |
65 // Implements experimental.speechInput.isRecording. | 63 // Implements experimental.speechInput.isRecording. |
66 class IsRecordingSpeechInputFunction : public SyncExtensionFunction { | 64 class IsRecordingSpeechInputFunction : public SyncExtensionFunction { |
67 protected: | 65 protected: |
68 virtual bool RunImpl() OVERRIDE; | 66 virtual bool RunImpl() OVERRIDE; |
69 DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.isRecording"); | 67 DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.isRecording"); |
70 }; | 68 }; |
71 | 69 |
72 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_API_H_ | 70 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_API_H_ |
OLD | NEW |