Chromium Code Reviews| Index: services/prediction/dictionary_service.h |
| diff --git a/services/prediction/dictionary_service.h b/services/prediction/dictionary_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..141f3cd640a98c57b638843fefff5940aae1ff8a |
| --- /dev/null |
| +++ b/services/prediction/dictionary_service.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SERVICES_PREDICTION_DICTIONARY_SERVICE_H_ |
| +#define SERVICES_PREDICTION_DICTIONARY_SERVICE_H_ |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "mojo/services/prediction/public/interfaces/prediction.mojom.h" |
| +#include "services/prediction/proximity_info_factory.h" |
| + |
| +namespace latinime { |
| + |
| +class Dictionary; |
| +class DicTraverseSession; |
| +class PrevWordsInfo; |
| +} // namespace latinime |
| + |
| +namespace prediction { |
| + |
| +class DictionaryService { |
| + public: |
| + DictionaryService(); |
| + ~DictionaryService(); |
| + |
| + mojo::Array<mojo::String> GetDictionarySuggestion( |
| + PredictionInfoPtr prediction_info, |
| + latinime::ProximityInfo* proximity_info); |
| + |
| + private: |
| + void CopyDictionaryFromRes(const std::string path); |
| + |
| + latinime::Dictionary* const OpenDictionary(const std::string path, |
| + const int start_offset, |
| + const int size, |
| + const bool is_updatable); |
| + |
| + latinime::PrevWordsInfo ProcessPrevWord( |
| + mojo::Array<PrevWordInfoPtr>& prev_words); |
| + |
| + int max_suggestion_size_; |
| + scoped_ptr<latinime::Dictionary> default_dictionary_; |
| + scoped_ptr<latinime::DicTraverseSession> default_session_; |
|
APW
2015/07/31 21:49:16
What happened to DISALLOW_COPY_AND_ASSIGN?
riajiang
2015/08/01 01:23:09
Accidentally deleted. Added back
|
| +}; |
| + |
| +} // namespace prediction |
| + |
| +#endif // SERVICES_PREDICTION_DICTIONARY_SERVICE_H_ |