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

Side by Side Diff: chrome/browser/ui/autofill/testable_autofill_dialog_view.h

Issue 14821005: [RFP, Autofill] Switching dialog field identification to int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 (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 #ifndef CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_
7 7
8 namespace autofill { 8 namespace autofill {
9 9
10 // Functions that an AutofillDialogView implementation should implement in order 10 // Functions that an AutofillDialogView implementation should implement in order
11 // to assist in unit testing. 11 // to assist in unit testing.
12 class TestableAutofillDialogView { 12 class TestableAutofillDialogView {
13 public: 13 public:
14 virtual ~TestableAutofillDialogView(); 14 virtual ~TestableAutofillDialogView();
15 15
16 // Simulates the user pressing 'Submit' to accept the dialog. 16 // Simulates the user pressing 'Submit' to accept the dialog.
17 virtual void SubmitForTesting() = 0; 17 virtual void SubmitForTesting() = 0;
18 18
19 // Simulates the user pressing 'Cancel' to abort the dialog. 19 // Simulates the user pressing 'Cancel' to abort the dialog.
20 virtual void CancelForTesting() = 0; 20 virtual void CancelForTesting() = 0;
21 21
22 // Returns the actual contents of the input which is modelled by |input|. 22 // Return the actual contents of the input specified by |section| and |type|
23 virtual string16 GetTextContentsOfInput(const DetailInput& input) = 0; 23 virtual string16 GetTextContentsOfInput(DialogSection section,
24 AutofillFieldType type) = 0;
24 25
25 // Sets the actual contents of the input which is modelled by |input|. 26 // Sets the actual contents of the input specified by |section| and |type|.
26 virtual void SetTextContentsOfInput(const DetailInput& input, 27 virtual void SetTextContentsOfInput(DialogSection section,
28 AutofillFieldType type,
27 const string16& contents) = 0; 29 const string16& contents) = 0;
28 30
29 // Simulates a user activatino of the input which is modelled by |input|. 31 // Simulates a user activatino of the input which is modelled by |input|.
30 virtual void ActivateInput(const DetailInput& input) = 0; 32 virtual void ActivateInput(DialogSection section, AutofillFieldType type) = 0;
31 }; 33 };
32 34
33 } // namespace autofill 35 } // namespace autofill
34 36
35 #endif // CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_ 37 #endif // CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698