OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include "chrome/browser/extensions/extension_function.h" | 8 #include "chrome/browser/extensions/extension_function.h" |
9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 private: | 68 private: |
69 virtual ~StopSpeechInputFunction() {} | 69 virtual ~StopSpeechInputFunction() {} |
70 }; | 70 }; |
71 | 71 |
72 // Implements experimental.speechInput.isRecording. | 72 // Implements experimental.speechInput.isRecording. |
73 class IsRecordingSpeechInputFunction : public SyncExtensionFunction { | 73 class IsRecordingSpeechInputFunction : public SyncExtensionFunction { |
74 public: | 74 public: |
75 DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.isRecording"); | 75 DECLARE_EXTENSION_FUNCTION_NAME("experimental.speechInput.isRecording"); |
76 | 76 |
77 // Called back from SpeechInputExtensionManager in the UI thread. | 77 // Called back from SpeechInputExtensionManager in the UI thread. |
78 void SetResult(bool result); | 78 void SetIsRecordingResult(bool result); |
79 | 79 |
80 protected: | 80 protected: |
81 // ExtensionFunction: | 81 // ExtensionFunction: |
82 virtual void Run() OVERRIDE; | 82 virtual void Run() OVERRIDE; |
83 virtual bool RunImpl() OVERRIDE; | 83 virtual bool RunImpl() OVERRIDE; |
84 | 84 |
85 private: | 85 private: |
86 virtual ~IsRecordingSpeechInputFunction() {} | 86 virtual ~IsRecordingSpeechInputFunction() {} |
87 }; | 87 }; |
88 | 88 |
89 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_API_H_ | 89 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_EXTENSION_API_H_ |
OLD | NEW |