forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CrOS Printing] Add advanced printing options.
This uses UI that already exists for Cloud Print to surface additional CUPS options. Bug: 964919 Change-Id: I82a0793318da6f904477318dc0aac75a8d6433c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578602 Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Sean Kau <skau@chromium.org> Commit-Queue: Vladislav Kuzkokov <vkuzkokov@chromium.org> Cr-Commit-Position: refs/heads/master@{#696348}
- Loading branch information
Vladislav Kuzkokov
authored and
Commit Bot
committed
Sep 13, 2019
1 parent
8613044
commit d4e4ff3
Showing
23 changed files
with
856 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "components/printing/browser/ipp_l10n.h" | ||
|
||
#include "base/no_destructor.h" | ||
#include "components/strings/grit/components_strings.h" | ||
|
||
// TODO(crbug.com/964919) generate from csv. | ||
const std::map<base::StringPiece, int>& CapabilityLocalizationMap() { | ||
static const base::NoDestructor<std::map<base::StringPiece, int>> l10n_map( | ||
{{"finishings/4", IDS_PRINT_FINISHINGS_STAPLE}, | ||
{"finishings/5", IDS_PRINT_FINISHINGS_PUNCH}, | ||
{"finishings/6", IDS_PRINT_FINISHINGS_COVER}, | ||
{"finishings/7", IDS_PRINT_FINISHINGS_BIND}, | ||
{"finishings/8", IDS_PRINT_FINISHINGS_SADDLE_STITCH}, | ||
{"finishings/9", IDS_PRINT_FINISHINGS_EDGE_STITCH}, | ||
{"finishings/10", IDS_PRINT_FINISHINGS_FOLD}, | ||
{"finishings/11", IDS_PRINT_FINISHINGS_TRIM}, | ||
{"finishings/12", IDS_PRINT_FINISHINGS_BALE}, | ||
{"finishings/13", IDS_PRINT_FINISHINGS_BOOKLET_MAKER}, | ||
{"finishings/14", IDS_PRINT_FINISHINGS_JOG_OFFSET}, | ||
{"finishings/15", IDS_PRINT_FINISHINGS_COAT}, | ||
{"finishings/16", IDS_PRINT_FINISHINGS_LAMINATE}, | ||
{"finishings/20", IDS_PRINT_FINISHINGS_STAPLE_TOP_LEFT}, | ||
{"finishings/21", IDS_PRINT_FINISHINGS_STAPLE_BOTTOM_LEFT}, | ||
{"finishings/22", IDS_PRINT_FINISHINGS_STAPLE_TOP_RIGHT}, | ||
{"finishings/23", IDS_PRINT_FINISHINGS_STAPLE_BOTTOM_RIGHT}, | ||
{"finishings/24", IDS_PRINT_FINISHINGS_EDGE_STITCH_LEFT}, | ||
{"finishings/25", IDS_PRINT_FINISHINGS_EDGE_STITCH_TOP}, | ||
{"finishings/26", IDS_PRINT_FINISHINGS_EDGE_STITCH_RIGHT}, | ||
{"finishings/27", IDS_PRINT_FINISHINGS_EDGE_STITCH_BOTTOM}, | ||
{"finishings/28", IDS_PRINT_FINISHINGS_STAPLE_DUAL_LEFT}, | ||
{"finishings/29", IDS_PRINT_FINISHINGS_STAPLE_DUAL_TOP}, | ||
{"finishings/30", IDS_PRINT_FINISHINGS_STAPLE_DUAL_RIGHT}, | ||
{"finishings/31", IDS_PRINT_FINISHINGS_STAPLE_DUAL_BOTTOM}, | ||
{"finishings/32", IDS_PRINT_FINISHINGS_STAPLE_TRIPLE_LEFT}, | ||
{"finishings/33", IDS_PRINT_FINISHINGS_STAPLE_TRIPLE_TOP}, | ||
{"finishings/34", IDS_PRINT_FINISHINGS_STAPLE_TRIPLE_RIGHT}, | ||
{"finishings/35", IDS_PRINT_FINISHINGS_STAPLE_TRIPLE_BOTTOM}, | ||
{"finishings/50", IDS_PRINT_FINISHINGS_BIND_LEFT}, | ||
{"finishings/51", IDS_PRINT_FINISHINGS_BIND_TOP}, | ||
{"finishings/52", IDS_PRINT_FINISHINGS_BIND_RIGHT}, | ||
{"finishings/53", IDS_PRINT_FINISHINGS_BIND_BOTTOM}, | ||
{"finishings/60", IDS_PRINT_FINISHINGS_TRIM_AFTER_PAGES}, | ||
{"finishings/61", IDS_PRINT_FINISHINGS_TRIM_AFTER_DOCUMENTS}, | ||
{"finishings/62", IDS_PRINT_FINISHINGS_TRIM_AFTER_COPIES}, | ||
{"finishings/63", IDS_PRINT_FINISHINGS_TRIM_AFTER_JOB}, | ||
{"finishings/70", IDS_PRINT_FINISHINGS_PUNCH_TOP_LEFT}, | ||
{"finishings/71", IDS_PRINT_FINISHINGS_PUNCH_BOTTOM_LEFT}, | ||
{"finishings/72", IDS_PRINT_FINISHINGS_PUNCH_TOP_RIGHT}, | ||
{"finishings/73", IDS_PRINT_FINISHINGS_PUNCH_BOTTOM_RIGHT}, | ||
{"finishings/74", IDS_PRINT_FINISHINGS_PUNCH_DUAL_LEFT}, | ||
{"finishings/75", IDS_PRINT_FINISHINGS_PUNCH_DUAL_TOP}, | ||
{"finishings/76", IDS_PRINT_FINISHINGS_PUNCH_DUAL_RIGHT}, | ||
{"finishings/77", IDS_PRINT_FINISHINGS_PUNCH_DUAL_BOTTOM}, | ||
{"finishings/78", IDS_PRINT_FINISHINGS_PUNCH_TRIPLE_LEFT}, | ||
{"finishings/79", IDS_PRINT_FINISHINGS_PUNCH_TRIPLE_TOP}, | ||
{"finishings/80", IDS_PRINT_FINISHINGS_PUNCH_TRIPLE_RIGHT}, | ||
{"finishings/81", IDS_PRINT_FINISHINGS_PUNCH_TRIPLE_BOTTOM}, | ||
{"finishings/82", IDS_PRINT_FINISHINGS_PUNCH_QUAD_LEFT}, | ||
{"finishings/83", IDS_PRINT_FINISHINGS_PUNCH_QUAD_TOP}, | ||
{"finishings/84", IDS_PRINT_FINISHINGS_PUNCH_QUAD_RIGHT}, | ||
{"finishings/85", IDS_PRINT_FINISHINGS_PUNCH_QUAD_BOTTOM}, | ||
{"finishings/86", IDS_PRINT_FINISHINGS_PUNCH_MULTIPLE_LEFT}, | ||
{"finishings/87", IDS_PRINT_FINISHINGS_PUNCH_MULTIPLE_TOP}, | ||
{"finishings/88", IDS_PRINT_FINISHINGS_PUNCH_MULTIPLE_RIGHT}, | ||
{"finishings/89", IDS_PRINT_FINISHINGS_PUNCH_MULTIPLE_BOTTOM}, | ||
{"finishings/90", IDS_PRINT_FINISHINGS_FOLD_ACCORDION}, | ||
{"finishings/91", IDS_PRINT_FINISHINGS_FOLD_DOUBLE_GATE}, | ||
{"finishings/92", IDS_PRINT_FINISHINGS_FOLD_GATE}, | ||
{"finishings/93", IDS_PRINT_FINISHINGS_FOLD_HALF}, | ||
{"finishings/94", IDS_PRINT_FINISHINGS_FOLD_HALF_Z}, | ||
{"finishings/95", IDS_PRINT_FINISHINGS_FOLD_LEFT_GATE}, | ||
{"finishings/96", IDS_PRINT_FINISHINGS_FOLD_LETTER}, | ||
{"finishings/97", IDS_PRINT_FINISHINGS_FOLD_PARALLEL}, | ||
{"finishings/98", IDS_PRINT_FINISHINGS_FOLD_POSTER}, | ||
{"finishings/99", IDS_PRINT_FINISHINGS_FOLD_RIGHT_GATE}, | ||
{"finishings/100", IDS_PRINT_FINISHINGS_FOLD_Z}, | ||
{"finishings/101", IDS_PRINT_FINISHINGS_FOLD_ENGINEERING_Z}, | ||
{"print-quality/3", IDS_PRINT_PRINT_QUALITY_DRAFT}, | ||
{"print-quality/4", IDS_PRINT_PRINT_QUALITY_NORMAL}, | ||
{"print-quality/5", IDS_PRINT_PRINT_QUALITY_HIGH}}); | ||
return *l10n_map; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef COMPONENTS_PRINTING_BROWSER_IPP_L10N_H_ | ||
#define COMPONENTS_PRINTING_BROWSER_IPP_L10N_H_ | ||
|
||
#include <map> | ||
|
||
#include "base/strings/string_piece.h" | ||
|
||
const std::map<base::StringPiece, int>& CapabilityLocalizationMap(); | ||
|
||
#endif // COMPONENTS_PRINTING_BROWSER_IPP_L10N_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.