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 "mojo/application/application_runner_chromium.h" | 5 #include "mojo/application/application_runner_chromium.h" |
6 #include "mojo/public/c/system/main.h" | 6 #include "mojo/public/c/system/main.h" |
7 #include "mojo/public/cpp/application/application_connection.h" | 7 #include "mojo/public/cpp/application/application_connection.h" |
8 #include "mojo/public/cpp/application/application_delegate.h" | 8 #include "mojo/public/cpp/application/application_delegate.h" |
9 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
10 #include "services/prediction/dictionary_service.h" | 10 #include "services/prediction/dictionary_service.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // mojo::ApplicationDelegate implementation | 42 // mojo::ApplicationDelegate implementation |
43 bool PredictionServiceDelegate::ConfigureIncomingConnection( | 43 bool PredictionServiceDelegate::ConfigureIncomingConnection( |
44 mojo::ApplicationConnection* connection) { | 44 mojo::ApplicationConnection* connection) { |
45 connection->AddService<PredictionService>(this); | 45 connection->AddService<PredictionService>(this); |
46 return true; | 46 return true; |
47 } | 47 } |
48 | 48 |
49 // mojo::InterfaceRequest<PredictionService> implementation | 49 // mojo::InterfaceRequest<PredictionService> implementation |
50 void PredictionServiceDelegate::Create( | 50 void PredictionServiceDelegate::Create( |
51 mojo::ApplicationConnection* connection, | 51 const mojo::ConnectionContext& connection_context, |
52 mojo::InterfaceRequest<PredictionService> request) { | 52 mojo::InterfaceRequest<PredictionService> request) { |
53 new PredictionServiceImpl(request.Pass()); | 53 new PredictionServiceImpl(request.Pass()); |
54 } | 54 } |
55 | 55 |
56 } // namespace prediction | 56 } // namespace prediction |
57 | 57 |
58 MojoResult MojoMain(MojoHandle application_request) { | 58 MojoResult MojoMain(MojoHandle application_request) { |
59 mojo::ApplicationRunnerChromium runner( | 59 mojo::ApplicationRunnerChromium runner( |
60 new prediction::PredictionServiceDelegate()); | 60 new prediction::PredictionServiceDelegate()); |
61 return runner.Run(application_request); | 61 return runner.Run(application_request); |
62 } | 62 } |
OLD | NEW |