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 "printing/backend/print_backend.h" | 5 #include "printing/backend/print_backend.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "third_party/icu/source/common/unicode/uchar.h" | 9 #include "third_party/icu/source/common/unicode/uchar.h" |
10 #include "ui/gfx/text_elider.h" | 10 #include "ui/gfx/text_elider.h" |
11 | 11 |
12 namespace { | |
13 | |
14 const wchar_t kDefaultDocumentTitle[] = L"Untitled Document"; | |
15 const int kMaxDocumentTitleLength = 50; | 12 const int kMaxDocumentTitleLength = 50; |
16 | 13 |
17 } // namespace | |
18 | |
19 namespace printing { | 14 namespace printing { |
20 | 15 |
21 PrinterBasicInfo::PrinterBasicInfo() | 16 PrinterBasicInfo::PrinterBasicInfo() |
22 : printer_status(0), | 17 : printer_status(0), |
23 is_default(false) {} | 18 is_default(false) {} |
24 | 19 |
25 PrinterBasicInfo::~PrinterBasicInfo() {} | 20 PrinterBasicInfo::~PrinterBasicInfo() {} |
26 | 21 |
27 PrinterSemanticCapsAndDefaults::PrinterSemanticCapsAndDefaults() | 22 PrinterSemanticCapsAndDefaults::PrinterSemanticCapsAndDefaults() |
28 : color_changeable(false), | 23 : color_changeable(false), |
(...skipping 13 matching lines...) Expand all Loading... |
42 string16 no_controls(title); | 37 string16 no_controls(title); |
43 no_controls.erase( | 38 no_controls.erase( |
44 std::remove_if(no_controls.begin(), no_controls.end(), &u_iscntrl), | 39 std::remove_if(no_controls.begin(), no_controls.end(), &u_iscntrl), |
45 no_controls.end()); | 40 no_controls.end()); |
46 string16 result; | 41 string16 result; |
47 gfx::ElideString(no_controls, kMaxDocumentTitleLength, &result); | 42 gfx::ElideString(no_controls, kMaxDocumentTitleLength, &result); |
48 return result; | 43 return result; |
49 } | 44 } |
50 | 45 |
51 } // namespace printing | 46 } // namespace printing |
OLD | NEW |