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

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: '' 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 void PrintPreviewUI::OnInitiatorTabClosed() { 137 void PrintPreviewUI::OnInitiatorTabClosed() {
138 StringValue initiator_tab_url(initiator_url_); 138 StringValue initiator_tab_url(initiator_url_);
139 CallJavascriptFunction("onInitiatorTabClosed", initiator_tab_url); 139 CallJavascriptFunction("onInitiatorTabClosed", initiator_tab_url);
140 } 140 }
141 141
142 void PrintPreviewUI::OnPrintPreviewRequest(int request_id) { 142 void PrintPreviewUI::OnPrintPreviewRequest(int request_id) {
143 g_print_preview_request_id_map.Get().Set(preview_ui_addr_str_, request_id); 143 g_print_preview_request_id_map.Get().Set(preview_ui_addr_str_, request_id);
144 } 144 }
145 145
146 void PrintPreviewUI::OnShowSystemDialog() {
147 CallJavascriptFunction("onSystemDialogLinkClicked");
148 }
149
146 void PrintPreviewUI::OnDidGetPreviewPageCount( 150 void PrintPreviewUI::OnDidGetPreviewPageCount(
147 const PrintHostMsg_DidGetPreviewPageCount_Params& params) { 151 const PrintHostMsg_DidGetPreviewPageCount_Params& params) {
148 DCHECK_GT(params.page_count, 0); 152 DCHECK_GT(params.page_count, 0);
149 base::FundamentalValue count(params.page_count); 153 base::FundamentalValue count(params.page_count);
150 base::FundamentalValue modifiable(params.is_modifiable); 154 base::FundamentalValue modifiable(params.is_modifiable);
151 base::FundamentalValue request_id(params.preview_request_id); 155 base::FundamentalValue request_id(params.preview_request_id);
152 StringValue title(initiator_tab_title_); 156 StringValue title(initiator_tab_title_);
153 CallJavascriptFunction("onDidGetPreviewPageCount", count, modifiable, 157 CallJavascriptFunction("onDidGetPreviewPageCount", count, modifiable,
154 request_id, title); 158 request_id, title);
155 } 159 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 CallJavascriptFunction("fileSelectionCancelled"); 200 CallJavascriptFunction("fileSelectionCancelled");
197 } 201 }
198 202
199 void PrintPreviewUI::OnPrintPreviewFailed() { 203 void PrintPreviewUI::OnPrintPreviewFailed() {
200 CallJavascriptFunction("printPreviewFailed"); 204 CallJavascriptFunction("printPreviewFailed");
201 } 205 }
202 206
203 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() { 207 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() {
204 return PrintPreviewDataService::GetInstance(); 208 return PrintPreviewDataService::GetInstance();
205 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698