| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/print_preview_ui.h" | 5 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/printing/background_printing_manager.h" | 15 #include "chrome/browser/printing/background_printing_manager.h" |
| 16 #include "chrome/browser/printing/print_preview_data_service.h" | 16 #include "chrome/browser/printing/print_preview_data_service.h" |
| 17 #include "chrome/browser/printing/print_preview_tab_controller.h" | 17 #include "chrome/browser/printing/print_preview_tab_controller.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 20 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 20 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
| 21 #include "chrome/browser/ui/webui/print_preview_data_source.h" | 21 #include "chrome/browser/ui/webui/print_preview/print_preview_data_source.h" |
| 22 #include "chrome/browser/ui/webui/print_preview_handler.h" | 22 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h" |
| 23 #include "chrome/common/print_messages.h" | 23 #include "chrome/common/print_messages.h" |
| 24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
| 25 #include "printing/page_size_margins.h" | 25 #include "printing/page_size_margins.h" |
| 26 #include "printing/print_job_constants.h" | 26 #include "printing/print_job_constants.h" |
| 27 | 27 |
| 28 using content::WebContents; | 28 using content::WebContents; |
| 29 using printing::PageSizeMargins; | 29 using printing::PageSizeMargins; |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 ConstrainedHtmlUIDelegate* delegate = GetConstrainedDelegate(); | 305 ConstrainedHtmlUIDelegate* delegate = GetConstrainedDelegate(); |
| 306 if (!delegate) | 306 if (!delegate) |
| 307 return; | 307 return; |
| 308 delegate->GetHtmlDialogUIDelegate()->OnDialogClosed(""); | 308 delegate->GetHtmlDialogUIDelegate()->OnDialogClosed(""); |
| 309 delegate->OnDialogCloseFromWebUI(); | 309 delegate->OnDialogCloseFromWebUI(); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void PrintPreviewUI::OnReloadPrintersList() { | 312 void PrintPreviewUI::OnReloadPrintersList() { |
| 313 CallJavascriptFunction("reloadPrintersList"); | 313 CallJavascriptFunction("reloadPrintersList"); |
| 314 } | 314 } |
| OLD | NEW |