| Index: chrome/browser/printing/print_preview_message_handler.cc
|
| diff --git a/chrome/browser/printing/print_preview_message_handler.cc b/chrome/browser/printing/print_preview_message_handler.cc
|
| index 5d6287eca84272514dbf41e2a17d3c8ccc6a4061..a861023fd5b1dcfe87152f110f74fec60b21d3e7 100644
|
| --- a/chrome/browser/printing/print_preview_message_handler.cc
|
| +++ b/chrome/browser/printing/print_preview_message_handler.cc
|
| @@ -28,6 +28,8 @@
|
| using content::BrowserThread;
|
| using content::WebContents;
|
|
|
| +int printing::PrintPreviewMessageHandler::kUserDataKey;
|
| +
|
| namespace {
|
|
|
| void StopWorker(int document_cookie) {
|
| @@ -79,11 +81,8 @@ TabContents* PrintPreviewMessageHandler::GetPrintPreviewTab() {
|
| if (!tab_controller)
|
| return NULL;
|
|
|
| - return tab_controller->GetPrintPreviewForTab(tab_contents());
|
| -}
|
| -
|
| -TabContents* PrintPreviewMessageHandler::tab_contents() {
|
| - return TabContents::FromWebContents(web_contents());
|
| + return tab_controller->GetPrintPreviewForTab(
|
| + TabContents::FromWebContents(web_contents()));
|
| }
|
|
|
| PrintPreviewUI* PrintPreviewMessageHandler::GetPrintPreviewUI() {
|
| @@ -96,10 +95,12 @@ PrintPreviewUI* PrintPreviewMessageHandler::GetPrintPreviewUI() {
|
|
|
| void PrintPreviewMessageHandler::OnRequestPrintPreview(
|
| bool source_is_modifiable, bool webnode_only) {
|
| - TabContents* tab = tab_contents();
|
| - if (webnode_only)
|
| - tab->print_view_manager()->PrintPreviewForWebNode();
|
| - PrintPreviewTabController::PrintPreview(tab);
|
| + if (webnode_only) {
|
| + printing::PrintViewManager::FromWebContents(web_contents())->
|
| + PrintPreviewForWebNode();
|
| + }
|
| + PrintPreviewTabController::PrintPreview(
|
| + TabContents::FromWebContents(web_contents()));
|
| PrintPreviewUI::SetSourceIsModifiable(GetPrintPreviewTab(),
|
| source_is_modifiable);
|
| }
|
|
|