| 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_ui.h" | 5 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 using content::WebContents; | 55 using content::WebContents; |
| 56 using printing::PageSizeMargins; | 56 using printing::PageSizeMargins; |
| 57 | 57 |
| 58 namespace { | 58 namespace { |
| 59 | 59 |
| 60 #if defined(OS_MACOSX) | 60 #if defined(OS_MACOSX) |
| 61 // U+0028 U+21E7 U+2318 U+0050 U+0029 in UTF8 | 61 // U+0028 U+21E7 U+2318 U+0050 U+0029 in UTF8 |
| 62 const char kBasicPrintShortcut[] = "\x28\xE2\x8c\xA5\xE2\x8C\x98\x50\x29"; | 62 const char kBasicPrintShortcut[] = "\x28\xE2\x8c\xA5\xE2\x8C\x98\x50\x29"; |
| 63 #elif defined(OS_WIN) || defined(OS_CHROMEOS) | 63 #else |
| 64 const char kBasicPrintShortcut[] = "(Ctrl+Shift+P)"; | 64 const char kBasicPrintShortcut[] = "(Ctrl+Shift+P)"; |
| 65 #else | |
| 66 const char kBasicPrintShortcut[] = "(Shift+Ctrl+P)"; | |
| 67 #endif | 65 #endif |
| 68 | 66 |
| 69 // Thread-safe wrapper around a std::map to keep track of mappings from | 67 // Thread-safe wrapper around a std::map to keep track of mappings from |
| 70 // PrintPreviewUI IDs to most recent print preview request IDs. | 68 // PrintPreviewUI IDs to most recent print preview request IDs. |
| 71 class PrintPreviewRequestIdMapWithLock { | 69 class PrintPreviewRequestIdMapWithLock { |
| 72 public: | 70 public: |
| 73 PrintPreviewRequestIdMapWithLock() {} | 71 PrintPreviewRequestIdMapWithLock() {} |
| 74 ~PrintPreviewRequestIdMapWithLock() {} | 72 ~PrintPreviewRequestIdMapWithLock() {} |
| 75 | 73 |
| 76 // Gets the value for |preview_id|. | 74 // Gets the value for |preview_id|. |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 } | 681 } |
| 684 | 682 |
| 685 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { | 683 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { |
| 686 handler_->FileSelected(path, 0, NULL); | 684 handler_->FileSelected(path, 0, NULL); |
| 687 } | 685 } |
| 688 | 686 |
| 689 void PrintPreviewUI::SetPdfSavedClosureForTesting( | 687 void PrintPreviewUI::SetPdfSavedClosureForTesting( |
| 690 const base::Closure& closure) { | 688 const base::Closure& closure) { |
| 691 handler_->SetPdfSavedClosureForTesting(closure); | 689 handler_->SetPdfSavedClosureForTesting(closure); |
| 692 } | 690 } |
| OLD | NEW |