Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 | 225 |
| 226 void PrintPreviewUI::OnCancelPendingPreviewRequest() { | 226 void PrintPreviewUI::OnCancelPendingPreviewRequest() { |
| 227 g_print_preview_request_id_map.Get().Set(preview_ui_addr_str_, -1); | 227 g_print_preview_request_id_map.Get().Set(preview_ui_addr_str_, -1); |
| 228 } | 228 } |
| 229 | 229 |
| 230 void PrintPreviewUI::OnPrintPreviewFailed() { | 230 void PrintPreviewUI::OnPrintPreviewFailed() { |
| 231 handler_->OnPrintPreviewFailed(); | 231 handler_->OnPrintPreviewFailed(); |
| 232 CallJavascriptFunction("printPreviewFailed"); | 232 CallJavascriptFunction("printPreviewFailed"); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void PrintPreviewUI::OnInvalidPrinterSettings(bool show_alert_dialog) { | |
|
kmadhusu
2011/08/30 02:11:27
As I said earlier, |show_alert_dialog| is not requ
arthurhsu
2011/08/30 20:43:03
Done.
| |
| 236 if (show_alert_dialog) { | |
| 237 CallJavascriptFunction("invalidPrinterSettingsAlert"); | |
| 238 } else { | |
| 239 CallJavascriptFunction("invalidPrinterSettings"); | |
| 240 } | |
| 241 } | |
| 242 | |
| 235 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() { | 243 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() { |
| 236 return PrintPreviewDataService::GetInstance(); | 244 return PrintPreviewDataService::GetInstance(); |
| 237 } | 245 } |
| OLD | NEW |