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

Side by Side Diff: services/nacl/nonsfi/content_handler_main_nexe.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
« no previous file with comments | « services/js/content_handler_main.cc ('k') | services/nacl/nonsfi/content_handler_main_pexe.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 <fcntl.h> 5 #include <fcntl.h>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "mojo/application/application_runner_chromium.h" 8 #include "mojo/application/application_runner_chromium.h"
9 #include "mojo/application/content_handler_factory.h" 9 #include "mojo/application/content_handler_factory.h"
10 #include "mojo/data_pipe_utils/data_pipe_utils.h" 10 #include "mojo/data_pipe_utils/data_pipe_utils.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 NaClContentHandler() : content_handler_factory_(this) {} 22 NaClContentHandler() : content_handler_factory_(this) {}
23 23
24 private: 24 private:
25 // Overridden from ApplicationDelegate: 25 // Overridden from ApplicationDelegate:
26 void Initialize(mojo::ApplicationImpl* app) override {} 26 void Initialize(mojo::ApplicationImpl* app) override {}
27 27
28 // Overridden from ApplicationDelegate: 28 // Overridden from ApplicationDelegate:
29 bool ConfigureIncomingConnection( 29 bool ConfigureIncomingConnection(
30 mojo::ApplicationConnection* connection) override { 30 mojo::ApplicationConnection* connection) override {
31 connection->AddService(&content_handler_factory_); 31 connection->GetServiceProviderImpl().AddService<mojo::ContentHandler>(
32 content_handler_factory_.GetInterfaceRequestHandler());
32 return true; 33 return true;
33 } 34 }
34 35
35 // Overridden from ContentHandlerFactory::Delegate: 36 // Overridden from ContentHandlerFactory::Delegate:
36 void RunApplication( 37 void RunApplication(
37 mojo::InterfaceRequest<mojo::Application> application_request, 38 mojo::InterfaceRequest<mojo::Application> application_request,
38 mojo::URLResponsePtr response) override { 39 mojo::URLResponsePtr response) override {
39 // Needed to use Mojo interfaces on this thread. 40 // Needed to use Mojo interfaces on this thread.
40 base::MessageLoop loop(mojo::common::MessagePumpMojo::Create()); 41 base::MessageLoop loop(mojo::common::MessagePumpMojo::Create());
41 // Acquire the nexe. 42 // Acquire the nexe.
(...skipping 19 matching lines...) Expand all
61 }; 62 };
62 63
63 } // namespace content_handler 64 } // namespace content_handler
64 } // namespace nacl 65 } // namespace nacl
65 66
66 MojoResult MojoMain(MojoHandle application_request) { 67 MojoResult MojoMain(MojoHandle application_request) {
67 mojo::ApplicationRunnerChromium runner( 68 mojo::ApplicationRunnerChromium runner(
68 new nacl::content_handler::NaClContentHandler()); 69 new nacl::content_handler::NaClContentHandler());
69 return runner.Run(application_request); 70 return runner.Run(application_request);
70 } 71 }
OLDNEW
« no previous file with comments | « services/js/content_handler_main.cc ('k') | services/nacl/nonsfi/content_handler_main_pexe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698