| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 } | 221 } |
| 222 | 222 |
| 223 void PrintPreviewUI::OnTabDestroyed() { | 223 void PrintPreviewUI::OnTabDestroyed() { |
| 224 handler_->OnTabDestroyed(); | 224 handler_->OnTabDestroyed(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void PrintPreviewUI::OnFileSelectionCancelled() { | 227 void PrintPreviewUI::OnFileSelectionCancelled() { |
| 228 CallJavascriptFunction("fileSelectionCancelled"); | 228 CallJavascriptFunction("fileSelectionCancelled"); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void PrintPreviewUI::OnFileSelectionCompleted() { |
| 232 CallJavascriptFunction("fileSelectionCompleted"); |
| 233 } |
| 234 |
| 231 void PrintPreviewUI::OnCancelPendingPreviewRequest() { | 235 void PrintPreviewUI::OnCancelPendingPreviewRequest() { |
| 232 g_print_preview_request_id_map.Get().Set(preview_ui_addr_str_, -1); | 236 g_print_preview_request_id_map.Get().Set(preview_ui_addr_str_, -1); |
| 233 } | 237 } |
| 234 | 238 |
| 235 void PrintPreviewUI::OnPrintPreviewFailed() { | 239 void PrintPreviewUI::OnPrintPreviewFailed() { |
| 236 handler_->OnPrintPreviewFailed(); | 240 handler_->OnPrintPreviewFailed(); |
| 237 CallJavascriptFunction("printPreviewFailed"); | 241 CallJavascriptFunction("printPreviewFailed"); |
| 238 } | 242 } |
| 239 | 243 |
| 240 void PrintPreviewUI::OnInvalidPrinterSettings() { | 244 void PrintPreviewUI::OnInvalidPrinterSettings() { |
| 241 CallJavascriptFunction("invalidPrinterSettings"); | 245 CallJavascriptFunction("invalidPrinterSettings"); |
| 242 } | 246 } |
| 243 | 247 |
| 244 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() { | 248 PrintPreviewDataService* PrintPreviewUI::print_preview_data_service() { |
| 245 return PrintPreviewDataService::GetInstance(); | 249 return PrintPreviewDataService::GetInstance(); |
| 246 } | 250 } |
| OLD | NEW |