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

Unified Diff: chrome/browser/autofill/autocheckout_manager.h

Issue 11539003: Pop up requestAutocomplete UI when autofill server hints chrome client that it is in a multipage au… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: More comments addressed. Created 7 years, 11 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
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_

Powered by Google App Engine
This is Rietveld 408576698