Ria Runjie Jiang | dc1f153 | 2015-06-04 15:24:38 -0700 | [diff] [blame] | 1 | // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef SERVICES_PREDICTION_PREDICTION_SERVICE_IMPL_H_ |
| 6 | #define SERVICES_PREDICTION_PREDICTION_SERVICE_IMPL_H_ |
| 7 | |
Ria Runjie Jiang | 1e6163c | 2015-08-06 13:06:25 -0700 | [diff] [blame] | 8 | #include "base/memory/scoped_ptr.h" |
Viet-Trung Luu | 0f4f3ba | 2015-10-10 01:08:40 -0700 | [diff] [blame] | 9 | #include "mojo/services/prediction/interfaces/prediction.mojom.h" |
Ria Runjie Jiang | dc1f153 | 2015-06-04 15:24:38 -0700 | [diff] [blame] | 10 | |
| 11 | namespace prediction { |
| 12 | |
| 13 | class PredictionServiceImpl : public PredictionService { |
| 14 | public: |
| 15 | explicit PredictionServiceImpl( |
| 16 | mojo::InterfaceRequest<PredictionService> request); |
| 17 | ~PredictionServiceImpl() override; |
| 18 | |
| 19 | // PredictionService implementation |
Ria Runjie Jiang | dc1f153 | 2015-06-04 15:24:38 -0700 | [diff] [blame] | 20 | void GetPredictionList(PredictionInfoPtr prediction_info, |
| 21 | const GetPredictionListCallback& callback) override; |
| 22 | |
| 23 | private: |
Ria Runjie Jiang | dc1f153 | 2015-06-04 15:24:38 -0700 | [diff] [blame] | 24 | mojo::StrongBinding<PredictionService> strong_binding_; |
| 25 | |
Ria Runjie Jiang | 1e6163c | 2015-08-06 13:06:25 -0700 | [diff] [blame] | 26 | scoped_ptr<latinime::ProximityInfo> proximity_settings_; |
| 27 | DictionaryService dictionary_service_; |
| 28 | |
Ria Runjie Jiang | dc1f153 | 2015-06-04 15:24:38 -0700 | [diff] [blame] | 29 | DISALLOW_COPY_AND_ASSIGN(PredictionServiceImpl); |
| 30 | }; |
| 31 | |
| 32 | class PredictionServiceDelegate |
| 33 | : public mojo::ApplicationDelegate, |
| 34 | public mojo::InterfaceFactory<PredictionService> { |
| 35 | public: |
| 36 | PredictionServiceDelegate(); |
| 37 | ~PredictionServiceDelegate() override; |
| 38 | |
| 39 | // mojo::ApplicationDelegate implementation |
| 40 | bool ConfigureIncomingConnection( |
| 41 | mojo::ApplicationConnection* connection) override; |
| 42 | |
| 43 | // mojo::InterfaceRequest<PredictionService> implementation |
| 44 | void Create(mojo::ApplicationConnection* connection, |
| 45 | mojo::InterfaceRequest<PredictionService> request) override; |
| 46 | }; |
| 47 | |
| 48 | } // namespace prediction |
| 49 | |
| 50 | #endif // SERVICES_PREDICTION_PREDICTION_SERVICE_IMPL_H_ |