OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/page_overlays.h" | 5 #include "printing/page_overlays.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 PageOverlays::PageOverlays() | 38 PageOverlays::PageOverlays() |
39 : top_left(kDate), | 39 : top_left(kDate), |
40 top_center(kTitle), | 40 top_center(kTitle), |
41 top_right(), | 41 top_right(), |
42 bottom_left(kUrl), | 42 bottom_left(kUrl), |
43 bottom_center(), | 43 bottom_center(), |
44 bottom_right(kPageOnTotal) { | 44 bottom_right(kPageOnTotal) { |
45 } | 45 } |
46 | 46 |
| 47 PageOverlays::~PageOverlays() {} |
| 48 |
47 bool PageOverlays::Equals(const PageOverlays& rhs) const { | 49 bool PageOverlays::Equals(const PageOverlays& rhs) const { |
48 return top_left == rhs.top_left && | 50 return top_left == rhs.top_left && |
49 top_center == rhs.top_center && | 51 top_center == rhs.top_center && |
50 top_right == rhs.top_right && | 52 top_right == rhs.top_right && |
51 bottom_left == rhs.bottom_left && | 53 bottom_left == rhs.bottom_left && |
52 bottom_center == rhs.bottom_center && | 54 bottom_center == rhs.bottom_center && |
53 bottom_right == rhs.bottom_right; | 55 bottom_right == rhs.bottom_right; |
54 } | 56 } |
55 | 57 |
56 const std::wstring& PageOverlays::GetOverlay(HorizontalPosition x, | 58 const std::wstring& PageOverlays::GetOverlay(HorizontalPosition x, |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 UTF8ToWide(document.url().spec())); | 200 UTF8ToWide(document.url().spec())); |
199 } else { | 201 } else { |
200 // There is just a { in the string. | 202 // There is just a { in the string. |
201 ++offset; | 203 ++offset; |
202 } | 204 } |
203 } | 205 } |
204 return output; | 206 return output; |
205 } | 207 } |
206 | 208 |
207 } // namespace printing | 209 } // namespace printing |
OLD | NEW |