| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |