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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 5682012: Revert 69088 - Before starting translation reset cache in AutoFillManager. To... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 } 2007 }
2008 2008
2009 void RenderViewHost::PerformCustomContextMenuAction(unsigned action) { 2009 void RenderViewHost::PerformCustomContextMenuAction(unsigned action) {
2010 Send(new ViewMsg_CustomContextMenuAction(routing_id(), action)); 2010 Send(new ViewMsg_CustomContextMenuAction(routing_id(), action));
2011 } 2011 }
2012 2012
2013 void RenderViewHost::TranslatePage(int page_id, 2013 void RenderViewHost::TranslatePage(int page_id,
2014 const std::string& translate_script, 2014 const std::string& translate_script,
2015 const std::string& source_lang, 2015 const std::string& source_lang,
2016 const std::string& target_lang) { 2016 const std::string& target_lang) {
2017 // Ideally we'd have a better way to uniquely identify form control elements,
2018 // but we don't have that yet. So before start translation, we clear the
2019 // current form and re-parse it in AutoFillManager first to get the new
2020 // labels.
2021 RenderViewHostDelegate::AutoFill* autofill_delegate =
2022 delegate_->GetAutoFillDelegate();
2023 if (autofill_delegate)
2024 autofill_delegate->Reset();
2025
2026 Send(new ViewMsg_TranslatePage(routing_id(), page_id, translate_script, 2017 Send(new ViewMsg_TranslatePage(routing_id(), page_id, translate_script,
2027 source_lang, target_lang)); 2018 source_lang, target_lang));
2028 } 2019 }
2029 2020
2030 void RenderViewHost::RevertTranslation(int page_id) { 2021 void RenderViewHost::RevertTranslation(int page_id) {
2031 Send(new ViewMsg_RevertTranslation(routing_id(), page_id)); 2022 Send(new ViewMsg_RevertTranslation(routing_id(), page_id));
2032 } 2023 }
2033 2024
2034 void RenderViewHost::SendContentSettings(const GURL& url, 2025 void RenderViewHost::SendContentSettings(const GURL& url,
2035 const ContentSettings& settings) { 2026 const ContentSettings& settings) {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 if (printer_query.get()) { 2252 if (printer_query.get()) {
2262 BrowserThread::PostTask( 2253 BrowserThread::PostTask(
2263 BrowserThread::IO, FROM_HERE, 2254 BrowserThread::IO, FROM_HERE,
2264 NewRunnableMethod(printer_query.get(), 2255 NewRunnableMethod(printer_query.get(),
2265 &printing::PrinterQuery::StopWorker)); 2256 &printing::PrinterQuery::StopWorker));
2266 } 2257 }
2267 2258
2268 // Send the printingDone msg for now. 2259 // Send the printingDone msg for now.
2269 Send(new ViewMsg_PrintingDone(routing_id(), -1, true)); 2260 Send(new ViewMsg_PrintingDone(routing_id(), -1, true));
2270 } 2261 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698