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

Unified Diff: chrome/browser/automation/testing_automation_provider.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/browser/automation/automation_util.cc ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 6bf6afaa11d106a76f9ebb2150b6eaa3a7d04b3f..f2c995d035be49833afe1ee7ce3d3609e98f5ed6 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -74,7 +74,6 @@
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/plugins/plugin_prefs.h"
-#include "chrome/browser/printing/print_preview_dialog_controller.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -166,6 +165,10 @@
#include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
#endif // !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
+#if defined(ENABLE_FULL_PRINTING)
+#include "chrome/browser/printing/print_preview_dialog_controller.h"
+#endif
+
using automation::Error;
using automation::ErrorCode;
using automation_util::SendErrorIfModalDialogActive;
@@ -5253,8 +5256,10 @@ void TestingAutomationProvider::GetTabIds(
void TestingAutomationProvider::GetViews(
DictionaryValue* args, IPC::Message* reply_message) {
ListValue* view_list = new ListValue();
+#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 i = 0; i < browser->tab_strip_model()->count(); ++i) {
@@ -5263,6 +5268,7 @@ void TestingAutomationProvider::GetViews(
AutomationId id = automation_util::GetIdForTab(contents);
dict->Set("auto_id", id.ToValue());
view_list->Append(dict);
+#if defined(ENABLE_FULL_PRINTING)
if (preview_controller) {
WebContents* preview_dialog =
preview_controller->GetPrintPreviewForContents(contents);
@@ -5273,6 +5279,7 @@ void TestingAutomationProvider::GetViews(
view_list->Append(dict);
}
}
+#endif
}
}
« no previous file with comments | « chrome/browser/automation/automation_util.cc ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698