| 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_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_INPUT_BUBBLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_BUBBLE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // Displays the given string with the 'Try again' and 'Cancel' buttons. If the | 73 // Displays the given string with the 'Try again' and 'Cancel' buttons. If the |
| 74 // bubble is hidden, |Show| must be called to make it appear on screen. | 74 // bubble is hidden, |Show| must be called to make it appear on screen. |
| 75 void SetBubbleMessage(int caller_id, const string16& text); | 75 void SetBubbleMessage(int caller_id, const string16& text); |
| 76 | 76 |
| 77 // Updates the current captured audio volume displayed on screen. | 77 // Updates the current captured audio volume displayed on screen. |
| 78 void SetBubbleInputVolume(int caller_id, float volume, float noise_volume); | 78 void SetBubbleInputVolume(int caller_id, float volume, float noise_volume); |
| 79 | 79 |
| 80 void CloseBubble(int caller_id); | 80 void CloseBubble(int caller_id); |
| 81 | 81 |
| 82 // SpeechInputBubble::Delegate methods. | 82 // SpeechInputBubble::Delegate methods. |
| 83 virtual void InfoBubbleButtonClicked(SpeechInputBubble::Button button); | 83 virtual void InfoBubbleButtonClicked( |
| 84 virtual void InfoBubbleFocusChanged(); | 84 SpeechInputBubble::Button button) OVERRIDE; |
| 85 virtual void InfoBubbleFocusChanged() OVERRIDE; |
| 85 | 86 |
| 86 // content::NotificationObserver implementation. | 87 // content::NotificationObserver implementation. |
| 87 virtual void Observe(int type, | 88 virtual void Observe(int type, |
| 88 const content::NotificationSource& source, | 89 const content::NotificationSource& source, |
| 89 const content::NotificationDetails& details); | 90 const content::NotificationDetails& details) OVERRIDE; |
| 90 | 91 |
| 91 private: | 92 private: |
| 92 // The various calls received by this object and handled in the UI thread. | 93 // The various calls received by this object and handled in the UI thread. |
| 93 enum RequestType { | 94 enum RequestType { |
| 94 REQUEST_SET_WARM_UP_MODE, | 95 REQUEST_SET_WARM_UP_MODE, |
| 95 REQUEST_SET_RECORDING_MODE, | 96 REQUEST_SET_RECORDING_MODE, |
| 96 REQUEST_SET_RECOGNIZING_MODE, | 97 REQUEST_SET_RECOGNIZING_MODE, |
| 97 REQUEST_SET_MESSAGE, | 98 REQUEST_SET_MESSAGE, |
| 98 REQUEST_SET_INPUT_VOLUME, | 99 REQUEST_SET_INPUT_VOLUME, |
| 99 REQUEST_CLOSE, | 100 REQUEST_CLOSE, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // This typedef is to workaround the issue with certain versions of | 142 // This typedef is to workaround the issue with certain versions of |
| 142 // Visual Studio where it gets confused between multiple Delegate | 143 // Visual Studio where it gets confused between multiple Delegate |
| 143 // classes and gives a C2500 error. (I saw this error on the try bots - | 144 // classes and gives a C2500 error. (I saw this error on the try bots - |
| 144 // the workaround was not needed for my machine). | 145 // the workaround was not needed for my machine). |
| 145 typedef SpeechInputBubbleController::Delegate | 146 typedef SpeechInputBubbleController::Delegate |
| 146 SpeechInputBubbleControllerDelegate; | 147 SpeechInputBubbleControllerDelegate; |
| 147 | 148 |
| 148 } // namespace speech_input | 149 } // namespace speech_input |
| 149 | 150 |
| 150 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_BUBBLE_CONTROLLER_H_ | 151 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_BUBBLE_CONTROLLER_H_ |
| OLD | NEW |