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

Side by Side Diff: chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc

Issue 2866443002: [Web Payments] Handle "Enter" accelerator when there's a primary action (Closed)
Patch Set: Add tests to sheets that handle the enter accelerator Created 3 years, 7 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/views/payments/credit_card_editor_view_controller.h" 5 #include "chrome/browser/ui/views/payments/credit_card_editor_view_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 bool is_required_valid = !field_.required; 322 bool is_required_valid = !field_.required;
323 const base::string16 displayed_message = 323 const base::string16 displayed_message =
324 is_required_valid ? base::ASCIIToUTF16("") 324 is_required_valid ? base::ASCIIToUTF16("")
325 : l10n_util::GetStringUTF16( 325 : l10n_util::GetStringUTF16(
326 IDS_PAYMENTS_FIELD_REQUIRED_VALIDATION_MESSAGE); 326 IDS_PAYMENTS_FIELD_REQUIRED_VALIDATION_MESSAGE);
327 controller_->DisplayErrorMessageForField(field_, displayed_message); 327 controller_->DisplayErrorMessageForField(field_, displayed_message);
328 return is_required_valid; 328 return is_required_valid;
329 } 329 }
330 330
331 bool CreditCardEditorViewController::GetSheetId(DialogViewID* sheet_id) {
332 *sheet_id = DialogViewID::CREDIT_CARD_EDITOR_SHEET;
333 return true;
334 }
335
331 } // namespace payments 336 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698