OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #ifndef PRINTING_PAGE_OVERLAYS_H_ | 5 #ifndef PRINTING_PAGE_OVERLAYS_H_ |
6 #define PRINTING_PAGE_OVERLAYS_H_ | 6 #define PRINTING_PAGE_OVERLAYS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace printing { | 10 namespace printing { |
(...skipping 22 matching lines...) Expand all Loading... |
33 PageOverlays(); | 33 PageOverlays(); |
34 | 34 |
35 // Equality operator. | 35 // Equality operator. |
36 bool Equals(const PageOverlays& rhs) const; | 36 bool Equals(const PageOverlays& rhs) const; |
37 | 37 |
38 // Returns the string of an overlay according to its x,y position. | 38 // Returns the string of an overlay according to its x,y position. |
39 const std::wstring& GetOverlay(HorizontalPosition x, | 39 const std::wstring& GetOverlay(HorizontalPosition x, |
40 VerticalPosition y) const; | 40 VerticalPosition y) const; |
41 | 41 |
42 // Sets the string of an overlay according to its x,y position. | 42 // Sets the string of an overlay according to its x,y position. |
43 void SetOverlay(HorizontalPosition x, VerticalPosition y, | 43 void SetOverlay(HorizontalPosition x, |
44 std::wstring& input); | 44 VerticalPosition y, |
| 45 const std::wstring& input); |
45 | 46 |
46 // Replaces the variables in |input| with their actual values according to the | 47 // Replaces the variables in |input| with their actual values according to the |
47 // properties of the current printed document and the current printed page. | 48 // properties of the current printed document and the current printed page. |
48 static std::wstring ReplaceVariables(const std::wstring& input, | 49 static std::wstring ReplaceVariables(const std::wstring& input, |
49 const PrintedDocument& document, | 50 const PrintedDocument& document, |
50 const PrintedPage& page); | 51 const PrintedPage& page); |
51 | 52 |
52 // Keys that are dynamically replaced in the header and footer by their actual | 53 // Keys that are dynamically replaced in the header and footer by their actual |
53 // values. | 54 // values. |
54 // Web page's title. | 55 // Web page's title. |
(...skipping 16 matching lines...) Expand all Loading... |
71 std::wstring top_center; | 72 std::wstring top_center; |
72 std::wstring top_right; | 73 std::wstring top_right; |
73 std::wstring bottom_left; | 74 std::wstring bottom_left; |
74 std::wstring bottom_center; | 75 std::wstring bottom_center; |
75 std::wstring bottom_right; | 76 std::wstring bottom_right; |
76 }; | 77 }; |
77 | 78 |
78 } // namespace printing | 79 } // namespace printing |
79 | 80 |
80 #endif // PRINTING_PAGE_OVERLAYS_H_ | 81 #endif // PRINTING_PAGE_OVERLAYS_H_ |
OLD | NEW |