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

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

Issue 9030010: Move most of the remaining users of WebContentsObserver::tab_contents() to use web_contents(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/translate/translate_manager.cc ('k') | chrome/browser/ui/alternate_error_tab_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_tab_helper.cc
===================================================================
--- chrome/browser/translate/translate_tab_helper.cc (revision 115777)
+++ chrome/browser/translate/translate_tab_helper.cc (working copy)
@@ -10,6 +10,8 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
+using content::WebContents;
+
TranslateTabHelper::TranslateTabHelper(TabContents* tab_contents)
: content::WebContentsObserver(tab_contents),
language_state_(&tab_contents->GetController()) {
@@ -44,7 +46,7 @@
std::string lang = language;
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
- content::Source<TabContents>(tab_contents()),
+ content::Source<WebContents>(web_contents()),
content::Details<std::string>(&lang));
}
@@ -57,6 +59,6 @@
PageTranslatedDetails details(original_lang, translated_lang, error_type);
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PAGE_TRANSLATED,
- content::Source<TabContents>(tab_contents()),
+ content::Source<WebContents>(web_contents()),
content::Details<PageTranslatedDetails>(&details));
}
« no previous file with comments | « chrome/browser/translate/translate_manager.cc ('k') | chrome/browser/ui/alternate_error_tab_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698