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

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

Issue 7740025: Cancel the pending print preview request when the user request to show the system dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' 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
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 void PrintPreviewUI::OnTabDestroyed() { 214 void PrintPreviewUI::OnTabDestroyed() {
215 handler_->OnTabDestroyed(); 215 handler_->OnTabDestroyed();
216 } 216 }
217 217
218 void PrintPreviewUI::OnFileSelectionCancelled() { 218 void PrintPreviewUI::OnFileSelectionCancelled() {
219 CallJavascriptFunction("fileSelectionCancelled"); 219 CallJavascriptFunction("fileSelectionCancelled");
220 } 220 }
221 221
222 void PrintPreviewUI::OnCancelPendingPreviewRequest() {
223 g_print_preview_request_id_map.Get().Set(preview_ui_addr_str_, -1);
224 }
225
222 void PrintPreviewUI::OnPrintPreviewFailed() { 226 void PrintPreviewUI::OnPrintPreviewFailed() {
223 CallJavascriptFunction("printPreviewFailed"); 227 CallJavascriptFunction("printPreviewFailed");
224 } 228 }
225 229
226 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() { 230 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() {
227 return PrintPreviewDataService::GetInstance(); 231 return PrintPreviewDataService::GetInstance();
228 } 232 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698