| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "services/prediction/prediction_service_impl.h" | 5 #include "services/prediction/prediction_service_impl.h" |
| 6 | 6 |
| 7 #include "mojo/application/application_runner_chromium.h" | 7 #include "mojo/application/application_runner_chromium.h" |
| 8 #include "mojo/public/c/system/main.h" | 8 #include "mojo/public/c/system/main.h" |
| 9 #include "mojo/public/cpp/application/application_connection.h" | 9 #include "mojo/public/cpp/application/application_connection.h" |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 dictionary_service_.GetDictionarySuggestion(prediction_info.Pass(), | 28 dictionary_service_.GetDictionarySuggestion(prediction_info.Pass(), |
| 29 proximity_settings_.get()); | 29 proximity_settings_.get()); |
| 30 callback.Run(prediction_list.Pass()); | 30 callback.Run(prediction_list.Pass()); |
| 31 } | 31 } |
| 32 | 32 |
| 33 PredictionServiceDelegate::PredictionServiceDelegate() {} | 33 PredictionServiceDelegate::PredictionServiceDelegate() {} |
| 34 | 34 |
| 35 PredictionServiceDelegate::~PredictionServiceDelegate() {} | 35 PredictionServiceDelegate::~PredictionServiceDelegate() {} |
| 36 | 36 |
| 37 bool PredictionServiceDelegate::ConfigureIncomingConnection( | 37 bool PredictionServiceDelegate::ConfigureIncomingConnection( |
| 38 mojo::ApplicationConnection* connection) { | 38 mojo::ServiceProviderImpl* service_provider_impl) { |
| 39 connection->GetServiceProviderImpl().AddService<PredictionService>( | 39 service_provider_impl->AddService<PredictionService>( |
| 40 [](const mojo::ConnectionContext& connection_context, | 40 [](const mojo::ConnectionContext& connection_context, |
| 41 mojo::InterfaceRequest<PredictionService> prediction_service_request) { | 41 mojo::InterfaceRequest<PredictionService> prediction_service_request) { |
| 42 new PredictionServiceImpl(prediction_service_request.Pass()); | 42 new PredictionServiceImpl(prediction_service_request.Pass()); |
| 43 }); | 43 }); |
| 44 return true; | 44 return true; |
| 45 } | 45 } |
| 46 | 46 |
| 47 } // namespace prediction | 47 } // namespace prediction |
| 48 | 48 |
| 49 MojoResult MojoMain(MojoHandle application_request) { | 49 MojoResult MojoMain(MojoHandle application_request) { |
| 50 mojo::ApplicationRunnerChromium runner( | 50 mojo::ApplicationRunnerChromium runner( |
| 51 new prediction::PredictionServiceDelegate()); | 51 new prediction::PredictionServiceDelegate()); |
| 52 return runner.Run(application_request); | 52 return runner.Run(application_request); |
| 53 } | 53 } |
| OLD | NEW |