OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/base/accessibility/accessible_text_utils.h" | 5 #include "ui/base/accessibility/accessible_text_utils.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_util.h" | 8 #include "base/strings/string_util.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
11 | 11 |
12 size_t FindAccessibleTextBoundary(const string16& text, | 12 size_t FindAccessibleTextBoundary(const string16& text, |
13 const std::vector<int>& line_breaks, | 13 const std::vector<int>& line_breaks, |
14 TextBoundaryType boundary, | 14 TextBoundaryType boundary, |
15 size_t start_offset, | 15 size_t start_offset, |
16 TextBoundaryDirection direction) { | 16 TextBoundaryDirection direction) { |
17 size_t text_size = text.size(); | 17 size_t text_size = text.size(); |
18 DCHECK(start_offset <= text_size); | 18 DCHECK(start_offset <= text_size); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 if (direction == FORWARDS_DIRECTION) { | 82 if (direction == FORWARDS_DIRECTION) { |
83 result++; | 83 result++; |
84 } else { | 84 } else { |
85 result--; | 85 result--; |
86 } | 86 } |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 } // Namespace ui | 90 } // Namespace ui |
OLD | NEW |