| 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_CHROME_SPEECH_INPUT_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_CHROME_SPEECH_INPUT_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_INPUT_MANAGER_H_ | 6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_INPUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "chrome/browser/speech/speech_input_bubble_controller.h" | 10 #include "chrome/browser/speech/speech_input_bubble_controller.h" |
| 11 #include "content/browser/speech/speech_input_manager.h" | 11 #include "content/browser/speech/speech_input_manager.h" |
| 12 | 12 |
| 13 namespace speech_input { | 13 namespace speech_input { |
| 14 | 14 |
| 15 // This is Chrome's implementation of the SpeechInputManager interface. This | 15 // This is Chrome's implementation of the SpeechInputManager interface. This |
| 16 // class is a singleton and accessed via the Get method. | 16 // class is a singleton and accessed via the Get method. |
| 17 class ChromeSpeechInputManager : public SpeechInputManager, | 17 class ChromeSpeechInputManager : public SpeechInputManager, |
| 18 public SpeechInputBubbleControllerDelegate { | 18 public SpeechInputBubbleControllerDelegate { |
| 19 public: | 19 public: |
| 20 static ChromeSpeechInputManager* GetInstance(); | 20 static ChromeSpeechInputManager* GetInstance(); |
| 21 | 21 |
| 22 // SpeechInputBubbleController::Delegate methods. | 22 // SpeechInputBubbleController::Delegate methods. |
| 23 virtual void InfoBubbleButtonClicked(int caller_id, | 23 virtual void InfoBubbleButtonClicked(int caller_id, |
| 24 SpeechInputBubble::Button button) | 24 SpeechInputBubble::Button button) |
| 25 OVERRIDE; | 25 OVERRIDE; |
| 26 virtual void InfoBubbleFocusChanged(int caller_id) OVERRIDE; | 26 virtual void InfoBubbleFocusChanged(int caller_id) OVERRIDE; |
| 27 | 27 |
| 28 protected: | 28 protected: |
| 29 // SpeechInputManager methods. | 29 // SpeechInputManager methods. |
| 30 virtual void GetRequestInfo(bool* can_report_metrics, | 30 virtual void GetRequestInfo(AudioManager* audio_manager, |
| 31 bool* can_report_metrics, |
| 31 std::string* request_info) OVERRIDE; | 32 std::string* request_info) OVERRIDE; |
| 32 virtual void ShowRecognitionRequested(int caller_id, | 33 virtual void ShowRecognitionRequested(int caller_id, |
| 33 int render_process_id, | 34 int render_process_id, |
| 34 int render_view_id, | 35 int render_view_id, |
| 35 const gfx::Rect& element_rect) OVERRIDE; | 36 const gfx::Rect& element_rect) OVERRIDE; |
| 36 virtual void ShowWarmUp(int caller_id) OVERRIDE; | 37 virtual void ShowWarmUp(int caller_id) OVERRIDE; |
| 37 virtual void ShowRecognizing(int caller_id) OVERRIDE; | 38 virtual void ShowRecognizing(int caller_id) OVERRIDE; |
| 38 virtual void ShowRecording(int caller_id) OVERRIDE; | 39 virtual void ShowRecording(int caller_id) OVERRIDE; |
| 39 virtual void ShowInputVolume(int caller_id, | 40 virtual void ShowInputVolume(int caller_id, |
| 40 float volume, | 41 float volume, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 55 | 56 |
| 56 scoped_refptr<SpeechInputBubbleController> bubble_controller_; | 57 scoped_refptr<SpeechInputBubbleController> bubble_controller_; |
| 57 scoped_refptr<OptionalRequestInfo> optional_request_info_; | 58 scoped_refptr<OptionalRequestInfo> optional_request_info_; |
| 58 | 59 |
| 59 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechInputManager); | 60 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechInputManager); |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace speech_input | 63 } // namespace speech_input |
| 63 | 64 |
| 64 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_INPUT_MANAGER_H_ | 65 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_INPUT_MANAGER_H_ |
| OLD | NEW |