OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 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_AUTOFILL_MANAGER_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
| 7 |
| 8 #include "base/scoped_ptr.h" |
| 9 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
| 10 |
| 11 namespace webkit_glue { |
| 12 class FormFieldValues; |
| 13 } |
| 14 |
| 15 class AutoFillInfoBarDelegate; |
| 16 class TabContents; |
| 17 |
| 18 // Manages saving and restoring the user's personal information entered into web |
| 19 // forms. |
| 20 class AutoFillManager : public RenderViewHostDelegate::AutoFill { |
| 21 public: |
| 22 explicit AutoFillManager(TabContents* tab_contents); |
| 23 virtual ~AutoFillManager(); |
| 24 |
| 25 // RenderViewHostDelegate::AutoFill implementation. |
| 26 virtual void FormFieldValuesSubmitted( |
| 27 const webkit_glue::FormFieldValues& form); |
| 28 |
| 29 // Saves the form data to the web database. |
| 30 void SaveFormData(); |
| 31 |
| 32 // Resets the stored form data. |
| 33 void Reset(); |
| 34 |
| 35 private: |
| 36 // The TabContents hosting this AutoFillManager. |
| 37 TabContents* tab_contents_; |
| 38 |
| 39 // Our copy of the form data. |
| 40 scoped_ptr<webkit_glue::FormFieldValues> form_data_; |
| 41 |
| 42 // The infobar asking for permission to store form information. |
| 43 scoped_ptr<AutoFillInfoBarDelegate> infobar_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(AutoFillManager); |
| 46 }; |
| 47 |
| 48 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_MANAGER_H_ |
OLD | NEW |