blob: 4963004793479c00d1dfde535779dc3b39435341 [file] [log] [blame]
Ria Runjie Jiangdc1f1532015-06-04 15:24:38 -07001// 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 Jiang1e6163c2015-08-06 13:06:25 -07008#include "base/memory/scoped_ptr.h"
Viet-Trung Luu0f4f3ba2015-10-10 01:08:40 -07009#include "mojo/services/prediction/interfaces/prediction.mojom.h"
Ria Runjie Jiangdc1f1532015-06-04 15:24:38 -070010
11namespace prediction {
12
13class PredictionServiceImpl : public PredictionService {
14 public:
15 explicit PredictionServiceImpl(
16 mojo::InterfaceRequest<PredictionService> request);
17 ~PredictionServiceImpl() override;
18
19 // PredictionService implementation
Ria Runjie Jiangdc1f1532015-06-04 15:24:38 -070020 void GetPredictionList(PredictionInfoPtr prediction_info,
21 const GetPredictionListCallback& callback) override;
22
23 private:
Ria Runjie Jiangdc1f1532015-06-04 15:24:38 -070024 mojo::StrongBinding<PredictionService> strong_binding_;
25
Ria Runjie Jiang1e6163c2015-08-06 13:06:25 -070026 scoped_ptr<latinime::ProximityInfo> proximity_settings_;
27 DictionaryService dictionary_service_;
28
Ria Runjie Jiangdc1f1532015-06-04 15:24:38 -070029 DISALLOW_COPY_AND_ASSIGN(PredictionServiceImpl);
30};
31
32class 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_