OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_ | 5 #ifndef UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_ |
6 #define UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_ | 6 #define UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
| 11 #include <memory> |
| 12 |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "ui/app_list/app_list_export.h" | 14 #include "ui/app_list/app_list_export.h" |
14 #include "ui/app_list/search/tokenized_string.h" | 15 #include "ui/app_list/search/tokenized_string.h" |
15 | 16 |
16 namespace base { | 17 namespace base { |
17 namespace i18n { | 18 namespace i18n { |
18 class UTF16CharIterator; | 19 class UTF16CharIterator; |
19 } | 20 } |
20 } | 21 } |
21 | 22 |
22 namespace app_list { | 23 namespace app_list { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // Returns true if the iterator is at the end. | 64 // Returns true if the iterator is at the end. |
64 bool end() const { return !current_token_iter_; } | 65 bool end() const { return !current_token_iter_; } |
65 | 66 |
66 private: | 67 private: |
67 void CreateTokenCharIterator(); | 68 void CreateTokenCharIterator(); |
68 | 69 |
69 const TokenizedString::Tokens& tokens_; | 70 const TokenizedString::Tokens& tokens_; |
70 const TokenizedString::Mappings& mappings_; | 71 const TokenizedString::Mappings& mappings_; |
71 | 72 |
72 size_t current_token_; | 73 size_t current_token_; |
73 scoped_ptr<base::i18n::UTF16CharIterator> current_token_iter_; | 74 std::unique_ptr<base::i18n::UTF16CharIterator> current_token_iter_; |
74 | 75 |
75 DISALLOW_COPY_AND_ASSIGN(TokenizedStringCharIterator); | 76 DISALLOW_COPY_AND_ASSIGN(TokenizedStringCharIterator); |
76 }; | 77 }; |
77 | 78 |
78 } // namespace app_list | 79 } // namespace app_list |
79 | 80 |
80 #endif // UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_ | 81 #endif // UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_ |
OLD | NEW |