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

Side by Side Diff: shell/test/pingable_app.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 <memory> 5 #include <memory>
6 6
7 #include "mojo/public/c/system/main.h" 7 #include "mojo/public/c/system/main.h"
8 #include "mojo/public/cpp/application/application_delegate.h" 8 #include "mojo/public/cpp/application/application_delegate.h"
9 #include "mojo/public/cpp/application/application_impl.h" 9 #include "mojo/public/cpp/application/application_impl.h"
10 #include "mojo/public/cpp/application/application_runner.h" 10 #include "mojo/public/cpp/application/application_runner.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 app_url_ = impl->url(); 51 app_url_ = impl->url();
52 } 52 }
53 53
54 bool ConfigureIncomingConnection( 54 bool ConfigureIncomingConnection(
55 mojo::ApplicationConnection* connection) override { 55 mojo::ApplicationConnection* connection) override {
56 connection->AddService(this); 56 connection->AddService(this);
57 return true; 57 return true;
58 } 58 }
59 59
60 // InterfaceFactory<Pingable>: 60 // InterfaceFactory<Pingable>:
61 void Create(mojo::ApplicationConnection* connection, 61 void Create(const mojo::ConnectionContext& connection_context,
62 mojo::InterfaceRequest<Pingable> request) override { 62 mojo::InterfaceRequest<Pingable> request) override {
63 new PingableImpl(request.Pass(), app_url_, connection->GetConnectionURL()); 63 new PingableImpl(request.Pass(), app_url_,
64 connection_context.connection_url);
64 } 65 }
65 66
66 std::string app_url_; 67 std::string app_url_;
67 }; 68 };
68 69
69 MojoResult MojoMain(MojoHandle application_request) { 70 MojoResult MojoMain(MojoHandle application_request) {
70 mojo::ApplicationRunner runner( 71 mojo::ApplicationRunner runner(
71 std::unique_ptr<PingableApp>(new PingableApp())); 72 std::unique_ptr<PingableApp>(new PingableApp()));
72 return runner.Run(application_request); 73 return runner.Run(application_request);
73 } 74 }
OLDNEW
« no previous file with comments | « shell/application_manager/application_manager_unittest.cc ('k') | ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698