Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(876)

Side by Side Diff: services/prediction/prediction_service_impl.cc

Issue 1979723002: ApplicationConnection devolution, part 3. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « services/prediction/prediction_service_impl.h ('k') | services/python/content_handler/content_handler_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698