Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1625)

Unified Diff: chrome/browser/automation/automation_util.cc

Issue 22577010: Printing: Add a basic printing mode without print preview and cloud print. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_util.cc
diff --git a/chrome/browser/automation/automation_util.cc b/chrome/browser/automation/automation_util.cc
index f482544f32dd22c226f93e8c29b93d58509ffc65..33131861912756bc4edf71546c10ea696ceb624d 100644
--- a/chrome/browser/automation/automation_util.cc
+++ b/chrome/browser/automation/automation_util.cc
@@ -20,7 +20,6 @@
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
-#include "chrome/browser/printing/print_preview_dialog_controller.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_id.h"
#include "chrome/browser/sessions/session_tab_helper.h"
@@ -52,6 +51,10 @@
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#endif
+#if defined(ENABLE_FULL_PRINTING)
+#include "chrome/browser/printing/print_preview_dialog_controller.h"
+#endif
+
using content::BrowserThread;
using content::RenderViewHost;
using content::WebContents;
@@ -517,8 +520,10 @@ bool GetTabForId(const AutomationId& id, WebContents** tab) {
if (id.type() != AutomationId::kTypeTab)
return false;
+#if defined(ENABLE_FULL_PRINTING)
printing::PrintPreviewDialogController* preview_controller =
printing::PrintPreviewDialogController::GetInstance();
+#endif
for (chrome::BrowserIterator it; !it.done(); it.Next()) {
Browser* browser = *it;
for (int tab_index = 0;
@@ -533,6 +538,8 @@ bool GetTabForId(const AutomationId& id, WebContents** tab) {
*tab = web_contents;
return true;
}
+
+#if defined(ENABLE_FULL_PRINTING)
if (preview_controller) {
WebContents* print_preview_contents =
preview_controller->GetPrintPreviewForContents(web_contents);
@@ -547,6 +554,7 @@ bool GetTabForId(const AutomationId& id, WebContents** tab) {
}
}
}
+#endif
}
}
return false;
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698