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
3 // found in the LICENSE file.
5 #include "printing/backend/print_backend.h"
9 #include "third_party/icu/source/common/unicode/uchar.h"
10 #include "ui/gfx/text_elider.h"
12 const int kMaxDocumentTitleLength = 50;
16 PrinterBasicInfo::PrinterBasicInfo()
20 PrinterBasicInfo::~PrinterBasicInfo() {}
22 PrinterSemanticCapsAndDefaults::PrinterSemanticCapsAndDefaults()
23 : color_changeable(false),
24 duplex_capable(false),
26 duplex_default(UNKNOWN_DUPLEX_MODE) {}
28 PrinterSemanticCapsAndDefaults::~PrinterSemanticCapsAndDefaults() {}
30 PrinterCapsAndDefaults::PrinterCapsAndDefaults() {}
32 PrinterCapsAndDefaults::~PrinterCapsAndDefaults() {}
34 PrintBackend::~PrintBackend() {}
36 base::string16 PrintBackend::SimplifyDocumentTitle(
37 const base::string16& title) {
38 base::string16 no_controls(title);
40 std::remove_if(no_controls.begin(), no_controls.end(), &u_iscntrl),
42 base::string16 result;
43 gfx::ElideString(no_controls, kMaxDocumentTitleLength, &result);
47 } // namespace printing