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

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

Issue 6264015: Avoid closing the speech input UI bubble twice. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/speech/speech_input_bubble_controller.h" 5 #include "chrome/browser/speech/speech_input_bubble_controller.h"
6 6
7 #include "chrome/browser/browser_thread.h" 7 #include "chrome/browser/browser_thread.h"
8 #include "chrome/browser/tab_contents/tab_contents.h" 8 #include "chrome/browser/tab_contents/tab_contents.h"
9 #include "chrome/browser/tab_contents/tab_util.h" 9 #include "chrome/browser/tab_contents/tab_util.h"
10 #include "chrome/common/notification_registrar.h" 10 #include "chrome/common/notification_registrar.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 &SpeechInputBubbleController::InvokeDelegateButtonClicked, 194 &SpeechInputBubbleController::InvokeDelegateButtonClicked,
195 current_bubble_caller_id_, button)); 195 current_bubble_caller_id_, button));
196 } 196 }
197 197
198 void SpeechInputBubbleController::InfoBubbleFocusChanged() { 198 void SpeechInputBubbleController::InfoBubbleFocusChanged() {
199 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 199 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
200 DCHECK(current_bubble_caller_id_); 200 DCHECK(current_bubble_caller_id_);
201 201
202 int old_bubble_caller_id = current_bubble_caller_id_; 202 int old_bubble_caller_id = current_bubble_caller_id_;
203 current_bubble_caller_id_ = 0; 203 current_bubble_caller_id_ = 0;
204 bubbles_[old_bubble_caller_id]->Hide();
205 204
206 BrowserThread::PostTask( 205 BrowserThread::PostTask(
207 BrowserThread::IO, FROM_HERE, 206 BrowserThread::IO, FROM_HERE,
208 NewRunnableMethod( 207 NewRunnableMethod(
209 this, 208 this,
210 &SpeechInputBubbleController::InvokeDelegateFocusChanged, 209 &SpeechInputBubbleController::InvokeDelegateFocusChanged,
211 old_bubble_caller_id)); 210 old_bubble_caller_id));
212 } 211 }
213 212
214 void SpeechInputBubbleController::InvokeDelegateButtonClicked( 213 void SpeechInputBubbleController::InvokeDelegateButtonClicked(
215 int caller_id, SpeechInputBubble::Button button) { 214 int caller_id, SpeechInputBubble::Button button) {
216 delegate_->InfoBubbleButtonClicked(caller_id, button); 215 delegate_->InfoBubbleButtonClicked(caller_id, button);
217 } 216 }
218 217
219 void SpeechInputBubbleController::InvokeDelegateFocusChanged(int caller_id) { 218 void SpeechInputBubbleController::InvokeDelegateFocusChanged(int caller_id) {
220 delegate_->InfoBubbleFocusChanged(caller_id); 219 delegate_->InfoBubbleFocusChanged(caller_id);
221 } 220 }
222 221
223 } // namespace speech_input 222 } // namespace speech_input
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698