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

Side by Side Diff: chrome/browser/autofill/autofill_manager.cc

Issue 339030: Add initial implementation of AutoFill++. This implementation is hidden behi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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 #include "chrome/browser/autofill/autofill_manager.h"
6
7 #include "base/command_line.h"
8 #include "chrome/browser/autofill/autofill_infobar_delegate.h"
9 #include "chrome/browser/tab_contents/tab_contents.h"
10 #include "chrome/common/chrome_switches.h"
11 #include "webkit/glue/form_field_values.h"
12
13 AutoFillManager::AutoFillManager(TabContents* tab_contents)
14 : tab_contents_(tab_contents),
15 infobar_(NULL) {
16 }
17
18 AutoFillManager::~AutoFillManager() {
19 }
20
21 void AutoFillManager::FormFieldValuesSubmitted(
22 const webkit_glue::FormFieldValues& form) {
23 // TODO(jhawkins): Remove this switch when AutoFill++ is fully implemented.
24 if (!CommandLine::ForCurrentProcess()->HasSwitch(
25 switches::kEnableNewAutoFill))
26 return;
27
28 // Grab a copy of the form data.
29 form_data_.reset(new webkit_glue::FormFieldValues(form));
30
31 // Ask the user for permission to save form information.
32 infobar_.reset(new AutoFillInfoBarDelegate(tab_contents_, this));
33 }
34
35 void AutoFillManager::SaveFormData() {
36 // TODO(jhawkins): Save the form data to the web database.
37 }
38
39 void AutoFillManager::Reset() {
40 form_data_.reset();
41 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698