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

Side by Side Diff: chrome/browser/ui/webui/print_preview_handler.cc

Issue 7721001: PrintPreview: Make ctrl-shift-p start the native print flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + merge conflicts fix Created 9 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 | Annotate | Revision Log
OLDNEW
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_handler.h" 5 #include "chrome/browser/ui/webui/print_preview_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #if !defined(OS_CHROMEOS) 10 #if !defined(OS_CHROMEOS)
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 wrapper->print_view_manager()->set_observer(NULL); 888 wrapper->print_view_manager()->set_observer(NULL);
889 } 889 }
890 890
891 void PrintPreviewHandler::OnPrintPreviewFailed() { 891 void PrintPreviewHandler::OnPrintPreviewFailed() {
892 if (reported_failed_preview_) 892 if (reported_failed_preview_)
893 return; 893 return;
894 reported_failed_preview_ = true; 894 reported_failed_preview_ = true;
895 ReportUserActionHistogram(PREVIEW_FAILED); 895 ReportUserActionHistogram(PREVIEW_FAILED);
896 } 896 }
897 897
898 void PrintPreviewHandler::ShowSystemDialog() {
899 HandleShowSystemDialog(NULL);
900 }
901
898 void PrintPreviewHandler::FileSelected(const FilePath& path, 902 void PrintPreviewHandler::FileSelected(const FilePath& path,
899 int index, void* params) { 903 int index, void* params) {
900 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(web_ui_); 904 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(web_ui_);
901 scoped_refptr<RefCountedBytes> data; 905 scoped_refptr<RefCountedBytes> data;
902 print_preview_ui->GetPrintPreviewDataForIndex( 906 print_preview_ui->GetPrintPreviewDataForIndex(
903 printing::COMPLETE_PREVIEW_DOCUMENT_INDEX, &data); 907 printing::COMPLETE_PREVIEW_DOCUMENT_INDEX, &data);
904 if (!data.get()) { 908 if (!data.get()) {
905 NOTREACHED(); 909 NOTREACHED();
906 return; 910 return;
907 } 911 }
(...skipping 29 matching lines...) Expand all
937 return; 941 return;
938 942
939 // We no longer require the initiator tab details. Remove those details 943 // We no longer require the initiator tab details. Remove those details
940 // associated with the preview tab to allow the initiator tab to create 944 // associated with the preview tab to allow the initiator tab to create
941 // another preview tab. 945 // another preview tab.
942 printing::PrintPreviewTabController* tab_controller = 946 printing::PrintPreviewTabController* tab_controller =
943 printing::PrintPreviewTabController::GetInstance(); 947 printing::PrintPreviewTabController::GetInstance();
944 if (tab_controller) 948 if (tab_controller)
945 tab_controller->EraseInitiatorTabInfo(preview_tab()); 949 tab_controller->EraseInitiatorTabInfo(preview_tab());
946 } 950 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698