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

Unified Diff: chrome/browser/translate/translate_manager.cc

Issue 6368011: Clean up WebNavigationObserver by taking out password specific callbacks, and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « chrome/browser/tab_contents/web_navigation_observer.h ('k') | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager.cc
===================================================================
--- chrome/browser/translate/translate_manager.cc (revision 71973)
+++ chrome/browser/translate/translate_manager.cc (working copy)
@@ -34,6 +34,7 @@
#include "chrome/common/notification_source.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/render_messages.h"
#include "chrome/common/translate_errors.h"
#include "chrome/common/url_constants.h"
#include "grit/browser_resources.h"
@@ -473,7 +474,8 @@
NOTREACHED();
return;
}
- tab_contents->render_view_host()->RevertTranslation(entry->page_id());
+ tab_contents->render_view_host()->Send(new ViewMsg_RevertTranslation(
+ tab_contents->render_view_host()->routing_id(), entry->page_id()));
tab_contents->language_state().set_current_language(
tab_contents->language_state().original_language());
}
@@ -510,9 +512,11 @@
}
tab->language_state().set_translation_pending(true);
- tab->render_view_host()->TranslatePage(entry->page_id(), translate_script,
- source_lang, target_lang);
+ tab->render_view_host()->Send(new ViewMsg_TranslatePage(
+ tab->render_view_host()->routing_id(), 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
« no previous file with comments | « chrome/browser/tab_contents/web_navigation_observer.h ('k') | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698