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_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 virtual void ShowInputVolume(int session_id, | 41 virtual void ShowInputVolume(int session_id, |
42 float volume, | 42 float volume, |
43 float noise_volume) OVERRIDE; | 43 float noise_volume) OVERRIDE; |
44 virtual void ShowError(int session_id, | 44 virtual void ShowError(int session_id, |
45 const content::SpeechRecognitionError& error) OVERRIDE; | 45 const content::SpeechRecognitionError& error) OVERRIDE; |
46 virtual void DoClose(int session_id) OVERRIDE; | 46 virtual void DoClose(int session_id) OVERRIDE; |
47 | 47 |
48 private: | 48 private: |
49 class OptionalRequestInfo; | 49 class OptionalRequestInfo; |
50 | 50 |
51 // Checks for VIEW_TYPE_WEB_CONTENTS host in the UI thread and notifies back | 51 // Checks for VIEW_TYPE_TAB_CONTENTS host in the UI thread and notifies back |
52 // the result in the IO thread through |callback|. | 52 // the result in the IO thread through |callback|. |
53 static void CheckRenderViewType( | 53 static void CheckRenderViewType( |
54 int session_id, | 54 int session_id, |
55 base::Callback<void(int session_id, bool is_allowed)> callback, | 55 base::Callback<void(int session_id, bool is_allowed)> callback, |
56 int render_process_id, | 56 int render_process_id, |
57 int render_view_id); | 57 int render_view_id); |
58 | 58 |
59 scoped_refptr<SpeechRecognitionBubbleController> bubble_controller_; | 59 scoped_refptr<SpeechRecognitionBubbleController> bubble_controller_; |
60 scoped_refptr<OptionalRequestInfo> optional_request_info_; | 60 scoped_refptr<OptionalRequestInfo> optional_request_info_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate); | 62 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace speech | 65 } // namespace speech |
66 | 66 |
67 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ | 67 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ |
OLD | NEW |