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

Side by Side Diff: ui/app_list/views/search_box_view.cc

Issue 791403004: Prevent Shift+Tab from locking up the browser when in the app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_result_display_recommendation
Patch Set: Created 6 years 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
« 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) 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 #include "ui/app_list/views/search_box_view.h" 5 #include "ui/app_list/views/search_box_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/app_list/app_list_constants.h" 9 #include "ui/app_list/app_list_constants.h"
10 #include "ui/app_list/app_list_model.h" 10 #include "ui/app_list/app_list_model.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 view_delegate_->AutoLaunchCanceled(); 214 view_delegate_->AutoLaunchCanceled();
215 NotifyQueryChanged(); 215 NotifyQueryChanged();
216 } 216 }
217 217
218 bool SearchBoxView::HandleKeyEvent(views::Textfield* sender, 218 bool SearchBoxView::HandleKeyEvent(views::Textfield* sender,
219 const ui::KeyEvent& key_event) { 219 const ui::KeyEvent& key_event) {
220 bool handled = false; 220 bool handled = false;
221 if (contents_view_ && contents_view_->visible()) 221 if (contents_view_ && contents_view_->visible())
222 handled = contents_view_->OnKeyPressed(key_event); 222 handled = contents_view_->OnKeyPressed(key_event);
223 223
224 if (key_event.key_code() == ui::VKEY_TAB && key_event.IsShiftDown())
Matt Giuca 2014/12/14 22:40:30 Copy some text from the CL description to a commen
calamity 2014/12/15 02:37:12 Done.
225 handled = true;
226
224 return handled; 227 return handled;
225 } 228 }
226 229
227 void SearchBoxView::ButtonPressed(views::Button* sender, 230 void SearchBoxView::ButtonPressed(views::Button* sender,
228 const ui::Event& event) { 231 const ui::Event& event) {
229 if (back_button_ && sender == back_button_) 232 if (back_button_ && sender == back_button_)
230 delegate_->BackButtonPressed(); 233 delegate_->BackButtonPressed();
231 else if (speech_button_ && sender == speech_button_) 234 else if (speech_button_ && sender == speech_button_)
232 view_delegate_->ToggleSpeechRecognition(); 235 view_delegate_->ToggleSpeechRecognition();
233 else 236 else
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 NotifyQueryChanged(); 294 NotifyQueryChanged();
292 } 295 }
293 296
294 void SearchBoxView::OnSpeechRecognitionStateChanged( 297 void SearchBoxView::OnSpeechRecognitionStateChanged(
295 SpeechRecognitionState new_state) { 298 SpeechRecognitionState new_state) {
296 SpeechRecognitionButtonPropChanged(); 299 SpeechRecognitionButtonPropChanged();
297 SchedulePaint(); 300 SchedulePaint();
298 } 301 }
299 302
300 } // namespace app_list 303 } // namespace app_list
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