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

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: Created 4 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
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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 SetSelectedLine(kNoSelection); 224 SetSelectedLine(kNoSelection);
225 SelectNextLine(); 225 SelectNextLine();
226 return true; 226 return true;
227 case ui::VKEY_NEXT: // Page down. 227 case ui::VKEY_NEXT: // Page down.
228 SetSelectedLine(GetLineCount() - 1); 228 SetSelectedLine(GetLineCount() - 1);
229 return true; 229 return true;
230 case ui::VKEY_ESCAPE: 230 case ui::VKEY_ESCAPE:
231 Hide(); 231 Hide();
232 return true; 232 return true;
233 case ui::VKEY_DELETE: 233 case ui::VKEY_DELETE:
234 return (event.modifiers & content::NativeWebKeyboardEvent::ShiftKey) && 234 return (event.modifiers() & content::NativeWebKeyboardEvent::ShiftKey) &&
235 RemoveSelectedLine(); 235 RemoveSelectedLine();
236 case ui::VKEY_TAB: 236 case ui::VKEY_TAB:
237 // A tab press should cause the selected line to be accepted, but still 237 // A tab press should cause the selected line to be accepted, but still
238 // return false so the tab key press propagates and changes the cursor 238 // return false so the tab key press propagates and changes the cursor
239 // location. 239 // location.
240 AcceptSelectedLine(); 240 AcceptSelectedLine();
241 return false; 241 return false;
242 case ui::VKEY_RETURN: 242 case ui::VKEY_RETURN:
243 return AcceptSelectedLine(); 243 return AcceptSelectedLine();
244 default: 244 default:
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 // Don't clear view_, because otherwise the popup will have to get regenerated 536 // Don't clear view_, because otherwise the popup will have to get regenerated
537 // and this will cause flickering. 537 // and this will cause flickering.
538 suggestions_.clear(); 538 suggestions_.clear();
539 elided_values_.clear(); 539 elided_values_.clear();
540 elided_labels_.clear(); 540 elided_labels_.clear();
541 541
542 selected_line_ = kNoSelection; 542 selected_line_ = kNoSelection;
543 } 543 }
544 544
545 } // namespace autofill 545 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698