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

Side by Side Diff: services/nacl/sfi/content_handler_main.cc

Issue 1979683002: ApplicationConnection devolution, part 2.4. (Closed) Base URL: https://github.com/domokit/mojo.git@work795_app_conn_devo_2.3-x-work794_app_conn_devo_2.2
Patch Set: so much doh 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 "base/files/file_util.h" 5 #include "base/files/file_util.h"
6 #include "base/files/scoped_file.h" 6 #include "base/files/scoped_file.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "mojo/application/application_runner_chromium.h" 9 #include "mojo/application/application_runner_chromium.h"
10 #include "mojo/application/content_handler_factory.h" 10 #include "mojo/application/content_handler_factory.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #endif 98 #endif
99 CHECK(irt_url.is_valid()) << "Cannot resolve IRT URL"; 99 CHECK(irt_url.is_valid()) << "Cannot resolve IRT URL";
100 100
101 irt_fp_ = TempFileForURL(url_loader, irt_url); 101 irt_fp_ = TempFileForURL(url_loader, irt_url);
102 CHECK(irt_fp_) << "Could not acquire the IRT"; 102 CHECK(irt_fp_) << "Could not acquire the IRT";
103 } 103 }
104 104
105 // Overridden from ApplicationDelegate: 105 // Overridden from ApplicationDelegate:
106 bool ConfigureIncomingConnection( 106 bool ConfigureIncomingConnection(
107 mojo::ApplicationConnection* connection) override { 107 mojo::ApplicationConnection* connection) override {
108 connection->AddService(&content_handler_factory_); 108 connection->GetServiceProviderImpl().AddService<mojo::ContentHandler>(
109 content_handler_factory_.GetInterfaceRequestHandler());
109 return true; 110 return true;
110 } 111 }
111 112
112 // Overridden from ContentHandlerFactory::Delegate: 113 // Overridden from ContentHandlerFactory::Delegate:
113 void RunApplication( 114 void RunApplication(
114 mojo::InterfaceRequest<mojo::Application> application_request, 115 mojo::InterfaceRequest<mojo::Application> application_request,
115 mojo::URLResponsePtr response) override { 116 mojo::URLResponsePtr response) override {
116 // Needed to use Mojo interfaces on this thread. 117 // Needed to use Mojo interfaces on this thread.
117 base::MessageLoop loop(mojo::common::MessagePumpMojo::Create()); 118 base::MessageLoop loop(mojo::common::MessagePumpMojo::Create());
118 119
(...skipping 29 matching lines...) Expand all
148 }; 149 };
149 150
150 } // namespace content_handler 151 } // namespace content_handler
151 } // namespace nacl 152 } // namespace nacl
152 153
153 MojoResult MojoMain(MojoHandle application_request) { 154 MojoResult MojoMain(MojoHandle application_request) {
154 mojo::ApplicationRunnerChromium runner( 155 mojo::ApplicationRunnerChromium runner(
155 new nacl::content_handler::NaClContentHandler()); 156 new nacl::content_handler::NaClContentHandler());
156 return runner.Run(application_request); 157 return runner.Run(application_request);
157 } 158 }
OLDNEW
« no previous file with comments | « services/nacl/nonsfi/content_handler_main_pexe.cc ('k') | services/python/content_handler/content_handler_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698