| Index: chrome/browser/tab_contents/tab_contents.cc
|
| diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
|
| index 91995c7829025d3a802fc3a1db9d96bb80c85db2..917512e4223f9439ce6c7ef8873be6eb3f7ce7c4 100644
|
| --- a/chrome/browser/tab_contents/tab_contents.cc
|
| +++ b/chrome/browser/tab_contents/tab_contents.cc
|
| @@ -61,6 +61,7 @@
|
| #include "chrome/browser/plugin_installer.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/printing/print_view_manager.h"
|
| +#include "chrome/browser/printing/print_preview_tab_controller.h"
|
| #include "chrome/browser/profile.h"
|
| #include "chrome/browser/renderer_host/render_process_host.h"
|
| #include "chrome/browser/renderer_host/render_view_host.h"
|
| @@ -1353,8 +1354,14 @@ void TabContents::EmailPageLocation() {
|
| }
|
|
|
| void TabContents::PrintPreview() {
|
| - // We don't show the print preview yet, only the print dialog.
|
| - PrintNow();
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnablePrintPreview)) {
|
| + if (showing_interstitial_page())
|
| + return;
|
| + render_view_host()->PrintPreview();
|
| + } else {
|
| + PrintNow();
|
| + }
|
| }
|
|
|
| bool TabContents::PrintNow() {
|
|
|