OLD | NEW |
1 // Copyright (c) 2010 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 "app/bidi_line_iterator.h" | 5 #include "ui/base/text/bidi_line_iterator.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 | 10 |
| 11 namespace ui { |
| 12 |
11 BiDiLineIterator::~BiDiLineIterator() { | 13 BiDiLineIterator::~BiDiLineIterator() { |
12 if (bidi_) { | 14 if (bidi_) { |
13 ubidi_close(bidi_); | 15 ubidi_close(bidi_); |
14 bidi_ = NULL; | 16 bidi_ = NULL; |
15 } | 17 } |
16 } | 18 } |
17 | 19 |
18 UBool BiDiLineIterator::Open(const string16& text, | 20 UBool BiDiLineIterator::Open(const string16& text, |
19 bool right_to_left, | 21 bool right_to_left, |
20 bool url) { | 22 bool url) { |
(...skipping 23 matching lines...) Expand all Loading... |
44 DCHECK(bidi_ != NULL); | 46 DCHECK(bidi_ != NULL); |
45 return ubidi_getVisualRun(bidi_, index, start, length); | 47 return ubidi_getVisualRun(bidi_, index, start, length); |
46 } | 48 } |
47 | 49 |
48 void BiDiLineIterator::GetLogicalRun(int start, | 50 void BiDiLineIterator::GetLogicalRun(int start, |
49 int* end, | 51 int* end, |
50 UBiDiLevel* level) { | 52 UBiDiLevel* level) { |
51 DCHECK(bidi_ != NULL); | 53 DCHECK(bidi_ != NULL); |
52 ubidi_getLogicalRun(bidi_, start, end, level); | 54 ubidi_getLogicalRun(bidi_, start, end, level); |
53 } | 55 } |
| 56 |
| 57 } // namespace ui |
OLD | NEW |