OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/print_preview_handler.h" | 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 base::Value(preview_uid), base::Value(preview_response_id)); | 1587 base::Value(preview_uid), base::Value(preview_response_id)); |
1588 } | 1588 } |
1589 | 1589 |
1590 void PrintPreviewHandler::OnPrintPreviewCancelled() { | 1590 void PrintPreviewHandler::OnPrintPreviewCancelled() { |
1591 CHECK(!preview_callbacks_.empty()); | 1591 CHECK(!preview_callbacks_.empty()); |
1592 RejectJavascriptCallback(base::Value(preview_callbacks_.front()), | 1592 RejectJavascriptCallback(base::Value(preview_callbacks_.front()), |
1593 base::Value("CANCELLED")); | 1593 base::Value("CANCELLED")); |
1594 preview_callbacks_.pop(); | 1594 preview_callbacks_.pop(); |
1595 } | 1595 } |
1596 | 1596 |
| 1597 void PrintPreviewHandler::OnPrintRequestCancelled() { |
| 1598 HandleCancelPendingPrintRequest(nullptr); |
| 1599 } |
| 1600 |
1597 #if BUILDFLAG(ENABLE_BASIC_PRINT_DIALOG) | 1601 #if BUILDFLAG(ENABLE_BASIC_PRINT_DIALOG) |
1598 void PrintPreviewHandler::ShowSystemDialog() { | 1602 void PrintPreviewHandler::ShowSystemDialog() { |
1599 HandleShowSystemDialog(NULL); | 1603 HandleShowSystemDialog(NULL); |
1600 } | 1604 } |
1601 #endif | 1605 #endif |
1602 | 1606 |
1603 void PrintPreviewHandler::FileSelected(const base::FilePath& path, | 1607 void PrintPreviewHandler::FileSelected(const base::FilePath& path, |
1604 int /* index */, | 1608 int /* index */, |
1605 void* /* params */) { | 1609 void* /* params */) { |
1606 // Update downloads location and save sticky settings. | 1610 // Update downloads location and save sticky settings. |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1952 | 1956 |
1953 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { | 1957 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { |
1954 if (gaia_cookie_manager_service_) | 1958 if (gaia_cookie_manager_service_) |
1955 gaia_cookie_manager_service_->RemoveObserver(this); | 1959 gaia_cookie_manager_service_->RemoveObserver(this); |
1956 } | 1960 } |
1957 | 1961 |
1958 void PrintPreviewHandler::SetPdfSavedClosureForTesting( | 1962 void PrintPreviewHandler::SetPdfSavedClosureForTesting( |
1959 const base::Closure& closure) { | 1963 const base::Closure& closure) { |
1960 pdf_file_saved_closure_ = closure; | 1964 pdf_file_saved_closure_ = closure; |
1961 } | 1965 } |
OLD | NEW |