summaryrefslogtreecommitdiffstats
path: root/chrome/browser/translate
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-10 18:57:53 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-10 18:57:53 +0000
commit403415accf228400fc1365d5de9696348509beb8 (patch)
treecb63da5dbef81b6baa0dea28bf0d9e964185bc80 /chrome/browser/translate
parent8ef0b11afeb11f96028f3382a08447866a7687a4 (diff)
downloadchromium_src-403415accf228400fc1365d5de9696348509beb8.zip
chromium_src-403415accf228400fc1365d5de9696348509beb8.tar.gz
chromium_src-403415accf228400fc1365d5de9696348509beb8.tar.bz2
Make RenderViewHost not know about AutoFill and AutoComplete.
This only takes care of the browser side portion, the renderer change will be done separately once the WebKit change it depends on is rolled. Review URL: http://codereview.chromium.org/5958021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/translate')
-rw-r--r--chrome/browser/translate/translate_manager.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index 84b576e..40fbae6 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -11,6 +11,7 @@
#include "base/singleton.h"
#include "base/string_split.h"
#include "base/string_util.h"
+#include "chrome/browser/autofill/autofill_manager.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -510,6 +511,12 @@ void TranslateManager::DoTranslatePage(TabContents* tab,
tab->language_state().set_translation_pending(true);
tab->render_view_host()->TranslatePage(entry->page_id(), translate_script,
source_lang, target_lang);
+
+ // Ideally we'd have a better way to uniquely identify form control elements,
+ // but we don't have that yet. So before start translation, we clear the
+ // current form and re-parse it in AutoFillManager first to get the new
+ // labels.
+ tab->autofill_manager()->Reset();
}
void TranslateManager::PageTranslated(TabContents* tab,