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

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 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
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.cc ('k') | chrome/browser/ui/browser.cc » ('j') | 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 "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" 5 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 SetSelectedLine(kNoSelection); 223 SetSelectedLine(kNoSelection);
224 SelectNextLine(); 224 SelectNextLine();
225 return true; 225 return true;
226 case ui::VKEY_NEXT: // Page down. 226 case ui::VKEY_NEXT: // Page down.
227 SetSelectedLine(GetLineCount() - 1); 227 SetSelectedLine(GetLineCount() - 1);
228 return true; 228 return true;
229 case ui::VKEY_ESCAPE: 229 case ui::VKEY_ESCAPE:
230 Hide(); 230 Hide();
231 return true; 231 return true;
232 case ui::VKEY_DELETE: 232 case ui::VKEY_DELETE:
233 return (event.modifiers & content::NativeWebKeyboardEvent::ShiftKey) && 233 return (event.modifiers() & content::NativeWebKeyboardEvent::ShiftKey) &&
234 RemoveSelectedLine(); 234 RemoveSelectedLine();
235 case ui::VKEY_TAB: 235 case ui::VKEY_TAB:
236 // A tab press should cause the selected line to be accepted, but still 236 // A tab press should cause the selected line to be accepted, but still
237 // return false so the tab key press propagates and changes the cursor 237 // return false so the tab key press propagates and changes the cursor
238 // location. 238 // location.
239 AcceptSelectedLine(); 239 AcceptSelectedLine();
240 return false; 240 return false;
241 case ui::VKEY_RETURN: 241 case ui::VKEY_RETURN:
242 return AcceptSelectedLine(); 242 return AcceptSelectedLine();
243 default: 243 default:
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 // Don't clear view_, because otherwise the popup will have to get regenerated 528 // Don't clear view_, because otherwise the popup will have to get regenerated
529 // and this will cause flickering. 529 // and this will cause flickering.
530 suggestions_.clear(); 530 suggestions_.clear();
531 elided_values_.clear(); 531 elided_values_.clear();
532 elided_labels_.clear(); 532 elided_labels_.clear();
533 533
534 selected_line_ = kNoSelection; 534 selected_line_ = kNoSelection;
535 } 535 }
536 536
537 } // namespace autofill 537 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698