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

Side by Side Diff: chrome/browser/speech/speech_input_bubble_controller.h

Issue 6597071: Add a noise indicator to the speech bubble volume indicator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed all review comments. Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // Indicates to the user that recognition is in progress. If the bubble is 62 // Indicates to the user that recognition is in progress. If the bubble is
63 // hidden, |Show| must be called to make it appear on screen. 63 // hidden, |Show| must be called to make it appear on screen.
64 void SetBubbleRecognizingMode(int caller_id); 64 void SetBubbleRecognizingMode(int caller_id);
65 65
66 // Displays the given string with the 'Try again' and 'Cancel' buttons. If the 66 // Displays the given string with the 'Try again' and 'Cancel' buttons. If the
67 // bubble is hidden, |Show| must be called to make it appear on screen. 67 // bubble is hidden, |Show| must be called to make it appear on screen.
68 void SetBubbleMessage(int caller_id, const string16& text); 68 void SetBubbleMessage(int caller_id, const string16& text);
69 69
70 // Updates the current captured audio volume displayed on screen. 70 // Updates the current captured audio volume displayed on screen.
71 void SetBubbleInputVolume(int caller_id, float volume); 71 void SetBubbleInputVolume(int caller_id, float volume, float noise_volume);
72 72
73 void CloseBubble(int caller_id); 73 void CloseBubble(int caller_id);
74 74
75 // SpeechInputBubble::Delegate methods. 75 // SpeechInputBubble::Delegate methods.
76 virtual void InfoBubbleButtonClicked(SpeechInputBubble::Button button); 76 virtual void InfoBubbleButtonClicked(SpeechInputBubble::Button button);
77 virtual void InfoBubbleFocusChanged(); 77 virtual void InfoBubbleFocusChanged();
78 78
79 // NotificationObserver implementation. 79 // NotificationObserver implementation.
80 virtual void Observe(NotificationType type, 80 virtual void Observe(NotificationType type,
81 const NotificationSource& source, 81 const NotificationSource& source,
(...skipping 13 matching lines...) Expand all
95 BUBBLE_ADDED, 95 BUBBLE_ADDED,
96 BUBBLE_REMOVED 96 BUBBLE_REMOVED
97 }; 97 };
98 98
99 void InvokeDelegateButtonClicked(int caller_id, 99 void InvokeDelegateButtonClicked(int caller_id,
100 SpeechInputBubble::Button button); 100 SpeechInputBubble::Button button);
101 void InvokeDelegateFocusChanged(int caller_id); 101 void InvokeDelegateFocusChanged(int caller_id);
102 void ProcessRequestInUiThread(int caller_id, 102 void ProcessRequestInUiThread(int caller_id,
103 RequestType type, 103 RequestType type,
104 const string16& text, 104 const string16& text,
105 float volume); 105 float volume,
106 float noise_volume);
106 107
107 // Called whenever a bubble was added to or removed from the list. If the 108 // Called whenever a bubble was added to or removed from the list. If the
108 // bubble was being added, this method registers for close notifications with 109 // bubble was being added, this method registers for close notifications with
109 // the TabContents if this was the first bubble for the tab. Similarly if the 110 // the TabContents if this was the first bubble for the tab. Similarly if the
110 // bubble was being removed, this method unregisters from TabContents if this 111 // bubble was being removed, this method unregisters from TabContents if this
111 // was the last bubble associated with that tab. 112 // was the last bubble associated with that tab.
112 void UpdateTabContentsSubscription(int caller_id, 113 void UpdateTabContentsSubscription(int caller_id,
113 ManageSubscriptionAction action); 114 ManageSubscriptionAction action);
114 115
115 // Only accessed in the IO thread. 116 // Only accessed in the IO thread.
(...skipping 16 matching lines...) Expand all
132 // This typedef is to workaround the issue with certain versions of 133 // This typedef is to workaround the issue with certain versions of
133 // Visual Studio where it gets confused between multiple Delegate 134 // Visual Studio where it gets confused between multiple Delegate
134 // classes and gives a C2500 error. (I saw this error on the try bots - 135 // classes and gives a C2500 error. (I saw this error on the try bots -
135 // the workaround was not needed for my machine). 136 // the workaround was not needed for my machine).
136 typedef SpeechInputBubbleController::Delegate 137 typedef SpeechInputBubbleController::Delegate
137 SpeechInputBubbleControllerDelegate; 138 SpeechInputBubbleControllerDelegate;
138 139
139 } // namespace speech_input 140 } // namespace speech_input
140 141
141 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_BUBBLE_CONTROLLER_H_ 142 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_BUBBLE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698