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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Issue 388783003: Add support to send print preset options in one message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for Android trybot failure Created 6 years, 5 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 unified diff | Download patch
OLDNEW
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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 if (!delegate) 602 if (!delegate)
603 return; 603 return;
604 delegate->GetWebDialogDelegate()->OnDialogClosed(std::string()); 604 delegate->GetWebDialogDelegate()->OnDialogClosed(std::string());
605 delegate->OnDialogCloseFromWebUI(); 605 delegate->OnDialogCloseFromWebUI();
606 } 606 }
607 607
608 void PrintPreviewUI::OnReloadPrintersList() { 608 void PrintPreviewUI::OnReloadPrintersList() {
609 web_ui()->CallJavascriptFunction("reloadPrintersList"); 609 web_ui()->CallJavascriptFunction("reloadPrintersList");
610 } 610 }
611 611
612 void PrintPreviewUI::OnPrintPreviewScalingDisabled() { 612 void PrintPreviewUI::OnSetOptionsFromDocument(
613 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF"); 613 const PrintHostMsg_SetOptionsFromDocument_Params& params) {
614 // Notify WebUI that print scaling is disabled
615 if (params.is_scaling_disabled)
616 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF");
614 } 617 }
615 618
616 // static 619 // static
617 void PrintPreviewUI::SetDelegateForTesting(TestingDelegate* delegate) { 620 void PrintPreviewUI::SetDelegateForTesting(TestingDelegate* delegate) {
618 g_testing_delegate = delegate; 621 g_testing_delegate = delegate;
619 } 622 }
620 623
621 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { 624 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) {
622 handler_->FileSelected(path, 0, NULL); 625 handler_->FileSelected(path, 0, NULL);
623 } 626 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui.h ('k') | chrome/common/chrome_utility_printing_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698