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

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

Issue 546373002: Revert of More System Dialog printing code disabled on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@522493002
Patch Set: Mon Sep 8 00:14:11 PDT 2014 Created 6 years, 3 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 #include <vector> 8 #include <vector>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } 477 }
478 478
479 void PrintPreviewUI::OnPrintPreviewRequest(int request_id) { 479 void PrintPreviewUI::OnPrintPreviewRequest(int request_id) {
480 if (!initial_preview_start_time_.is_null()) { 480 if (!initial_preview_start_time_.is_null()) {
481 UMA_HISTOGRAM_TIMES("PrintPreview.InitializationTime", 481 UMA_HISTOGRAM_TIMES("PrintPreview.InitializationTime",
482 base::TimeTicks::Now() - initial_preview_start_time_); 482 base::TimeTicks::Now() - initial_preview_start_time_);
483 } 483 }
484 g_print_preview_request_id_map.Get().Set(id_, request_id); 484 g_print_preview_request_id_map.Get().Set(id_, request_id);
485 } 485 }
486 486
487 #if !defined(OS_WIN)
488 void PrintPreviewUI::OnShowSystemDialog() { 487 void PrintPreviewUI::OnShowSystemDialog() {
489 web_ui()->CallJavascriptFunction("onSystemDialogLinkClicked"); 488 web_ui()->CallJavascriptFunction("onSystemDialogLinkClicked");
490 } 489 }
491 #endif // !OS_WIN
492 490
493 void PrintPreviewUI::OnDidGetPreviewPageCount( 491 void PrintPreviewUI::OnDidGetPreviewPageCount(
494 const PrintHostMsg_DidGetPreviewPageCount_Params& params) { 492 const PrintHostMsg_DidGetPreviewPageCount_Params& params) {
495 DCHECK_GT(params.page_count, 0); 493 DCHECK_GT(params.page_count, 0);
496 if (g_testing_delegate) 494 if (g_testing_delegate)
497 g_testing_delegate->DidGetPreviewPageCount(params.page_count); 495 g_testing_delegate->DidGetPreviewPageCount(params.page_count);
498 base::FundamentalValue count(params.page_count); 496 base::FundamentalValue count(params.page_count);
499 base::FundamentalValue request_id(params.preview_request_id); 497 base::FundamentalValue request_id(params.preview_request_id);
500 web_ui()->CallJavascriptFunction("onDidGetPreviewPageCount", 498 web_ui()->CallJavascriptFunction("onDidGetPreviewPageCount",
501 count, 499 count,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 } 633 }
636 634
637 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { 635 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) {
638 handler_->FileSelected(path, 0, NULL); 636 handler_->FileSelected(path, 0, NULL);
639 } 637 }
640 638
641 void PrintPreviewUI::SetPdfSavedClosureForTesting( 639 void PrintPreviewUI::SetPdfSavedClosureForTesting(
642 const base::Closure& closure) { 640 const base::Closure& closure) {
643 handler_->SetPdfSavedClosureForTesting(closure); 641 handler_->SetPdfSavedClosureForTesting(closure);
644 } 642 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui.h ('k') | chrome/common/print_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698