| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/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/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 16 #include "chrome/browser/printing/background_printing_manager.h" | 16 #include "chrome/browser/printing/background_printing_manager.h" |
| 17 #include "chrome/browser/printing/print_preview_data_service.h" | 17 #include "chrome/browser/printing/print_preview_data_service.h" |
| 18 #include "chrome/browser/printing/print_preview_tab_controller.h" | 18 #include "chrome/browser/printing/print_preview_tab_controller.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 20 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 21 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 21 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 22 #include "chrome/browser/ui/webui/web_dialog_delegate.h" | 22 #include "ui/web_dialogs/web_dialog_delegate.h" |
| 23 #include "chrome/browser/ui/webui/web_dialog_ui.h" | 23 #include "ui/web_dialogs/web_dialog_ui.h" |
| 24 #include "chrome/browser/ui/webui/print_preview/print_preview_data_source.h" | 24 #include "chrome/browser/ui/webui/print_preview/print_preview_data_source.h" |
| 25 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h" | 25 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h" |
| 26 #include "chrome/common/print_messages.h" | 26 #include "chrome/common/print_messages.h" |
| 27 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
| 28 #include "printing/page_size_margins.h" | 28 #include "printing/page_size_margins.h" |
| 29 #include "printing/print_job_constants.h" | 29 #include "printing/print_job_constants.h" |
| 30 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
| 31 | 31 |
| 32 using content::WebContents; | 32 using content::WebContents; |
| 33 using printing::PageSizeMargins; | 33 using printing::PageSizeMargins; |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 ConstrainedWebDialogDelegate* delegate = GetConstrainedDelegate(); | 324 ConstrainedWebDialogDelegate* delegate = GetConstrainedDelegate(); |
| 325 if (!delegate) | 325 if (!delegate) |
| 326 return; | 326 return; |
| 327 delegate->GetWebDialogDelegate()->OnDialogClosed(""); | 327 delegate->GetWebDialogDelegate()->OnDialogClosed(""); |
| 328 delegate->OnDialogCloseFromWebUI(); | 328 delegate->OnDialogCloseFromWebUI(); |
| 329 } | 329 } |
| 330 | 330 |
| 331 void PrintPreviewUI::OnReloadPrintersList() { | 331 void PrintPreviewUI::OnReloadPrintersList() { |
| 332 web_ui()->CallJavascriptFunction("reloadPrintersList"); | 332 web_ui()->CallJavascriptFunction("reloadPrintersList"); |
| 333 } | 333 } |
| OLD | NEW |