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

Unified Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 10535120: TabContentsWrapper -> TabContents, part 43. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
Index: chrome/browser/automation/automation_provider_observers.cc
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index e2e790fd9292f0111e06a0922367df3e7d9ed937..aaca274991b045bdb759959d2b10888720486836 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -801,8 +801,8 @@ void BrowserOpenedNotificationObserver::Observe(
// Only send the result if the loaded tab is in the new window.
NavigationController* controller =
content::Source<NavigationController>(source).ptr();
- TabContents* tab = TabContents::GetOwningTabContentsForWebContents(
- controller->GetWebContents());
+ TabContents* tab =
+ TabContents::FromWebContents(controller->GetWebContents());
int window_id = tab ? tab->restore_tab_helper()->window_id().id() : -1;
if (window_id == new_window_id_) {
if (for_browser_command_) {
@@ -1118,8 +1118,7 @@ void DomOperationObserver::Observe(
} else if (type == chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED) {
WebContents* web_contents = content::Source<WebContents>(source).ptr();
if (web_contents) {
- TabContents* tab_contents =
- TabContents::GetOwningTabContentsForWebContents(web_contents);
+ TabContents* tab_contents = TabContents::FromWebContents(web_contents);
if (tab_contents &&
tab_contents->content_settings() &&
tab_contents->content_settings()->IsContentBlocked(
@@ -1259,8 +1258,8 @@ void TabLanguageDeterminedObserver::Observe(
return;
}
- TranslateTabHelper* helper = TabContents::GetOwningTabContentsForWebContents(
- web_contents_)->translate_tab_helper();
+ TranslateTabHelper* helper =
+ TabContents::FromWebContents(web_contents_)->translate_tab_helper();
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
return_value->SetBoolean("page_translated",
helper->language_state().IsPageTranslated());
@@ -2151,8 +2150,7 @@ void AppLaunchObserver::Observe(int type,
NavigationController* controller =
content::Source<NavigationController>(source).ptr();
TabContents* tab =
- TabContents::GetOwningTabContentsForWebContents(
- controller->GetWebContents());
+ TabContents::FromWebContents(controller->GetWebContents());
int window_id = tab ? tab->restore_tab_helper()->window_id().id() : -1;
if (window_id == new_window_id_) {
if (automation_) {
@@ -2978,8 +2976,8 @@ void BrowserOpenedWithNewProfileNotificationObserver::Observe(
// Only send the result if the loaded tab is in the new window.
NavigationController* controller =
content::Source<NavigationController>(source).ptr();
- TabContents* tab = TabContents::GetOwningTabContentsForWebContents(
- controller->GetWebContents());
+ TabContents* tab =
+ TabContents::FromWebContents(controller->GetWebContents());
int window_id = tab ? tab->restore_tab_helper()->window_id().id() : -1;
if (window_id == new_window_id_) {
if (automation_) {
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/automation/automation_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698