Index: chrome/browser/ui/browser_commands.cc |
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc |
index 8c61e68d5eff7f343ecbecb8400f4c96d3425f69..43dd39ed7830b9ee9eaef2eb68bf45bba7d05564 100644 |
--- a/chrome/browser/ui/browser_commands.cc |
+++ b/chrome/browser/ui/browser_commands.cc |
@@ -95,9 +95,9 @@ |
#endif |
#if defined(ENABLE_PRINTING) |
-#include "chrome/browser/printing/print_view_manager.h" |
#if defined(ENABLE_FULL_PRINTING) |
#include "chrome/browser/printing/print_preview_dialog_controller.h" |
+#include "chrome/browser/printing/print_view_manager.h" |
#else |
#include "chrome/browser/printing/print_view_manager_basic.h" |
#endif // defined(ENABLE_FULL_PRINTING) |
@@ -857,21 +857,15 @@ |
void Print(Browser* browser) { |
#if defined(ENABLE_PRINTING) |
WebContents* contents = browser->tab_strip_model()->GetActiveWebContents(); |
+#if defined(ENABLE_FULL_PRINTING) |
printing::PrintViewManager* print_view_manager = |
printing::PrintViewManager::FromWebContents(contents); |
- |
-#if defined(ENABLE_FULL_PRINTING) |
- if (!browser->profile()->GetPrefs()->GetBoolean( |
- prefs::kPrintPreviewDisabled)) { |
- print_view_manager->PrintPreviewNow(false); |
- return; |
- } |
-#endif // ENABLE_FULL_PRINTING |
- |
-#if !defined(DISABLE_BASIC_PRINTING) |
+ print_view_manager->PrintPreviewNow(false); |
+#else |
+ printing::PrintViewManagerBasic* print_view_manager = |
+ printing::PrintViewManagerBasic::FromWebContents(contents); |
print_view_manager->PrintNow(); |
-#endif // DISABLE_BASIC_PRINTING |
- |
+#endif // defined(ENABLE_FULL_PRINTING) |
#endif // defined(ENABLE_PRINTING) |
} |