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 | 8 |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 source->AddLocalizedString("defaultMargins", | 265 source->AddLocalizedString("defaultMargins", |
266 IDS_PRINT_PREVIEW_DEFAULT_MARGINS); | 266 IDS_PRINT_PREVIEW_DEFAULT_MARGINS); |
267 source->AddLocalizedString("noMargins", IDS_PRINT_PREVIEW_NO_MARGINS); | 267 source->AddLocalizedString("noMargins", IDS_PRINT_PREVIEW_NO_MARGINS); |
268 source->AddLocalizedString("customMargins", IDS_PRINT_PREVIEW_CUSTOM_MARGINS); | 268 source->AddLocalizedString("customMargins", IDS_PRINT_PREVIEW_CUSTOM_MARGINS); |
269 source->AddLocalizedString("minimumMargins", | 269 source->AddLocalizedString("minimumMargins", |
270 IDS_PRINT_PREVIEW_MINIMUM_MARGINS); | 270 IDS_PRINT_PREVIEW_MINIMUM_MARGINS); |
271 source->AddLocalizedString("top", IDS_PRINT_PREVIEW_TOP_MARGIN_LABEL); | 271 source->AddLocalizedString("top", IDS_PRINT_PREVIEW_TOP_MARGIN_LABEL); |
272 source->AddLocalizedString("bottom", IDS_PRINT_PREVIEW_BOTTOM_MARGIN_LABEL); | 272 source->AddLocalizedString("bottom", IDS_PRINT_PREVIEW_BOTTOM_MARGIN_LABEL); |
273 source->AddLocalizedString("left", IDS_PRINT_PREVIEW_LEFT_MARGIN_LABEL); | 273 source->AddLocalizedString("left", IDS_PRINT_PREVIEW_LEFT_MARGIN_LABEL); |
274 source->AddLocalizedString("right", IDS_PRINT_PREVIEW_RIGHT_MARGIN_LABEL); | 274 source->AddLocalizedString("right", IDS_PRINT_PREVIEW_RIGHT_MARGIN_LABEL); |
| 275 source->AddLocalizedString("mediaSizeLabel", |
| 276 IDS_PRINT_PREVIEW_MEDIA_SIZE_LABEL); |
275 source->AddLocalizedString("destinationSearchTitle", | 277 source->AddLocalizedString("destinationSearchTitle", |
276 IDS_PRINT_PREVIEW_DESTINATION_SEARCH_TITLE); | 278 IDS_PRINT_PREVIEW_DESTINATION_SEARCH_TITLE); |
277 source->AddLocalizedString("userInfo", IDS_PRINT_PREVIEW_USER_INFO); | 279 source->AddLocalizedString("userInfo", IDS_PRINT_PREVIEW_USER_INFO); |
278 source->AddLocalizedString("accountSelectTitle", | 280 source->AddLocalizedString("accountSelectTitle", |
279 IDS_PRINT_PREVIEW_ACCOUNT_SELECT_TITLE); | 281 IDS_PRINT_PREVIEW_ACCOUNT_SELECT_TITLE); |
280 source->AddLocalizedString("addAccountTitle", | 282 source->AddLocalizedString("addAccountTitle", |
281 IDS_PRINT_PREVIEW_ADD_ACCOUNT_TITLE); | 283 IDS_PRINT_PREVIEW_ADD_ACCOUNT_TITLE); |
282 source->AddLocalizedString("cloudPrintPromotion", | 284 source->AddLocalizedString("cloudPrintPromotion", |
283 IDS_PRINT_PREVIEW_CLOUD_PRINT_PROMOTION); | 285 IDS_PRINT_PREVIEW_CLOUD_PRINT_PROMOTION); |
284 source->AddLocalizedString("searchBoxPlaceholder", | 286 source->AddLocalizedString("searchBoxPlaceholder", |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 } | 603 } |
602 | 604 |
603 void PrintPreviewUI::OnPrintPreviewScalingDisabled() { | 605 void PrintPreviewUI::OnPrintPreviewScalingDisabled() { |
604 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF"); | 606 web_ui()->CallJavascriptFunction("printScalingDisabledForSourcePDF"); |
605 } | 607 } |
606 | 608 |
607 // static | 609 // static |
608 void PrintPreviewUI::SetDelegateForTesting(TestingDelegate* delegate) { | 610 void PrintPreviewUI::SetDelegateForTesting(TestingDelegate* delegate) { |
609 g_testing_delegate = delegate; | 611 g_testing_delegate = delegate; |
610 } | 612 } |
OLD | NEW |