Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: ui/app_list/search/tokenized_string_char_iterator.h

Issue 522683003: Move basic string operations to ui/app_list/search (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CHROME_BROWSER_UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_ 5 #ifndef UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_ 6 #define UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/app_list/search/tokenized_string.h" 10 #include "ui/app_list/app_list_export.h"
11 #include "ui/app_list/search/tokenized_string.h"
11 12
12 namespace base { 13 namespace base {
13 namespace i18n { 14 namespace i18n {
14 class UTF16CharIterator; 15 class UTF16CharIterator;
15 } 16 }
16 } 17 }
17 18
18 namespace app_list { 19 namespace app_list {
19 20
20 // An UTF16 char iterator for a TokenizedString. 21 // An UTF16 char iterator for a TokenizedString.
21 class TokenizedStringCharIterator { 22 class APP_LIST_EXPORT TokenizedStringCharIterator {
22 public: 23 public:
23 struct State { 24 struct State {
24 State(); 25 State();
25 State(size_t token_index, int char_index); 26 State(size_t token_index, int char_index);
26 27
27 size_t token_index; 28 size_t token_index;
28 int32 char_index; 29 int32 char_index;
29 }; 30 };
30 31
31 // Requires |tokenized| out-lives this iterator. 32 // Requires |tokenized| out-lives this iterator.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const TokenizedString::Mappings& mappings_; 67 const TokenizedString::Mappings& mappings_;
67 68
68 size_t current_token_; 69 size_t current_token_;
69 scoped_ptr<base::i18n::UTF16CharIterator> current_token_iter_; 70 scoped_ptr<base::i18n::UTF16CharIterator> current_token_iter_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(TokenizedStringCharIterator); 72 DISALLOW_COPY_AND_ASSIGN(TokenizedStringCharIterator);
72 }; 73 };
73 74
74 } // namespace app_list 75 } // namespace app_list
75 76
76 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_ 77 #endif // UI_APP_LIST_SEARCH_TOKENIZED_STRING_CHAR_ITERATOR_H_
OLDNEW
« no previous file with comments | « ui/app_list/search/tokenized_string.cc ('k') | ui/app_list/search/tokenized_string_char_iterator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698