| 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 // This file defines utility functions for eliding and formatting UI text. | 5 // This file defines utility functions for eliding and formatting UI text. |
| 6 | 6 |
| 7 #ifndef UI_GFX_TEXT_ELIDER_H_ | 7 #ifndef UI_GFX_TEXT_ELIDER_H_ |
| 8 #define UI_GFX_TEXT_ELIDER_H_ | 8 #define UI_GFX_TEXT_ELIDER_H_ |
| 9 | 9 |
| 10 #include <stddef.h> |
| 11 |
| 10 #include <string> | 12 #include <string> |
| 11 #include <vector> | 13 #include <vector> |
| 12 | 14 |
| 13 #include "base/basictypes.h" | 15 #include "base/macros.h" |
| 14 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 15 #include "ui/gfx/gfx_export.h" | 17 #include "ui/gfx/gfx_export.h" |
| 16 #include "ui/gfx/text_constants.h" | 18 #include "ui/gfx/text_constants.h" |
| 17 | 19 |
| 18 class GURL; | 20 class GURL; |
| 19 | 21 |
| 20 namespace base { | 22 namespace base { |
| 21 class FilePath; | 23 class FilePath; |
| 22 } | 24 } |
| 23 | 25 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // CHARACTER_BREAK, and adds the horizontal ellipsis character (unicode | 142 // CHARACTER_BREAK, and adds the horizontal ellipsis character (unicode |
| 141 // character 0x2026) to render "...". The supplied string is returned if the | 143 // character 0x2026) to render "...". The supplied string is returned if the |
| 142 // string has |length| characters or less. | 144 // string has |length| characters or less. |
| 143 GFX_EXPORT base::string16 TruncateString(const base::string16& string, | 145 GFX_EXPORT base::string16 TruncateString(const base::string16& string, |
| 144 size_t length, | 146 size_t length, |
| 145 BreakType break_type); | 147 BreakType break_type); |
| 146 | 148 |
| 147 } // namespace gfx | 149 } // namespace gfx |
| 148 | 150 |
| 149 #endif // UI_GFX_TEXT_ELIDER_H_ | 151 #endif // UI_GFX_TEXT_ELIDER_H_ |
| OLD | NEW |