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

Side by Side Diff: components/spellcheck/renderer/spellcheck.h

Issue 2658013002: Remove ScopedVector in components/spellcheck (Closed)
Patch Set: Remove ScopedVector in components/spellcheck Created 3 years, 11 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 (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 #ifndef COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_H_ 5 #ifndef COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_H_
6 #define COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_H_ 6 #define COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/files/file.h" 13 #include "base/files/file.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/scoped_vector.h"
17 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
18 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
19 #include "components/spellcheck/renderer/custom_dictionary_engine.h" 18 #include "components/spellcheck/renderer/custom_dictionary_engine.h"
20 #include "components/spellcheck/spellcheck_build_features.h" 19 #include "components/spellcheck/spellcheck_build_features.h"
21 #include "content/public/renderer/render_thread_observer.h" 20 #include "content/public/renderer/render_thread_observer.h"
22 21
23 struct SpellCheckBDictLanguage; 22 struct SpellCheckBDictLanguage;
24 class SpellcheckLanguage; 23 class SpellcheckLanguage;
25 struct SpellCheckResult; 24 struct SpellCheckResult;
26 25
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // The parameters of a pending background-spellchecking request. When WebKit 143 // The parameters of a pending background-spellchecking request. When WebKit
145 // sends a background-spellchecking request before initializing hunspell, 144 // sends a background-spellchecking request before initializing hunspell,
146 // we save its parameters and start spellchecking after we finish initializing 145 // we save its parameters and start spellchecking after we finish initializing
147 // hunspell. (When WebKit sends two or more requests, we cancel the previous 146 // hunspell. (When WebKit sends two or more requests, we cancel the previous
148 // requests so we do not have to use vectors.) 147 // requests so we do not have to use vectors.)
149 std::unique_ptr<SpellcheckRequest> pending_request_param_; 148 std::unique_ptr<SpellcheckRequest> pending_request_param_;
150 #endif 149 #endif
151 150
152 // A vector of objects used to actually check spelling, one for each enabled 151 // A vector of objects used to actually check spelling, one for each enabled
153 // language. 152 // language.
154 ScopedVector<SpellcheckLanguage> languages_; 153 std::vector<std::unique_ptr<SpellcheckLanguage>> languages_;
155 154
156 // Custom dictionary spelling engine. 155 // Custom dictionary spelling engine.
157 CustomDictionaryEngine custom_dictionary_; 156 CustomDictionaryEngine custom_dictionary_;
158 157
159 // Remember state for spellchecking. 158 // Remember state for spellchecking.
160 bool spellcheck_enabled_; 159 bool spellcheck_enabled_;
161 160
162 DISALLOW_COPY_AND_ASSIGN(SpellCheck); 161 DISALLOW_COPY_AND_ASSIGN(SpellCheck);
163 }; 162 };
164 163
165 #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_H_ 164 #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698