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

Side by Side Diff: services/nacl/sfi/content_handler_main.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
« no previous file with comments | « services/nacl/nonsfi/pnacl_link.cc ('k') | services/native_support/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #error "Unknown / unsupported CPU architecture." 97 #error "Unknown / unsupported CPU architecture."
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::ServiceProviderImpl* service_provider_impl) override {
108 connection->GetServiceProviderImpl().AddService<mojo::ContentHandler>( 108 service_provider_impl->AddService<mojo::ContentHandler>(
109 content_handler_factory_.GetInterfaceRequestHandler()); 109 content_handler_factory_.GetInterfaceRequestHandler());
110 return true; 110 return true;
111 } 111 }
112 112
113 // Overridden from ContentHandlerFactory::Delegate: 113 // Overridden from ContentHandlerFactory::Delegate:
114 void RunApplication( 114 void RunApplication(
115 mojo::InterfaceRequest<mojo::Application> application_request, 115 mojo::InterfaceRequest<mojo::Application> application_request,
116 mojo::URLResponsePtr response) override { 116 mojo::URLResponsePtr response) override {
117 // Needed to use Mojo interfaces on this thread. 117 // Needed to use Mojo interfaces on this thread.
118 base::MessageLoop loop(mojo::common::MessagePumpMojo::Create()); 118 base::MessageLoop loop(mojo::common::MessagePumpMojo::Create());
(...skipping 30 matching lines...) Expand all
149 }; 149 };
150 150
151 } // namespace content_handler 151 } // namespace content_handler
152 } // namespace nacl 152 } // namespace nacl
153 153
154 MojoResult MojoMain(MojoHandle application_request) { 154 MojoResult MojoMain(MojoHandle application_request) {
155 mojo::ApplicationRunnerChromium runner( 155 mojo::ApplicationRunnerChromium runner(
156 new nacl::content_handler::NaClContentHandler()); 156 new nacl::content_handler::NaClContentHandler());
157 return runner.Run(application_request); 157 return runner.Run(application_request);
158 } 158 }
OLDNEW
« no previous file with comments | « services/nacl/nonsfi/pnacl_link.cc ('k') | services/native_support/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698