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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_common.h

Issue 22623002: Extract AutofillDialogController interface and common utilities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/autofill_dialog_common.h
diff --git a/chrome/browser/ui/autofill/autofill_dialog_common.h b/chrome/browser/ui/autofill/autofill_dialog_common.h
new file mode 100644
index 0000000000000000000000000000000000000000..50b57ca479c50246526a267e3e3bfde6e7833e11
--- /dev/null
+++ b/chrome/browser/ui/autofill/autofill_dialog_common.h
@@ -0,0 +1,42 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_COMMON_H_
+#define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_COMMON_H_
+
+#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
+#include "components/autofill/core/browser/autofill_type.h"
+#include "components/autofill/core/browser/field_types.h"
+
+namespace autofill {
+class AutofillProfile;
+}
+
+namespace wallet {
+class Address;
+}
+
+namespace autofill {
+namespace common {
aruslan 2013/08/07 22:53:49 estade@: I would call this common, not utils. Thes
aruslan 2013/08/09 00:01:31 Done.
+
+// Returns true if |input| should be shown when |field_type| has been requested.
+bool InputTypeMatchesFieldType(const DetailInput& input,
+ const AutofillType& field_type);
+
+// Returns true if |input| in the given |section| should be used for a
+// site-requested |field|.
+bool DetailInputMatchesField(DialogSection section,
+ const DetailInput& input,
+ const AutofillField& field);
+
+// Returns true if the |type| belongs to the CREDIT_CARD field type group.
+bool IsCreditCardType(ServerFieldType type);
+
+// Constructs |inputs| from template data for a given |dialog_section|.
+void BuildInputsForSection(DialogSection dialog_section, DetailInputs* inputs);
+
+} // namespace common
+} // namespace autofill
+
+#endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_COMMON_H_
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698