From 3c9e187bd8ec34ebf2a91a37c868584c465647e8 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Thu, 18 Nov 2010 16:17:49 +0000 Subject: Make pink's TabContentsWrapper change compile on Windows. Code by pinkerton@, with modifications by evanm and myself to get it to build on windows/linux/chromeos. BUG=none TEST=none Review URL: http://codereview.chromium.org/4694008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66626 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/printing/print_preview_tab_controller.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'chrome/browser/printing/print_preview_tab_controller.cc') diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc index 0396583..69a5763 100644 --- a/chrome/browser/printing/print_preview_tab_controller.cc +++ b/chrome/browser/printing/print_preview_tab_controller.cc @@ -6,6 +6,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/browser/tab_contents_wrapper.h" #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" @@ -97,19 +98,19 @@ TabContents* PrintPreviewTabController::CreatePrintPreviewTab( PageTransition::LINK); params.disposition = NEW_FOREGROUND_TAB; params.tabstrip_index = current_browser->tabstrip_model()-> - GetIndexOfTabContents(initiator_tab) + 1; + GetWrapperIndex(initiator_tab) + 1; browser::Navigate(¶ms); - TabContents* preview_tab = params.target_contents; - preview_tab->Activate(); + TabContentsWrapper* preview_tab = params.target_contents; + preview_tab->tab_contents()->Activate(); // Add an entry to the map. - preview_tab_map_[preview_tab] = initiator_tab; + preview_tab_map_[preview_tab->tab_contents()] = initiator_tab; waiting_for_new_preview_page_ = true; AddObservers(initiator_tab); - AddObservers(preview_tab); + AddObservers(preview_tab->tab_contents()); - return preview_tab; + return preview_tab->tab_contents(); } void PrintPreviewTabController::Observe(NotificationType type, -- cgit v1.1