OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ | |
6 #define CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/memory/ref_counted.h" | |
11 | |
12 class GURL; | |
13 class FormStructure; | |
14 | |
15 struct FormData; | |
16 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
| |
17 | |
18 namespace content { | |
19 class WebContents; | |
20 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
| |
21 } | |
22 | |
23 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
| |
24 public: | |
25 void ShowAutocheckoutDialog(const GURL& frame_url, | |
26 const content::SSLStatus& ssl_status, | |
27 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
| |
28 | |
29 private: | |
30 friend class base::RefCounted<AutocheckoutManager>; | |
31 | |
32 // Build FormFieldData based on the supplied |autocomplete_attribute|. Will | |
33 // fill rest of properties with default values. | |
34 static FormFieldData BuildField(const std::string& autocomplete_attribute); | |
35 | |
36 // Build Autocheckout specific form data to be consumed by | |
37 // AutofillDialogController to show the Autocheckout specific UI. | |
38 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.
| |
39 | |
40 // Callback called from AutofillDialogController on filling up the UI form. | |
41 void ReturnAutocheckoutData(const FormStructure* result); | |
42 | |
43 ~AutocheckoutManager(); | |
44 }; | |
Ilya Sherman
2013/01/17 01:21:44
nit: DISALLOW_COPY_AND_ASSIGN
Raman Kakilate
2013/01/17 06:40:33
Done.
| |
45 | |
46 #endif // CHROME_BROWSER_AUTOFILL_AUTOCHECKOUT_MANAGER_H_ | |
OLD | NEW |