blob: dc02b8774b1c9d53076a7bfc301245b653fa9dc8 [file] [log] [blame]
// 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_PREDICTION_SERVICE_IMPL_H_
#define SERVICES_PREDICTION_PREDICTION_SERVICE_IMPL_H_
#include "base/memory/scoped_ptr.h"
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/services/prediction/interfaces/prediction.mojom.h"
#include "services/prediction/dictionary_service.h"
namespace prediction {
class PredictionServiceImpl : public PredictionService {
public:
explicit PredictionServiceImpl(
mojo::InterfaceRequest<PredictionService> request);
~PredictionServiceImpl() override;
// PredictionService implementation
void GetPredictionList(PredictionInfoPtr prediction_info,
const GetPredictionListCallback& callback) override;
private:
mojo::StrongBinding<PredictionService> strong_binding_;
scoped_ptr<latinime::ProximityInfo> proximity_settings_;
DictionaryService dictionary_service_;
DISALLOW_COPY_AND_ASSIGN(PredictionServiceImpl);
};
class PredictionServiceDelegate : public mojo::ApplicationDelegate {
public:
PredictionServiceDelegate();
~PredictionServiceDelegate() override;
// mojo::ApplicationDelegate implementation
bool ConfigureIncomingConnection(
mojo::ServiceProviderImpl* service_provider_impl) override;
};
} // namespace prediction
#endif // SERVICES_PREDICTION_PREDICTION_SERVICE_IMPL_H_