| 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;
|
|
|