summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing/print_preview_tab_controller.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/printing/print_preview_tab_controller.cc')
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc
index f0d2edb..0d94be1 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/printing/print_preview_tab_controller.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/sessions/restore_tab_helper.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
@@ -178,8 +179,12 @@ TabContents* PrintPreviewTabController::GetInitiatorTab(
TabContents* PrintPreviewTabController::CreatePrintPreviewTab(
TabContents* initiator_tab) {
+ // TODO: this should be converted to TabContentsWrapper.
+ TabContentsWrapper* tab =
+ TabContentsWrapper::GetCurrentWrapperForContents(initiator_tab);
+ DCHECK(tab);
Browser* current_browser = BrowserList::FindBrowserWithID(
- initiator_tab->controller().window_id().id());
+ tab->restore_tab_helper()->window_id().id());
if (!current_browser) {
if (initiator_tab->delegate()->IsExternalTabContainer()) {
current_browser = Browser::CreateForType(Browser::TYPE_POPUP,