| 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 b6bc9aed107ae87f601a55bc76df495d911bc83c..2a8c4df4123220ced107cf0bccef5c944309460f 100644
|
| --- a/chrome/browser/tab_contents/tab_contents.cc
|
| +++ b/chrome/browser/tab_contents/tab_contents.cc
|
| @@ -59,6 +59,7 @@
|
| #include "chrome/browser/platform_util.h"
|
| #include "chrome/browser/plugin_installer.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| +#include "chrome/browser/printing/print_preview_tab_controller.h"
|
| #include "chrome/browser/printing/print_view_manager.h"
|
| #include "chrome/browser/profile.h"
|
| #include "chrome/browser/renderer_host/render_process_host.h"
|
| @@ -1351,8 +1352,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() {
|
|
|