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

Side by Side Diff: mojo/public/cpp/bindings/tests/versioning_test_service.cc

Issue 1975993002: Change InterfaceFactory<I>::Create() to take a ConnectionContext instead of an ApplicationConnectio… (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 <map> 5 #include <map>
6 #include <memory> 6 #include <memory>
7 7
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 #include "mojo/public/cpp/application/application_delegate.h" 10 #include "mojo/public/cpp/application/application_delegate.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 public: 99 public:
100 HumanResourceSystemServer() {} 100 HumanResourceSystemServer() {}
101 101
102 // ApplicationDelegate implementation. 102 // ApplicationDelegate implementation.
103 bool ConfigureIncomingConnection(ApplicationConnection* connection) override { 103 bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
104 connection->AddService<HumanResourceDatabase>(this); 104 connection->AddService<HumanResourceDatabase>(this);
105 return true; 105 return true;
106 } 106 }
107 107
108 // InterfaceFactory<HumanResourceDatabase> implementation. 108 // InterfaceFactory<HumanResourceDatabase> implementation.
109 void Create(ApplicationConnection* connection, 109 void Create(const ConnectionContext& connection_context,
110 InterfaceRequest<HumanResourceDatabase> request) override { 110 InterfaceRequest<HumanResourceDatabase> request) override {
111 // It will be deleted automatically when the underlying pipe encounters a 111 // It will be deleted automatically when the underlying pipe encounters a
112 // connection error. 112 // connection error.
113 new HumanResourceDatabaseImpl(request.Pass()); 113 new HumanResourceDatabaseImpl(request.Pass());
114 } 114 }
115 }; 115 };
116 116
117 } // namespace versioning 117 } // namespace versioning
118 } // namespace test 118 } // namespace test
119 } // namespace mojo 119 } // namespace mojo
120 120
121 MojoResult MojoMain(MojoHandle application_request) { 121 MojoResult MojoMain(MojoHandle application_request) {
122 mojo::ApplicationRunner runner( 122 mojo::ApplicationRunner runner(
123 std::unique_ptr<mojo::test::versioning::HumanResourceSystemServer>( 123 std::unique_ptr<mojo::test::versioning::HumanResourceSystemServer>(
124 new mojo::test::versioning::HumanResourceSystemServer())); 124 new mojo::test::versioning::HumanResourceSystemServer()));
125 125
126 return runner.Run(application_request); 126 return runner.Run(application_request);
127 } 127 }
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/tests/service_registry_unittest.cc ('k') | mojo/ui/content_viewer_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698