| 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..ba174db1ab06b6b4c744185e9951a8289db97161
|
| --- /dev/null
|
| +++ b/services/prediction/dictionary_service.h
|
| @@ -0,0 +1,51 @@
|
| +// 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 CreatDictFromEmbeddedDataIfNotExist(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_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DictionaryService);
|
| +};
|
| +
|
| +} // namespace prediction
|
| +
|
| +#endif // SERVICES_PREDICTION_DICTIONARY_SERVICE_H_
|
|
|