| 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 #include <vector> | 10 #include <vector> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #include "unicode/ulocdata.h" | 57 #include "unicode/ulocdata.h" |
| 58 | 58 |
| 59 #if !defined(OS_MACOSX) | 59 #if !defined(OS_MACOSX) |
| 60 #include "base/command_line.h" | 60 #include "base/command_line.h" |
| 61 #include "chrome/common/chrome_switches.h" | 61 #include "chrome/common/chrome_switches.h" |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 using content::BrowserThread; | 64 using content::BrowserThread; |
| 65 using content::NavigationEntry; | 65 using content::NavigationEntry; |
| 66 using content::OpenURLParams; | 66 using content::OpenURLParams; |
| 67 using content::RenderViewHost; |
| 67 using content::Referrer; | 68 using content::Referrer; |
| 68 using content::WebContents; | 69 using content::WebContents; |
| 69 using printing::Metafile; | 70 using printing::Metafile; |
| 70 | 71 |
| 71 namespace { | 72 namespace { |
| 72 | 73 |
| 73 enum UserActionBuckets { | 74 enum UserActionBuckets { |
| 74 PRINT_TO_PRINTER, | 75 PRINT_TO_PRINTER, |
| 75 PRINT_TO_PDF, | 76 PRINT_TO_PDF, |
| 76 CANCEL, | 77 CANCEL, |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 return; | 863 return; |
| 863 | 864 |
| 864 // We no longer require the initiator tab details. Remove those details | 865 // We no longer require the initiator tab details. Remove those details |
| 865 // associated with the preview tab to allow the initiator tab to create | 866 // associated with the preview tab to allow the initiator tab to create |
| 866 // another preview tab. | 867 // another preview tab. |
| 867 printing::PrintPreviewTabController* tab_controller = | 868 printing::PrintPreviewTabController* tab_controller = |
| 868 printing::PrintPreviewTabController::GetInstance(); | 869 printing::PrintPreviewTabController::GetInstance(); |
| 869 if (tab_controller) | 870 if (tab_controller) |
| 870 tab_controller->EraseInitiatorTabInfo(preview_tab_wrapper()); | 871 tab_controller->EraseInitiatorTabInfo(preview_tab_wrapper()); |
| 871 } | 872 } |
| OLD | NEW |