| 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 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 } | 859 } |
| 860 | 860 |
| 861 select_file_dialog_ = ui::SelectFileDialog::Create( | 861 select_file_dialog_ = ui::SelectFileDialog::Create( |
| 862 this, new ChromeSelectFilePolicy(preview_web_contents())), | 862 this, new ChromeSelectFilePolicy(preview_web_contents())), |
| 863 select_file_dialog_->SelectFile( | 863 select_file_dialog_->SelectFile( |
| 864 ui::SelectFileDialog::SELECT_SAVEAS_FILE, | 864 ui::SelectFileDialog::SELECT_SAVEAS_FILE, |
| 865 string16(), | 865 string16(), |
| 866 sticky_settings->save_path()->Append(default_filename), | 866 sticky_settings->save_path()->Append(default_filename), |
| 867 &file_type_info, | 867 &file_type_info, |
| 868 0, | 868 0, |
| 869 FILE_PATH_LITERAL(std::string()), | 869 base::FilePath::StringType(), |
| 870 platform_util::GetTopLevel( | 870 platform_util::GetTopLevel( |
| 871 preview_web_contents()->GetView()->GetNativeView()), | 871 preview_web_contents()->GetView()->GetNativeView()), |
| 872 NULL); | 872 NULL); |
| 873 } | 873 } |
| 874 | 874 |
| 875 void PrintPreviewHandler::OnPrintPreviewDialogDestroyed() { | 875 void PrintPreviewHandler::OnPrintPreviewDialogDestroyed() { |
| 876 WebContents* initiator_tab = GetInitiatorTab(); | 876 WebContents* initiator_tab = GetInitiatorTab(); |
| 877 if (!initiator_tab) | 877 if (!initiator_tab) |
| 878 return; | 878 return; |
| 879 | 879 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 // Nothing to print, no preview available. | 964 // Nothing to print, no preview available. |
| 965 return false; | 965 return false; |
| 966 } | 966 } |
| 967 DCHECK(tmp_data->size() && tmp_data->front()); | 967 DCHECK(tmp_data->size() && tmp_data->front()); |
| 968 | 968 |
| 969 *data = tmp_data; | 969 *data = tmp_data; |
| 970 *title = print_preview_ui->initiator_tab_title(); | 970 *title = print_preview_ui->initiator_tab_title(); |
| 971 return true; | 971 return true; |
| 972 } | 972 } |
| 973 | 973 |
| OLD | NEW |