Index: chrome/browser/autofill/autocheckout_manager.h |
diff --git a/chrome/browser/autofill/autocheckout_manager.h b/chrome/browser/autofill/autocheckout_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..56850740b8e9f25f391f91f4b95ffe336c460b16 |
--- /dev/null |
+++ b/chrome/browser/autofill/autocheckout_manager.h |
@@ -0,0 +1,46 @@ |
+// Copyright (c) 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_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ |
+#define CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ |
+ |
+#include <string> |
+ |
+#include "base/memory/ref_counted.h" |
+ |
+class GURL; |
+class FormStructure; |
+ |
+struct FormData; |
+struct FormFieldData; |
Ilya Sherman
2013/01/17 01:21:44
nit: These should be interleaved with the above.
Raman Kakilate
2013/01/17 06:40:33
autofill_manager.h also orders classes followed by
|
+ |
+namespace content { |
+class WebContents; |
+struct SSLStatus; |
Ilya Sherman
2013/01/17 01:21:44
nit: alphabetize
Raman Kakilate
2013/01/17 06:40:33
used class'es followed by struct's
|
+} |
+ |
+class AutocheckoutManager : public base::RefCounted<AutocheckoutManager>{ |
Ilya Sherman
2013/01/17 01:21:44
This class should almost certainly not be referenc
Raman Kakilate
2013/01/17 06:40:33
I don't completely understand base:Bind, but from
Ilya Sherman
2013/01/17 10:50:23
For base::Bind, you want a WeakPtr, rather than re
Raman Kakilate
2013/01/17 16:52:30
Isn't WeakPtr doing more complex operations than r
Raman Kakilate
2013/01/17 17:35:30
Done. I was wrong, Moved to WeakPtr based implemen
|
+ public: |
+ void ShowAutocheckoutDialog(const GURL& frame_url, |
+ const content::SSLStatus& ssl_status, |
+ content::WebContents* web_contents); |
Ilya Sherman
2013/01/17 01:21:44
The AutocheckoutManager should have a pointer back
Raman Kakilate
2013/01/17 06:40:33
AutofillManager.web_contents() is a protected meth
Ilya Sherman
2013/01/17 10:50:23
IMO it would be better to make it public -- in fac
Raman Kakilate
2013/01/17 16:52:30
ah sorry, I meant http://code.google.com/searchfra
|
+ |
+ private: |
+ friend class base::RefCounted<AutocheckoutManager>; |
+ |
+ // Build FormFieldData based on the supplied |autocomplete_attribute|. Will |
+ // fill rest of properties with default values. |
+ static FormFieldData BuildField(const std::string& autocomplete_attribute); |
+ |
+ // Build Autocheckout specific form data to be consumed by |
+ // AutofillDialogController to show the Autocheckout specific UI. |
+ static FormData BuildAutocheckoutFormData(); |
Ilya Sherman
2013/01/17 01:21:44
nit: Please tuck these into an anonymous namespace
Raman Kakilate
2013/01/17 06:40:33
Done.
|
+ |
+ // Callback called from AutofillDialogController on filling up the UI form. |
+ void ReturnAutocheckoutData(const FormStructure* result); |
+ |
+ ~AutocheckoutManager(); |
+}; |
Ilya Sherman
2013/01/17 01:21:44
nit: DISALLOW_COPY_AND_ASSIGN
Raman Kakilate
2013/01/17 06:40:33
Done.
|
+ |
+#endif // CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ |