| 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/id_map.h" | 9 #include "base/id_map.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 OnClosePrintPreviewDialog(); | 564 OnClosePrintPreviewDialog(); |
| 565 } | 565 } |
| 566 | 566 |
| 567 void PrintPreviewUI::OnClosePrintPreviewDialog() { | 567 void PrintPreviewUI::OnClosePrintPreviewDialog() { |
| 568 if (dialog_closed_) | 568 if (dialog_closed_) |
| 569 return; | 569 return; |
| 570 dialog_closed_ = true; | 570 dialog_closed_ = true; |
| 571 ConstrainedWebDialogDelegate* delegate = GetConstrainedDelegate(); | 571 ConstrainedWebDialogDelegate* delegate = GetConstrainedDelegate(); |
| 572 if (!delegate) | 572 if (!delegate) |
| 573 return; | 573 return; |
| 574 delegate->GetWebDialogDelegate()->OnDialogClosed(""); | 574 delegate->GetWebDialogDelegate()->OnDialogClosed(std::string()); |
| 575 delegate->OnDialogCloseFromWebUI(); | 575 delegate->OnDialogCloseFromWebUI(); |
| 576 } | 576 } |
| 577 | 577 |
| 578 void PrintPreviewUI::OnReloadPrintersList() { | 578 void PrintPreviewUI::OnReloadPrintersList() { |
| 579 web_ui()->CallJavascriptFunction("reloadPrintersList"); | 579 web_ui()->CallJavascriptFunction("reloadPrintersList"); |
| 580 } | 580 } |
| 581 | 581 |
| 582 void PrintPreviewUI::OnPrintPreviewScalingDisabled() { | 582 void PrintPreviewUI::OnPrintPreviewScalingDisabled() { |
| 583 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF"); | 583 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF"); |
| 584 } | 584 } |
| OLD | NEW |