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

Unified Diff: chrome/browser/speech/chrome_speech_recognition_manager_delegate.h

Issue 9972011: Speech refactoring: Reimplemented SpeechRecognitionManagerImpl as a FSM. (CL1.7) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed according to hans and jam review. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/speech/chrome_speech_recognition_manager_delegate.h
diff --git a/chrome/browser/speech/chrome_speech_recognition_manager_delegate.h b/chrome/browser/speech/chrome_speech_recognition_manager_delegate.h
index d209852f5cc759f55774d2b1c357faec171c6617..58eb723794843934aa3a2159a2a19eac1a069f0b 100644
--- a/chrome/browser/speech/chrome_speech_recognition_manager_delegate.h
+++ b/chrome/browser/speech/chrome_speech_recognition_manager_delegate.h
@@ -12,8 +12,8 @@
namespace speech {
-// This is Chrome's implementation of the SpeechRecognitionManager interface.
-// This class is a singleton and accessed via the Get method.
+// This is Chrome's implementation of the SpeechRecognitionManagerDelegate
+// interface.
class ChromeSpeechRecognitionManagerDelegate
: NON_EXPORTED_BASE(public content::SpeechRecognitionManagerDelegate),
public SpeechRecognitionBubbleControllerDelegate {
@@ -28,27 +28,33 @@ class ChromeSpeechRecognitionManagerDelegate
protected:
// SpeechRecognitionManagerDelegate methods.
- virtual void GetRequestInfo(bool* can_report_metrics,
- std::string* request_info) OVERRIDE;
- virtual void ShowRecognitionRequested(int session_id,
- int render_process_id,
- int render_view_id,
- const gfx::Rect& element_rect) OVERRIDE;
+ virtual void GetDiagnosticInformation(bool* can_report_metrics,
+ std::string* hardware_info) OVERRIDE;
+ virtual void CheckRecognitionIsAllowed(
+ int session_id,
+ base::Callback<void(int session_id, bool is_allowed)> callback) OVERRIDE;
+ virtual void ShowRecognitionRequested(int session_id) OVERRIDE;
virtual void ShowWarmUp(int session_id) OVERRIDE;
virtual void ShowRecognizing(int session_id) OVERRIDE;
virtual void ShowRecording(int session_id) OVERRIDE;
virtual void ShowInputVolume(int session_id,
float volume,
float noise_volume) OVERRIDE;
- virtual void ShowMicError(int session_id,
- MicError error) OVERRIDE;
- virtual void ShowRecognizerError(
- int session_id, content::SpeechRecognitionErrorCode error) OVERRIDE;
+ virtual void ShowError(int session_id,
+ const content::SpeechRecognitionError& error) OVERRIDE;
virtual void DoClose(int session_id) OVERRIDE;
private:
class OptionalRequestInfo;
+ // Checks for VIEW_TYPE_WEB_CONTENTS host in the UI thread and notifies back
+ // the result in the IO thread through |callback|.
+ static void CheckRenderViewType(
+ int session_id,
+ base::Callback<void(int session_id, bool is_allowed)> callback,
+ int render_process_id,
+ int render_view_id);
+
scoped_refptr<SpeechRecognitionBubbleController> bubble_controller_;
scoped_refptr<OptionalRequestInfo> optional_request_info_;
« no previous file with comments | « no previous file | chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698