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/public/common/unicode/uchar.h"
10 #include "ui/base/text/text_elider.h"
14 const wchar_t kDefaultDocumentTitle
[] = L
"Untitled Document";
15 const int kMaxDocumentTitleLength
= 50;
21 PrinterBasicInfo::PrinterBasicInfo()
25 PrinterBasicInfo::~PrinterBasicInfo() {}
27 PrinterSemanticCapsAndDefaults::PrinterSemanticCapsAndDefaults()
28 : color_changeable(false),
29 duplex_capable(false),
31 duplex_default(UNKNOWN_DUPLEX_MODE
) {}
33 PrinterSemanticCapsAndDefaults::~PrinterSemanticCapsAndDefaults() {}
35 PrinterCapsAndDefaults::PrinterCapsAndDefaults() {}
37 PrinterCapsAndDefaults::~PrinterCapsAndDefaults() {}
39 PrintBackend::~PrintBackend() {}
41 string16
PrintBackend::SimplifyDocumentTitle(const string16
& title
) {
42 string16
no_controls(title
);
44 std::remove_if(no_controls
.begin(), no_controls
.end(), &u_iscntrl
),
47 ui::ElideString(no_controls
, kMaxDocumentTitleLength
, &result
);
51 } // namespace printing