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

Unified Diff: chrome/browser/extensions/extension_tabs_module.cc

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/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
Index: chrome/browser/extensions/extension_tabs_module.cc
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index c9cb966c4227be05140781d5338ffbe0b25894c7..fd089192dd6e24a5e91bf1b2d96ad2bb90cf100b 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -896,7 +896,7 @@ bool CreateTabFunction::RunImpl() {
browser::Navigate(&params);
if (active)
- params.target_contents->view()->SetInitialFocus();
+ params.target_contents->tab_contents()->view()->SetInitialFocus();
// Return data about the newly created tab.
if (has_callback()) {
@@ -1031,7 +1031,7 @@ bool UpdateTabFunction::RunImpl() {
NULL, &tab_strip, &contents, &tab_index, &error_)) {
return false;
}
- NavigationController& controller = contents->controller();
+ NavigationController& controller = contents->tab_contents()->controller();
// TODO(rafaelw): handle setting remaining tab properties:
// -title
@@ -1374,7 +1374,8 @@ bool RemoveTabsFunction::RunImpl() {
// is being dragged, or we're in some other nested event loop. This code
// path should ensure that the tab is safely closed under such
// circumstances, whereas |Browser::CloseTabContents()| does not.
- RenderViewHost* render_view_host = contents->render_view_host();
+ RenderViewHost* render_view_host =
+ contents->tab_contents()->render_view_host();
render_view_host->delegate()->Close(render_view_host);
}
return true;
@@ -1572,7 +1573,7 @@ bool DetectTabLanguageFunction::RunImpl() {
return false;
}
- if (contents->controller().needs_reload()) {
+ if (contents->tab_contents()->controller().needs_reload()) {
// If the tab hasn't been loaded, don't wait for the tab to load.
error_ = keys::kCannotDetermineLanguageOfUnloadedTab;
return false;
@@ -1595,10 +1596,12 @@ bool DetectTabLanguageFunction::RunImpl() {
content::Source<TabContents>(contents->tab_contents()));
registrar_.Add(
this, content::NOTIFICATION_TAB_CLOSING,
- content::Source<NavigationController>(&(contents->controller())));
+ content::Source<NavigationController>(
+ &(contents->tab_contents()->controller())));
registrar_.Add(
this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&(contents->controller())));
+ content::Source<NavigationController>(
+ &(contents->tab_contents()->controller())));
return true;
}
« no previous file with comments | « chrome/browser/extensions/extension_tab_id_map.cc ('k') | chrome/browser/extensions/isolated_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698