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

Side by Side Diff: chrome/browser/ui/webui/print_preview_ui.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, 4 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_ui.h" 5 #include "chrome/browser/ui/webui/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/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 void PrintPreviewUI::OnInitiatorTabClosed() { 140 void PrintPreviewUI::OnInitiatorTabClosed() {
141 StringValue initiator_tab_url(initiator_url_); 141 StringValue initiator_tab_url(initiator_url_);
142 CallJavascriptFunction("onInitiatorTabClosed", initiator_tab_url); 142 CallJavascriptFunction("onInitiatorTabClosed", initiator_tab_url);
143 } 143 }
144 144
145 void PrintPreviewUI::OnPrintPreviewRequest(int request_id) { 145 void PrintPreviewUI::OnPrintPreviewRequest(int request_id) {
146 g_print_preview_request_id_map.Get().Set(preview_ui_addr_str_, request_id); 146 g_print_preview_request_id_map.Get().Set(preview_ui_addr_str_, request_id);
147 } 147 }
148 148
149 void PrintPreviewUI::OnShowSystemDialog() {
150 CallJavascriptFunction("onSystemDialogLinkClicked");
151 }
152
149 void PrintPreviewUI::OnDidGetPreviewPageCount( 153 void PrintPreviewUI::OnDidGetPreviewPageCount(
150 const PrintHostMsg_DidGetPreviewPageCount_Params& params) { 154 const PrintHostMsg_DidGetPreviewPageCount_Params& params) {
151 DCHECK_GT(params.page_count, 0); 155 DCHECK_GT(params.page_count, 0);
152 base::FundamentalValue count(params.page_count); 156 base::FundamentalValue count(params.page_count);
153 base::FundamentalValue modifiable(params.is_modifiable); 157 base::FundamentalValue modifiable(params.is_modifiable);
154 base::FundamentalValue request_id(params.preview_request_id); 158 base::FundamentalValue request_id(params.preview_request_id);
155 StringValue title(initiator_tab_title_); 159 StringValue title(initiator_tab_title_);
156 CallJavascriptFunction("onDidGetPreviewPageCount", count, modifiable, 160 CallJavascriptFunction("onDidGetPreviewPageCount", count, modifiable,
157 request_id, title); 161 request_id, title);
158 } 162 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 228 }
225 229
226 void PrintPreviewUI::OnPrintPreviewFailed() { 230 void PrintPreviewUI::OnPrintPreviewFailed() {
227 handler_->OnPrintPreviewFailed(); 231 handler_->OnPrintPreviewFailed();
228 CallJavascriptFunction("printPreviewFailed"); 232 CallJavascriptFunction("printPreviewFailed");
229 } 233 }
230 234
231 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() { 235 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() {
232 return PrintPreviewDataService::GetInstance(); 236 return PrintPreviewDataService::GetInstance();
233 } 237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698